IO-1178 Resolve line markup issues.

This commit is contained in:
Patrick Fic
2021-06-01 11:52:09 -07:00
parent bcec0cd902
commit d2bb7121cb
15 changed files with 59 additions and 12 deletions

View File

@@ -281,7 +281,7 @@ function GenerateCostingData(job) {
amount: Math.round((val.act_price || 0) * 100),
})
.multiply(val.part_qty || 0)
.percentage(val.prt_dsmk_p)
.percentage(val.prt_dsmk_p || 0)
);
if (!acc.parts[partsProfitCenter])
acc.parts[partsProfitCenter] = Dinero();
@@ -310,7 +310,7 @@ function GenerateCostingData(job) {
amount: Math.round((val.act_price || 0) * 100),
})
.multiply(val.part_qty || 0)
.percentage(val.prt_dsmk_p)
.percentage(val.prt_dsmk_p || 0)
);
if (!acc.parts[partsProfitCenter])

View File

@@ -217,7 +217,7 @@ function CalculatePartsTotals(jobLines) {
amount: Math.round((value.act_price || 0) * 100),
})
.multiply(value.part_qty || 0)
.percentage(value.prt_dsmk_p)
.percentage(value.prt_dsmk_p || 0)
),
list: {
...acc.parts.list,
@@ -248,7 +248,7 @@ function CalculatePartsTotals(jobLines) {
amount: Math.round((value.act_price || 0) * 100),
})
.multiply(value.part_qty || 0)
.percentage(value.prt_dsmk_p)
.percentage(value.prt_dsmk_p || 0)
),
},
};
@@ -382,7 +382,7 @@ function CalculateTaxesTotals(job, otherTotals) {
amount: Math.round((val.act_price || 0) * 100),
})
.multiply(val.part_qty || 0)
.percentage(val.prt_dsmk_p)
.percentage(val.prt_dsmk_p || 0)
)
.percentage(
((job.parts_tax_rates &&