diff --git a/server/cdk/cdk-calculate-allocations.js b/server/cdk/cdk-calculate-allocations.js index f78c48b91..03f7addae 100644 --- a/server/cdk/cdk-calculate-allocations.js +++ b/server/cdk/cdk-calculate-allocations.js @@ -352,6 +352,7 @@ function calculateAllocations(connectionData, job) { // console.log("NO MASH ACCOUNT FOUND!!"); } } + if (InstanceManager({ rome: true })) { //profile level adjustments for parts Object.keys(job.job_totals.parts.adjustments).forEach((key) => { @@ -427,6 +428,41 @@ function calculateAllocations(connectionData, job) { } else { return { ...taxAllocations[key], tax: key }; } - }) + }), + + ...(job.job_totals.totals.ttl_adjustment + ? [ + { + center: "SUB ADJ", + sale: Dinero(job.job_totals.totals.ttl_adjustment), + cost: Dinero(), + profitCenter: { + name: "SUB ADJ", + accountdesc: "SUB ADJ", + accountitem: "SUB ADJ", + accountname: "SUB ADJ", + dms_acctnumber: bodyshop.md_responsibility_centers.ttl_adjustment.dms_acctnumber + }, + costCenter: {} + } + ] + : []), + ...(job.job_totals.totals.ttl_tax_adjustment + ? [ + { + center: "TAX ADJ", + sale: Dinero(job.job_totals.totals.ttl_tax_adjustment), + cost: Dinero(), + profitCenter: { + name: "TAX ADJ", + accountdesc: "TAX ADJ", + accountitem: "TAX ADJ", + accountname: "TAX ADJ", + dms_acctnumber: bodyshop.md_responsibility_centers.ttl_tax_adjustment.dms_acctnumber + }, + costCenter: {} + } + ] + : []) ]; }