NEW : Delete conf

This commit is contained in:
Adrien Raze 2021-08-23 14:43:17 +02:00
parent 6cd92ca829
commit e282feb397
2 changed files with 6 additions and 4 deletions

View File

@ -45,8 +45,6 @@ print "<thead>\n";
print '<tr class="liste_titre nodrag nodrop">';
print '<a id="show_all" href="#">'.img_picto('', 'folder-open', 'class="paddingright"').$langs->trans("ExpandAll").'</a>&nbsp;&nbsp;';
print '<a id="hide_all" href="#">'.img_picto('', 'folder', 'class="paddingright"').$langs->trans("UndoExpandAll").'</a>&nbsp;';
$form = new Form($object->db);
print $form->textwithpicto('', $langs->trans('CollapseBOMHelp'), 1, 'help', '');
// Adds a line numbering column
if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {

View File

@ -81,7 +81,7 @@ $coldisplay++;
$tmpproduct = new Product($object->db);
$tmpproduct->fetch($line->fk_product);
$tmpbom = new BOM($object->db);
$tmpbom->fetch($line->fk_bom_child);
$res = $tmpbom->fetch($line->fk_bom_child);
if (!empty($tmpbom->id)){
print '<a class="collapse_bom" id="collapse-'.$line->id.'" href="#">' . (empty($conf->global->BOM_SHOW_ALL_BOM_BY_DEFAULT) ? '(+)' : '(-)') . '&nbsp;</a>';
}
@ -193,7 +193,11 @@ if ($resql){
$sub_bom_line = new BOMLine($object->db);
$sub_bom_line->fetch($obj->rowid);
print '<tr style="display:none" class="sub_bom_lines" parentid="'.$line->id.'">';
if (empty($conf->global->BOM_SHOW_ALL_BOM_BY_DEFAULT)){
print '<tr style="display:none" class="sub_bom_lines" parentid="'.$line->id.'">';
} else {
print '<tr class="sub_bom_lines" parentid="'.$line->id.'">';
}
print '<td id="sub_bom_product_'.$sub_bom_line->id.'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'.$sub_bom_product->getNomUrl(1).'</td>';
if ($sub_bom_line->fk_bom_child > 0) {