diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php
index b03d488e1b0..1bf02f13cad 100644
--- a/htdocs/bom/tpl/objectline_view.tpl.php
+++ b/htdocs/bom/tpl/objectline_view.tpl.php
@@ -184,6 +184,12 @@ if ($filtertype != 1) {
print '
';
$coldisplay++;
if ($res > 0) {
+ $unit = new CUnits($object->db);
+ $fk_defaultUnit = $unit->getUnitFromCode('h', 'short_label', 'time');
+ $nbPlannedHour = $unit->unitConverter($line->qty, $line->fk_unit, $fk_defaultUnit);
+ $line->total_cost = 0;
+ if ($workstation->thm_machine_estimated) $line->total_cost += $nbPlannedHour * $workstation->thm_machine_estimated;
+ if ($workstation->thm_operator_estimated) $line->total_cost += $nbPlannedHour * $workstation->thm_operator_estimated;
echo $workstation->getNomUrl(1);
}
print ' | ';
@@ -192,6 +198,7 @@ if ($filtertype != 1) {
// Cost
$total_cost = 0;
+
$tmpbom->calculateCosts();
print '';
$coldisplay++;
|