Merge branch 'NEW_stock_categories' of github.com:atm-quentin/dolibarr into NEW_stock_categories

This commit is contained in:
atm-quentin 2019-09-19 16:43:49 +02:00
commit a46ed62e81
2 changed files with 4 additions and 4 deletions

View File

@ -454,7 +454,7 @@ else
// Categories
if($conf->categorie->enabled) {
print '<tr><td valign="middle">'.$langs->trans("Categories").'</td><td colspan="3">';
print $form->showCategories($object->id,'stock',1);
print $form->showCategories($object->id, 'stock', 1);
print "</td></tr>";
}
print "</table>";
@ -734,7 +734,7 @@ else
print '<tr><td class="tdtop">'.$langs->trans("Categories").'</td><td colspan="3">';
$cate_arbo = $form->select_all_categories(Categorie::TYPE_STOCK, '', 'parent', 64, 0, 1);
$c = new Categorie($db);
$cats = $c->containing($object->id,Categorie::TYPE_STOCK);
$cats = $c->containing($object->id, Categorie::TYPE_STOCK);
$arrayselected=array();
foreach($cats as $cat) {
$arrayselected[] = $cat->id;

View File

@ -854,7 +854,8 @@ class Entrepot extends CommonObject
* @param int[]|int $categories Category or categories IDs
* @return void
*/
public function setCategories($categories) {
public function setCategories($categories)
{
// Handle single category
if (! is_array($categories)) {
$categories = array($categories);
@ -888,5 +889,4 @@ class Entrepot extends CommonObject
return;
}
}