IO-1152 Add in part mark up for BC Economical claims.
This commit is contained in:
@@ -203,7 +203,8 @@ const generateInvoiceQbxml = (
|
||||
//Create the invoice lines mapping.
|
||||
jobs_by_pk.joblines.map((jobline) => {
|
||||
//Parts Lines
|
||||
if (jobline.db_ref === "936008") { //If either of these DB REFs change, they also need to change in job-totals calculations.
|
||||
if (jobline.db_ref === "936008") {
|
||||
//If either of these DB REFs change, they also need to change in job-totals calculations.
|
||||
hasMapaLine = true;
|
||||
}
|
||||
if (jobline.db_ref === "936007") {
|
||||
@@ -213,7 +214,15 @@ const generateInvoiceQbxml = (
|
||||
if (jobline.profitcenter_part && jobline.act_price) {
|
||||
const DineroAmount = Dinero({
|
||||
amount: Math.round(jobline.act_price * 100),
|
||||
}).multiply(jobline.part_qty || 1);
|
||||
})
|
||||
.multiply(jobline.part_qty || 1)
|
||||
.add(
|
||||
Dinero({
|
||||
amount: Math.round((jobline.act_price || 0) * 100),
|
||||
})
|
||||
.multiply(jobline.part_qty || 0)
|
||||
.percentage(jobline.prt_dsmk_p)
|
||||
);
|
||||
const account = responsibilityCenters.profits.find(
|
||||
(i) => jobline.profitcenter_part.toLowerCase() === i.name.toLowerCase()
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user