diff --git a/htdocs/categories/categorie.class.php b/htdocs/categories/categorie.class.php index 1c6f2893046..8734dd818b3 100644 --- a/htdocs/categories/categorie.class.php +++ b/htdocs/categories/categorie.class.php @@ -179,6 +179,8 @@ class Categorie */ function update() { + global $conf; + // Clean parameters $this->label=trim($this->label); $this->description=trim($this->description); @@ -217,7 +219,7 @@ class Categorie { $sql .= ", description = '".addslashes($this->description)."'"; } - if ($this->socid) + if ($conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER) { $sql .= ", fk_soc = ".$this->socid; }