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

View File

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