Merge pull request #21163 from Hystepik/develop#1

Fix : add of socialmedias in contact update
This commit is contained in:
Laurent Destailleur 2022-06-08 14:56:10 +02:00 committed by GitHub
commit b23c7eb672
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -832,8 +832,18 @@ class modSociete extends DolibarrModules
's.note_public' => "My public note"
);
$this->import_updatekeys_array[$r] = array(
's.rowid' => 'Id'
's.rowid' => 'Id',
's.lastname' => "Lastname",
);
if (!empty($conf->socialnetworks->enabled)) {
$sql = "SELECT code, label FROM ".MAIN_DB_PREFIX."c_socialnetworks WHERE active = 1";
$resql = $this->db->query($sql);
while ($obj = $this->db->fetch_object($resql)) {
$fieldname = 's.socialnetworks_'.$obj->code;
$fieldlabel = ucfirst($obj->label);
$this->import_updatekeys_array[$r][$fieldname] = $fieldlabel;
}
}
// Import Bank Accounts
$r++;