IO1387 Add tax part override for non-R&R lines & Package Updates

This commit is contained in:
Patrick Fic
2021-09-30 17:48:31 -07:00
parent 2712ee5c0b
commit 63163c6459
5 changed files with 137 additions and 224 deletions

View File

@@ -100,7 +100,7 @@ export function JobsAvailableContainer({
}
//IO-539 Check for Parts Rate on PAL for SGI use case.
await CheckTaxRates(estData.est_data, bodyshop);
console.log(estData);
const newTotals = (
await Axios.post("/job/totals", {
job: {
@@ -395,10 +395,6 @@ function replaceEmpty(someObj, replaceValue = null) {
}
async function CheckTaxRates(estData, bodyshop) {
console.log(
"🚀 ~ file: jobs-available-table.container.jsx ~ line 398 ~ estData",
estData
);
//LKQ Check
if (
!estData.parts_tax_rates?.PAL ||
@@ -491,4 +487,18 @@ async function CheckTaxRates(estData, bodyshop) {
estData.parts_tax_rates.PAR.prt_tax_in = true;
}
}
//IO-1387 If a sublet line is NOT R&R, use the labor tax. If it is, use the sublet tax rate.
//Currently limited to SK shops only.
if (bodyshop.region_config === "CA_SK") {
estData.joblines.data.forEach((jl, index) => {
if (
(jl.part_type === "PASL" || jl.part_type === "PAS") &&
jl.lbr_op !== "OP11"
) {
estData.joblines.data[index].tax_part = jl.lbr_tax;
console.log(estData.joblines.data[index], jl);
}
});
}
}