mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
Merge pull request #7762 from atm-maxime/new_socmerge_cat
NEW merge categories while merging thirdparties
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user