From da7b97042ea45388792ba8252a71536180270fd1 Mon Sep 17 00:00:00 2001 From: Allan Carr Date: Fri, 20 Sep 2024 15:19:24 -0700 Subject: [PATCH] IO-2928 Adjust accumulator in reducer for tax Signed-off-by: Allan Carr --- server/accounting/qbo/qbo-payables.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/accounting/qbo/qbo-payables.js b/server/accounting/qbo/qbo-payables.js index 30f5b1f62..c0673cbc5 100644 --- a/server/accounting/qbo/qbo-payables.js +++ b/server/accounting/qbo/qbo-payables.js @@ -221,7 +221,7 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor, bodyshop) Amount: Dinero({ amount: Math.round( bill.billlines.reduce((acc, val) => { - return acc + val.applicable_taxes?.federal ? (val.actual_cost * val.quantity ?? 0) : 0; + return acc + (val.applicable_taxes?.federal ? (val.actual_cost * val.quantity ?? 0) : 0); }, 0) * 100 ) })