[*] BO : Add reduction groups in the categories, and bug fix: reduction that is not an integer or a percentage (TD001 - TD002 - TD003)

This commit is contained in:
lLefevre
2011-09-13 13:17:32 +00:00
parent 08c025e1bd
commit 2a1c7eb64d
5 changed files with 40 additions and 7 deletions
+12
View File
@@ -849,6 +849,18 @@ class CategoryCore extends ObjectModel
$groups[] = $group['id_group'];
return $groups;
}
public function addGroupsIfNoExist($id_group)
{
$groups = $this->getGroups();
p($groups);
foreach($groups as $group){
if($group != $id_group)
return false;
else
$this->addGroups(array((int)($id_group)));
}
}
/**
* checkAccess return true if id_customer is in a group allowed to see this category.