New : merge categories while merging thirdparties

This commit is contained in:
Maxime Kohlhaas 2017-11-03 15:23:18 +01:00
parent 55386a3ae2
commit 73d3cc7ce3

View File

@ -175,9 +175,14 @@ if (empty($reshook))
}
}
// TODO Merge categories
// Merge categories
$static_cat = new Categorie($db);
$custcats = $static_cat->containing($soc_origin->id, 'customer', 'id');
$object->setCategories($custcats, 'customer');
$suppcats = $static_cat->containing($soc_origin->id, 'supplier', 'id');
$object->setCategories($suppcats, 'supplier');
// Update
$object->update($object->id, $user);
// Move links