IO-1342 Resolve negative parts discount for negatives.
This commit is contained in:
@@ -302,6 +302,7 @@ function GenerateCostingData(job) {
|
||||
})
|
||||
.multiply(val.part_qty || 0)
|
||||
.percentage(Math.abs(val.prt_dsmk_p || 0))
|
||||
.multiply(val.prt_dsmk_p > 0 ? 1 : -1)
|
||||
);
|
||||
if (!acc.parts[partsProfitCenter])
|
||||
acc.parts[partsProfitCenter] = Dinero();
|
||||
@@ -331,6 +332,7 @@ function GenerateCostingData(job) {
|
||||
})
|
||||
.multiply(val.part_qty || 0)
|
||||
.percentage(Math.abs(val.prt_dsmk_p || 0))
|
||||
.multiply(val.prt_dsmk_p > 0 ? 1 : -1)
|
||||
);
|
||||
|
||||
if (!acc.parts[partsProfitCenter])
|
||||
|
||||
Reference in New Issue
Block a user