Merge branch 'release/2021-09-03' into feature/cdk-cert
This commit is contained in:
@@ -1453,7 +1453,7 @@
|
|||||||
"partstotal": "This is the total of all parts and sublet amounts on the vehicle (some of these may require an in-house invoice).<br/>\nItems such as shop and paint materials, labor online lines, etc. are not included in this total.",
|
"partstotal": "This is the total of all parts and sublet amounts on the vehicle (some of these may require an in-house invoice).<br/>\nItems such as shop and paint materials, labor online lines, etc. are not included in this total.",
|
||||||
"totalreturns": "The total amount of returns created for this job."
|
"totalreturns": "The total amount of returns created for this job."
|
||||||
},
|
},
|
||||||
"prt_dsmk_total": "Line Item Markup",
|
"prt_dsmk_total": "Line Item Adjustment",
|
||||||
"rates": "Rates",
|
"rates": "Rates",
|
||||||
"rates_subtotal": "All Rates Subtotal",
|
"rates_subtotal": "All Rates Subtotal",
|
||||||
"reconciliation": {
|
"reconciliation": {
|
||||||
|
|||||||
@@ -257,7 +257,9 @@ const generateInvoiceQbxml = (
|
|||||||
if (jobline.prt_dsmk_p && jobline.prt_dsmk_p !== 0) {
|
if (jobline.prt_dsmk_p && jobline.prt_dsmk_p !== 0) {
|
||||||
// console.log("Have a part discount", jobline);
|
// console.log("Have a part discount", jobline);
|
||||||
DineroAmount = DineroAmount.add(
|
DineroAmount = DineroAmount.add(
|
||||||
DineroAmount.percentage(jobline.prt_dsmk_p || 0)
|
DineroAmount.percentage(Math.abs(jobline.prt_dsmk_p || 0)).multiply(
|
||||||
|
jobline.prt_dsmk_p > 0 ? 1 : -1
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const account = responsibilityCenters.profits.find(
|
const account = responsibilityCenters.profits.find(
|
||||||
|
|||||||
@@ -301,7 +301,8 @@ function GenerateCostingData(job) {
|
|||||||
amount: Math.round((val.act_price || 0) * 100),
|
amount: Math.round((val.act_price || 0) * 100),
|
||||||
})
|
})
|
||||||
.multiply(val.part_qty || 0)
|
.multiply(val.part_qty || 0)
|
||||||
.percentage(val.prt_dsmk_p || 0)
|
.percentage(Math.abs(val.prt_dsmk_p || 0))
|
||||||
|
.multiply(val.prt_dsmk_p > 0 ? 1 : -1)
|
||||||
);
|
);
|
||||||
if (!acc.parts[partsProfitCenter])
|
if (!acc.parts[partsProfitCenter])
|
||||||
acc.parts[partsProfitCenter] = Dinero();
|
acc.parts[partsProfitCenter] = Dinero();
|
||||||
@@ -330,7 +331,8 @@ function GenerateCostingData(job) {
|
|||||||
amount: Math.round((val.act_price || 0) * 100),
|
amount: Math.round((val.act_price || 0) * 100),
|
||||||
})
|
})
|
||||||
.multiply(val.part_qty || 0)
|
.multiply(val.part_qty || 0)
|
||||||
.percentage(val.prt_dsmk_p || 0)
|
.percentage(Math.abs(val.prt_dsmk_p || 0))
|
||||||
|
.multiply(val.prt_dsmk_p > 0 ? 1 : -1)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!acc.parts[partsProfitCenter])
|
if (!acc.parts[partsProfitCenter])
|
||||||
|
|||||||
@@ -258,7 +258,8 @@ function CalculatePartsTotals(jobLines) {
|
|||||||
amount: Math.round((value.act_price || 0) * 100),
|
amount: Math.round((value.act_price || 0) * 100),
|
||||||
})
|
})
|
||||||
.multiply(value.part_qty || 0)
|
.multiply(value.part_qty || 0)
|
||||||
.percentage(value.prt_dsmk_p || 0)
|
.percentage(Math.abs(value.prt_dsmk_p || 0))
|
||||||
|
.multiply(value.prt_dsmk_p > 0 ? 1 : -1)
|
||||||
),
|
),
|
||||||
list: {
|
list: {
|
||||||
...acc.parts.list,
|
...acc.parts.list,
|
||||||
@@ -289,7 +290,8 @@ function CalculatePartsTotals(jobLines) {
|
|||||||
amount: Math.round((value.act_price || 0) * 100),
|
amount: Math.round((value.act_price || 0) * 100),
|
||||||
})
|
})
|
||||||
.multiply(value.part_qty || 0)
|
.multiply(value.part_qty || 0)
|
||||||
.percentage(value.prt_dsmk_p || 0)
|
.percentage(Math.abs(value.prt_dsmk_p || 0))
|
||||||
|
.multiply(value.prt_dsmk_p > 0 ? 1 : -1)
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -425,7 +427,8 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
amount: Math.round((val.act_price || 0) * 100),
|
amount: Math.round((val.act_price || 0) * 100),
|
||||||
})
|
})
|
||||||
.multiply(val.part_qty || 0)
|
.multiply(val.part_qty || 0)
|
||||||
.percentage(val.prt_dsmk_p || 0)
|
.percentage(Math.abs(val.prt_dsmk_p || 0))
|
||||||
|
.multiply(val.prt_dsmk_p > 0 ? 1 : -1)
|
||||||
)
|
)
|
||||||
.percentage(
|
.percentage(
|
||||||
((job.parts_tax_rates &&
|
((job.parts_tax_rates &&
|
||||||
|
|||||||
Reference in New Issue
Block a user