Merge pull request #22983 from EchoLoGeek/#21771

#21771
This commit is contained in:
Laurent Destailleur 2022-11-26 00:10:27 +01:00 committed by GitHub
commit 175cdf3668
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -1207,3 +1207,4 @@ CreatedByPublicPortal=Créé à partir du portail public
UserAgent=User Agent
InternalUser=Utilisateur interne
ExternalUser=Utilisateur externe
WarningUserDifferentContactSocid=Contact non relié à un tiers. Le tiers ne sera pas enregistré.

View File

@ -537,6 +537,9 @@ if (empty($reshook)) {
$sql .= " SET fk_socpeople=".((int) $contactid);
if (!empty($contact->socid)) {
$sql .= ", fk_soc=".((int) $contact->socid);
} elseif ($socid > 0) {
$sql .= ", fk_soc = null";
setEventMessages($langs->trans("WarningUserDifferentContactSocid"), '', 'warnings'); // Add message if post socid != $contact->socid
}
$sql .= " WHERE rowid = ".((int) $object->id);
} elseif ($socid > 0) {