Fixing style errors.

This commit is contained in:
stickler-ci 2022-02-17 09:53:02 +00:00
parent f16567a44a
commit 13cfe858f2
2 changed files with 7 additions and 7 deletions

View File

@ -518,7 +518,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Common attributes // Common attributes
$keyforbreak = 'duration'; $keyforbreak = 'duration';
include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/commonfields_view.tpl.php';
$object->calculateCosts(); $object->calculateCosts();
print '<tr><td>'.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCost")).'</td><td>'.price($object->total_cost).'</td></tr>'; print '<tr><td>'.$form->textwithpicto($langs->trans("TotalCost"), $langs->trans("BOMTotalCost")).'</td><td>'.price($object->total_cost).'</td></tr>';
print '<tr><td>'.$langs->trans("UnitCost").'</td><td>'.price($object->unit_cost).'</td></tr>'; print '<tr><td>'.$langs->trans("UnitCost").'</td><td>'.price($object->unit_cost).'</td></tr>';

View File

@ -192,9 +192,9 @@ if ($resql) {
$sub_bom_product->fetch($obj->fk_product); $sub_bom_product->fetch($obj->fk_product);
$sub_bom = new BOM($object->db); $sub_bom = new BOM($object->db);
if(!empty($obj->fk_bom_child)){ if (!empty($obj->fk_bom_child)) {
$sub_bom->fetch($obj->fk_bom_child); $sub_bom->fetch($obj->fk_bom_child);
} }
$sub_bom_line = new BOMLine($object->db); $sub_bom_line = new BOMLine($object->db);
$sub_bom_line->fetch($obj->rowid); $sub_bom_line->fetch($obj->rowid);
@ -236,11 +236,11 @@ if ($resql) {
// Efficiency // Efficiency
print '<td class="linecolefficiency nowrap right" id="sub_bom_efficiency_'.$sub_bom_line->id.'">'.$sub_bom_line->efficiency.'</td>'; print '<td class="linecolefficiency nowrap right" id="sub_bom_efficiency_'.$sub_bom_line->id.'">'.$sub_bom_line->efficiency.'</td>';
if(!empty($sub_bom->id)){ if (!empty($sub_bom->id)) {
$sub_bom->calculateCosts(); $sub_bom->calculateCosts();
print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'">'.price($sub_bom->total_cost * $sub_bom_line->qty * $line->qty).'</td>'; print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'">'.price($sub_bom->total_cost * $sub_bom_line->qty * $line->qty).'</td>';
$total_cost+= $sub_bom->total_cost * $sub_bom_line->qty * $line->qty; $total_cost+= $sub_bom->total_cost * $sub_bom_line->qty * $line->qty;
} elseif ($sub_bom_product->cost_price > 0) { } elseif ($sub_bom_product->cost_price > 0) {
print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'">'.price($sub_bom_product->cost_price * $sub_bom_line->qty * $line->qty).'</td>'; print '<td class="linecolcost nowrap right" id="sub_bom_cost_'.$sub_bom_line->id.'">'.price($sub_bom_product->cost_price * $sub_bom_line->qty * $line->qty).'</td>';
$total_cost+= $sub_bom_product->cost_price * $sub_bom_line->qty * $line->qty; $total_cost+= $sub_bom_product->cost_price * $sub_bom_line->qty * $line->qty;
} elseif ($sub_bom_product->pmp > 0) { // PMP if cost price isn't defined } elseif ($sub_bom_product->pmp > 0) { // PMP if cost price isn't defined