From 73d3cc7ce36c95cffd3d700ef1ba492ac71e5c79 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Fri, 3 Nov 2017 15:23:18 +0100 Subject: [PATCH] New : merge categories while merging thirdparties --- htdocs/societe/card.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 30040ce144b..02ec2a7da0b 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -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