New : add of socialmedias in contact update

This commit is contained in:
lmarcouiller 2022-06-08 12:36:55 +02:00
parent ec52502089
commit c368ff69df

View File

@ -834,6 +834,15 @@ class modSociete extends DolibarrModules
$this->import_updatekeys_array[$r] = array(
's.rowid' => 'Id'
);
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++;