IO-1342 Resolve negative parts discount crash on job totals.
This commit is contained in:
@@ -301,7 +301,7 @@ function GenerateCostingData(job) {
|
||||
amount: Math.round((val.act_price || 0) * 100),
|
||||
})
|
||||
.multiply(val.part_qty || 0)
|
||||
.percentage(val.prt_dsmk_p || 0)
|
||||
.percentage(Math.abs(val.prt_dsmk_p || 0))
|
||||
);
|
||||
if (!acc.parts[partsProfitCenter])
|
||||
acc.parts[partsProfitCenter] = Dinero();
|
||||
@@ -330,7 +330,7 @@ function GenerateCostingData(job) {
|
||||
amount: Math.round((val.act_price || 0) * 100),
|
||||
})
|
||||
.multiply(val.part_qty || 0)
|
||||
.percentage(val.prt_dsmk_p || 0)
|
||||
.percentage(Math.abs(val.prt_dsmk_p || 0))
|
||||
);
|
||||
|
||||
if (!acc.parts[partsProfitCenter])
|
||||
|
||||
Reference in New Issue
Block a user