mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 03:12:35 +01:00
FIX : Wrong price for BOM with warkstation (#31142)
* FIX : Wrong price for BOM with warkstation * FIX : PR returns
This commit is contained in:
@@ -184,6 +184,12 @@ if ($filtertype != 1) {
|
||||
print '<td class="linecolworkstation nowrap">';
|
||||
$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 '</td>';
|
||||
@@ -192,6 +198,7 @@ if ($filtertype != 1) {
|
||||
|
||||
// Cost
|
||||
$total_cost = 0;
|
||||
|
||||
$tmpbom->calculateCosts();
|
||||
print '<td id="costline_'.$line->id.'" class="linecolcost nowrap right">';
|
||||
$coldisplay++;
|
||||
|
||||
Reference in New Issue
Block a user