Merged in hotfix/2021-06-01 (pull request #87)

Emergency Hotfix for line markup issues. IO-1178
This commit is contained in:
Patrick Fic
2021-06-01 19:15:47 +00:00
8 changed files with 30 additions and 6 deletions

View File

@@ -314,7 +314,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();
@@ -343,7 +343,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 &&