I am using the Hotglue to post the journal entries...
# integrations
i
I am using the Hotglue to post the journal entries to the NetSuite account. But it is failing due to the debit not being equal to the credits. In my scenario, it will never be equal because of the tax codes. I have attached a file which includes the journal entry.
Copy code
10/30 07:33:44 pm

2025-10-30 14:33:44,334 - hotglue - INFO - (update_metadata) Started

10/30 07:33:44 pm

2025-10-30 14:33:44,480 - hotglue.export - DEBUG - INFO Starting netsuite connection

10/30 07:33:51 pm

2025-10-30 14:33:51,696 - hotglue.export - DEBUG - INFO Successfully created netsuite connection..

10/30 07:33:51 pm

2025-10-30 14:33:51,696 - hotglue.export - DEBUG - INFO Found JournalEntries.csv, uploading...

10/30 07:33:51 pm

2025-10-30 14:33:51,701 - hotglue.export - DEBUG - INFO Reading reference data from API...

10/30 07:33:53 pm

2025-10-30 14:33:53,169 - hotglue.export - DEBUG - INFO Getting Subsidiary: page 1

10/30 07:33:55 pm

2025-10-30 14:33:55,250 - hotglue.export - DEBUG - INFO Getting Account: page 1

10/30 07:34:06 pm

2025-10-30 14:34:06,984 - hotglue.export - DEBUG - INFO Getting SalesTaxItem: page 1

10/30 07:34:19 pm

2025-10-30 14:34:19,143 - hotglue.export - DEBUG - INFO Posting journal entry: {'createdDate': Timestamp('2025-09-17 00:00:00'), 'tranDate': Timestamp('2025-09-17 00:00:00'), 'externalId': 'Areeb JE 1', 'lineList': [{'account': {'name': 'Accounts Receivable - BK:', 'externalId': None, 'internalId': '119'}, 'debit': 110, 'memo': 'My Decs'}, {'account': {'name': 'Deferred Revenue', 'externalId': None, 'internalId': '3731'}, 'credit': 100, 'memo': 'My Decs', 'taxAccount': {'name': 'Accounts Receivable - BK:', 'internalId': '119', 'externalId': None}, 'lineTaxCode': {'name': 'VAT10 - Germany', 'internalId': '7022', 'externalId': None}, 'lineTaxRate': 10.0, 'creditTax': 10.0}], 'currency': {'name': 'GBP', 'externalId': None, 'internalId': '2'}, 'subsidiary': {'name': None, 'externalId': None, 'internalId': '1'}}

10/30 07:34:19 pm

2025-10-30 14:34:19,143 - hotglue.export - DEBUG - INFO Subsidiary: [{'name': 'Parent Company', 'parent': None, 'internalId': '1', 'externalId': None}]

10/30 07:34:19 pm

2025-10-30 14:34:19,144 - hotglue.export - DEBUG - INFO Currency: [OrderedDict([('nullFieldList', None), ('name', 'British pound'), ('symbol', 'GBP'), ('isBaseCurrency', False), ('isInactive', False), ('overrideCurrencyFormat', False), ('displaySymbol', '£'), ('symbolPlacement', '_beforeNumber'), ('locale', '_unitedKingdomEnglish'), ('formatSample', '£1,234.56'), ('exchangeRate', 1.31884), ('fxRateUpdateTimezone', None), ('inclInFxRateUpdates', None), ('currencyPrecision', '_two'), ('internalId', '2'), ('externalId', None)])]

10/30 07:34:19 pm

2025-10-30 14:34:19,144 - hotglue.export - DEBUG - INFO Accounts: [{'acctNumber': '119', 'acctName': 'Accounts Receivable - BK:', 'parent': None, 'subsidiaryList': [{'name': None, 'internalId': '1', 'externalId': None, 'type': None}], 'internalId': '119', 'externalId': None}, {'acctNumber': '219', 'acctName': 'Deferred Revenue', 'parent': None, 'subsidiaryList': [{'name': None, 'internalId': '1', 'externalId': None, 'type': None}], 'internalId': '3731', 'externalId': None}]

10/30 07:34:19 pm

2025-10-30 14:34:19,144 - hotglue.export - DEBUG - INFO Loaded 1 journal entries to post

10/30 07:34:19 pm

2025-10-30 14:34:19,145 - hotglue.export - DEBUG - INFO Posting journal: {'createdDate': Timestamp('2025-09-17 00:00:00'), 'tranDate': Timestamp('2025-09-17 00:00:00'), 'externalId': 'Areeb JE 1', 'lineList': [{'account': {'name': 'Accounts Receivable - BK:', 'externalId': None, 'internalId': '119'}, 'debit': 110, 'memo': 'My Decs'}, {'account': {'name': 'Deferred Revenue', 'externalId': None, 'internalId': '3731'}, 'credit': 100, 'memo': 'My Decs', 'taxAccount': {'name': 'Accounts Receivable - BK:', 'internalId': '119', 'externalId': None}, 'lineTaxCode': {'name': 'VAT10 - Germany', 'internalId': '7022', 'externalId': None}, 'lineTaxRate': 10.0, 'creditTax': 10.0}], 'currency': {'name': 'GBP', 'externalId': None, 'internalId': '2'}, 'subsidiary': {'name': None, 'externalId': None, 'internalId': '1'}}

10/30 07:34:19 pm

2025-10-30 14:34:19,145 - hotglue.export - DEBUG - INFO Posting JournalEntries now with 2 entries. ExternalId Areeb JE 1 tranDate 2025-09-17 00:00:00

10/30 07:34:30 pm

2025-10-30 14:34:30,251 - hotglue.export - DEBUG - ERROR Error posting journal entry: { 'nullFieldList': None, 'postingPeriod': None, 'tranDate': Timestamp('2025-09-17 00:00:00'), 'currency': { 'name': 'GBP', 'internalId': '2', 'externalId': None, 'type': None }, 'exchangeRate': None, 'tranId': None, 'reversalDate': None, 'reversalDefer': None, 'parentExpenseAlloc': None, 'isBookSpecific': None, 'accountingBook': None, 'reversalEntry': None, 'createdFrom': None, 'department': None, 'class': None, 'location': None, 'subsidiary': { 'name': None, 'externalId': None, 'internalId': '1' }, 'nexus': None, 'subsidiaryTaxRegNum': None, 'taxPointDate': None, 'memo': None, 'toSubsidiary': None, 'approved': None, 'createdDate': None, 'lastModifiedDate': None, 'customForm': None, 'lineList': { 'line': [ { 'account': { 'name': 'Accounts Receivable - BK:', 'internalId': '119', 'externalId': None, 'type': None }, 'line': None, 'debit': 110, 'credit': None, 'taxAccount': None, 'lineTaxCode': None, 'lineTaxRate': None, 'debitTax': None, 'creditTax': None, 'taxBasis': None, 'totalAmount': None, 'taxCode': None, 'memo': 'My Decs', 'taxRate1': None, 'entity': None, 'grossAmt': None, 'department': None, 'class': None, 'location': None, 'revenueRecognitionRule': None, 'eliminate': None, 'schedule': None, 'startDate': None, 'endDate': None, 'residual': None, 'scheduleNum': None, 'tax1Amt': None, 'tax1Acct': None, 'customFieldList': None }, { 'account': { 'name': 'Deferred Revenue', 'internalId': '3731', 'externalId': None, 'type': None }, 'line': None, 'debit': None, 'credit': 100, 'taxAccount': { 'name': 'Accounts Receivable - BK:', 'internalId': '119', 'externalId': None, 'type': None }, 'lineTaxCode': { 'name': 'VAT10 - Germany', 'internalId': '7022', 'externalId': None, 'type': None }, 'lineTaxRate': 10.0, 'debitTax': None, 'creditTax': 10.0, 'taxBasis': None, 'totalAmount': None, 'taxCode': None, 'memo': 'My Decs', 'taxRate1': None, 'entity': None, 'grossAmt': None, 'department': None, 'class': None, 'location': None, 'revenueRecognitionRule': None, 'eliminate': None, 'schedule': None, 'startDate': None, 'endDate': None, 'residual': None, 'scheduleNum': None, 'tax1Amt': None, 'tax1Acct': None, 'customFieldList': None } ], 'replaceAll': 'true' }, 'accountingBookDetailList': None, 'customFieldList': None, 'internalId': None, 'externalId': 'Areeb JE 1' }
b
I think you would need to to one debit line and two credit lines, one to deferred rev and one to the tax account , almost all systems require balanced JE's, netsuite included