|
@@ -171,7 +171,7 @@ $tmpbom->calculateCosts();
|
|
|
print '<td id="costline_'.$line->id.'" class="linecolcost nowrap right">';
|
|
|
$coldisplay++;
|
|
|
if (!empty($line->fk_bom_child)) {
|
|
|
- echo '<span class="amount">'.price($tmpbom->total_cost).'</span>';
|
|
|
+ echo '<span class="amount">'.price($tmpbom->total_cost * $line->qty).'</span>';
|
|
|
} else {
|
|
|
echo '<span class="amount">'.price($line->total_cost).'</span>';
|
|
|
}
|
|
@@ -269,16 +269,20 @@ if ($resql) {
|
|
|
$label = $sub_bom_product->getLabelOfUnit('long');
|
|
|
if ($sub_bom_line->qty_frozen > 0) {
|
|
|
print '<td class="linecolqty nowrap right" id="sub_bom_qty_'.$sub_bom_line->id.'">'.price($sub_bom_line->qty, 0, '', 0, 0).'</td>';
|
|
|
- print '<td class="linecoluseunit nowrap left">';
|
|
|
- if ($label !== '') print $langs->trans($label);
|
|
|
- print '</td>';
|
|
|
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
|
|
+ print '<td class="linecoluseunit nowrap left">';
|
|
|
+ if ($label !== '') print $langs->trans($label);
|
|
|
+ print '</td>';
|
|
|
+ }
|
|
|
print '<td class="linecolqtyfrozen nowrap right" id="sub_bom_qty_frozen_'.$sub_bom_line->id.'">'.$langs->trans('Yes').'</td>';
|
|
|
} else {
|
|
|
print '<td class="linecolqty nowrap right" id="sub_bom_qty_'.$sub_bom_line->id.'">'.price($sub_bom_line->qty * $line->qty, 0, '', 0, 0).'</td>';
|
|
|
- print '<td class="linecoluseunit nowrap left">';
|
|
|
- if ($label !== '') print $langs->trans($label);
|
|
|
- print '</td>';
|
|
|
- print '</td>';
|
|
|
+ if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
|
|
+ print '<td class="linecoluseunit nowrap left">';
|
|
|
+ if ($label !== '') print $langs->trans($label);
|
|
|
+ print '</td>';
|
|
|
+ }
|
|
|
+
|
|
|
print '<td class="linecolqtyfrozen nowrap right" id="sub_bom_qty_frozen_'.$sub_bom_line->id.'"> </td>';
|
|
|
}
|
|
|
|