From 4ca686126aaf8b3903f8183b14b42d9faf56b5ea Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Mon, 15 Jul 2024 16:53:48 -0700 Subject: [PATCH] IO-2843 State Tax for QBO_USA and Region CA_ Signed-off-by: Allan Carr --- server/accounting/qb-receivables-lines.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/server/accounting/qb-receivables-lines.js b/server/accounting/qb-receivables-lines.js index 69818343e..e2437dca1 100644 --- a/server/accounting/qb-receivables-lines.js +++ b/server/accounting/qb-receivables-lines.js @@ -632,7 +632,7 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes } } - //QB USA with GST + //QB USA with GST and PST //This was required for the No. 1 Collision Group. if ( bodyshop.accountingconfig && @@ -651,6 +651,17 @@ exports.default = function ({ bodyshop, jobs_by_pk, qbo = false, items, taxCodes Qty: 1 } }); + InvoiceLineAdd.push({ + DetailType: "SalesItemLineDetail", + Amount: Dinero(jobs_by_pk.job_totals.totals.state_tax).toFormat(DineroQbFormat), + SalesItemLineDetail: { + ...(jobs_by_pk.class ? { ClassRef: { value: classes[jobs_by_pk.class] } } : {}), + ItemRef: { + value: items[bodyshop.md_responsibility_centers.taxes.state.accountitem] + }, + Qty: 1 + } + }); } } else { //Handle insurance profile adjustments