This commit is contained in:
Laurent Destailleur 2017-02-02 03:14:21 +01:00
parent 09ebb1dcdc
commit d7060b0c4b

View File

@ -3428,7 +3428,9 @@ class Societe extends CommonObject
*/
public function setCategories($categories, $type)
{
// Decode type
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
// Decode type
if ($type == 'customer') {
$type_id = Categorie::TYPE_CUSTOMER;
$type_text = 'customer';
@ -3446,7 +3448,6 @@ class Societe extends CommonObject
}
// Get current categories
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
$c = new Categorie($this->db);
$existing = $c->containing($this->id, $type_id, 'id');