IO-2928 QBO CA US Tax Accumulator

Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
Allan Carr
2024-09-12 16:27:43 -07:00
parent 40f61bbc8f
commit 7b420b1855

View File

@@ -219,7 +219,7 @@ async function InsertBill(oauthClient, qbo_realmId, req, bill, vendor, bodyshop)
Amount: Dinero({
amount: Math.round(
bill.billlines.reduce((acc, val) => {
return acc + val.actual_cost * val.quantity;
return acc + val.applicable_taxes?.federal ? val.actual_cost * val.quantity : 0;
}, 0) * 100
)
})