Skip to content

Commit

Permalink
Update card.php
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Mar 14, 2018
1 parent 5140c1c commit c69f584
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions htdocs/societe/card.php
Expand Up @@ -181,12 +181,15 @@

// Merge categories
$static_cat = new Categorie($db);

$custcats_ori = $static_cat->containing($soc_origin->id, 'customer', 'id');
$custcats = $static_cat->containing($object->id, 'customer', 'id');
$custcats = array_merge($custcats,$custcats_ori);
$object->setCategories($custcats, 'customer');

$suppcats_ori = $static_cat->containing($soc_origin->id, 'supplier', 'id');
$suppcats = $static_cat->containing($object->id, 'supplier', 'id');
$suppcats = array_merge($suppcats,$suppcats_ori);
$object->setCategories($suppcats, 'supplier');

// If thirdparty has a new code that is same than origin, we clean origin code to avoid duplicate key from database unique keys.
Expand Down

0 comments on commit c69f584

Please sign in to comment.