From 56190a51f1776ecdf0d16aba8b124d31f8206ba0 Mon Sep 17 00:00:00 2001 From: Nilesh Pant Date: Wed, 17 Jan 2024 11:07:18 +0530 Subject: [PATCH] add support for taxes in canadian orgs --- apps/netsuite/connector.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/netsuite/connector.py b/apps/netsuite/connector.py index f64634aa..d2bc74c7 100644 --- a/apps/netsuite/connector.py +++ b/apps/netsuite/connector.py @@ -1299,7 +1299,7 @@ def construct_credit_card_charge_lineitems( 'account': { 'internalId': line.account_id }, - 'amount': line.amount, + 'amount': line.amount - line.tax_amount if (line.tax_item_id and line.tax_amount is not None) else line.amount, 'memo': line.memo, 'grossAmt': line.amount, 'department': { @@ -1319,10 +1319,10 @@ def construct_credit_card_charge_lineitems( 'taxAmount': None, 'taxCode': { 'name': None, - 'internalId': None, + 'internalId': line.tax_item_id if (line.tax_item_id and line.tax_amount is not None) else None, 'externalId': None, 'type': 'taxGroup' - }, + }, } lines.append(line)