diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php index 0826eec832a..6513c846816 100644 --- a/htdocs/admin/tools/dolibarr_import.php +++ b/htdocs/admin/tools/dolibarr_import.php @@ -39,6 +39,8 @@ $showpass=GETPOST('showpass'); */ $label=$db::LABEL; +$type=$db->type; + $help_url='EN:Restores|FR:Restaurations|ES:Restauraciones'; llxHeader('','',$help_url); @@ -91,7 +93,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'

';
trans("ImportMethod"); ?>
@@ -100,7 +102,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'

';
@@ -123,7 +125,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).'

';
@@ -157,7 +159,7 @@ if ($label == 'MySQL')
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 7570bf7d886..d151298dbc5 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -298,6 +298,7 @@ if (empty($reshook)) $object->zip = GETPOST("zipcode"); $object->town = GETPOST("town"); $object->state_id = GETPOST("state_id",'int'); + $object->fk_departement = GETPOST("state_id",'int'); // For backward compatibility $object->country_id = GETPOST("country_id",'int'); $object->email = GETPOST("email",'alpha'); diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 14af958ff51..15688e62bba 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -537,7 +537,7 @@ function show_projects($conf,$langs,$db,$object,$backtopage='') else { $var = false; - print ''.$langs->trans("None").''; + print ''.$langs->trans("None").''; } $db->free($result); } diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index a3bb701a259..11f29f79089 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1375,7 +1375,6 @@ class Societe extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."socpeople"; $sql.= " WHERE fk_soc = " . $id; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql)) { $error++; @@ -1388,7 +1387,6 @@ class Societe extends CommonObject { $sql = "UPDATE ".MAIN_DB_PREFIX."adherent"; $sql.= " SET fk_soc = NULL WHERE fk_soc = " . $id; - dol_syslog(get_class($this)."::delete", LOG_DEBUG); if (! $this->db->query($sql)) { $error++; @@ -1402,7 +1400,18 @@ class Societe extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_rib"; $sql.= " WHERE fk_soc = " . $id; - dol_syslog(get_class($this)."::Delete", LOG_DEBUG); + if (! $this->db->query($sql)) + { + $error++; + $this->error = $this->db->lasterror(); + } + } + + // Remove societe_remise_except + if (! $error) + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_remise_except"; + $sql.= " WHERE fk_soc = " . $id; if (! $this->db->query($sql)) { $error++; @@ -1415,7 +1424,6 @@ class Societe extends CommonObject { $sql = "DELETE FROM ".MAIN_DB_PREFIX."societe_commerciaux"; $sql.= " WHERE fk_soc = " . $id; - dol_syslog(get_class($this)."::Delete", LOG_DEBUG); if (! $this->db->query($sql)) { $error++; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index aca4fcc9e4e..be879efecf5 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -49,7 +49,7 @@ $langs->load("commercial"); $langs->load("bills"); $langs->load("banks"); $langs->load("users"); -if (! empty($conf->categories->enabled)) $langs->load("categories"); +if (! empty($conf->categorie->enabled)) $langs->load("categories"); if (! empty($conf->incoterm->enabled)) $langs->load("incoterm"); if (! empty($conf->notification->enabled)) $langs->load("mails");