diff --git a/htdocs/bom/bom_net_needs.php b/htdocs/bom/bom_net_needs.php index f6644590a2e..0a1b0d367ad 100644 --- a/htdocs/bom/bom_net_needs.php +++ b/htdocs/bom/bom_net_needs.php @@ -214,6 +214,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print ''.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").' '; } print ''; + if ($action == 'treeview') print ''.$langs->trans('ProducedBy').''; print ''.$langs->trans('Quantity').''; print ''.$form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1).''; print ''.$form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc")).''; @@ -226,13 +227,17 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea foreach ($TChildBom as $fk_bom => $TProduct) { $repeatChar = ' '; if (!empty($TProduct['bom'])) { + $prod = new Product($db); + $prod->fetch($TProduct['bom']->fk_product); if ($TProduct['parentid'] != $object->id) print ''; else print ''; - print ''.str_repeat($repeatChar, $TProduct['level']).$TProduct['bom']->getNomUrl(1); + if ($action == 'treeview') print ''.str_repeat($repeatChar, $TProduct['level']).$prod->getNomUrl(1); + else print ''.str_repeat($repeatChar, $TProduct['level']).$TProduct['bom']->getNomUrl(1); print ' '; print img_picto('', 'folder-open'); print ''; print ''; + if ($action == 'treeview') print ''.$TProduct['bom']->getNomUrl(1).''; print ''.$TProduct['qty'].''; print ''; print ''; @@ -247,6 +252,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($fk_bom != $object->id) print ''; else print ''; print ''.str_repeat($repeatChar, $TInfos['level']).$prod->getNomUrl(1).''; + if ($action == 'treeview') print ''; print ''.$TInfos['qty'].''; print ''.price2num($prod->stock_reel, 'MS').''; print ''.$prod->stock_theorique.''; @@ -290,20 +296,30 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea