Issue summary
Applying a gift certificate to an existing invoice through a CSV import (Invoice, Update) fails with:
Transaction was not in balance. Total = 250.0
The same gift certificate and amount can be applied to the same invoice manually in the UI, and it saves without error.
Example record
- Invoice external ID: NS12345
- Invoice total: 250.00
- Gift certificate code: 12345
- Amount applied: 200.00 (partial redemption)
Import setup
- Import type: Transactions → Invoice, data handling Update
- Field mapping: Invoice : External ID; Gift Certificate Redemption : Gift Certificate (reference by code); Gift Certificate Redemption : Amount Applied
- No item-line fields mapped
- "Overwrite Sublists" unticked
Troubleshooting already done
- Confirmed the gift certificate balance, customer, currency and subsidiary are valid. The posting period is open and the invoice's amount remaining is at least 200.
- Applied the gift certificate manually in the UI. It saved successfully.
- Re-ran the import with "Run Server SuiteScript and Trigger Workflows" unticked. Same error.
- Re-ran with Amount Applied unmapped so NetSuite would default the amount. Same error.
Observation
The imbalance (250.00) equals the invoice total, not the 200.00 being applied. So the invoice's lines appear not to post when the record is saved through a CSV import, while the same edit in the UI balances.