Hey, guys I encountered some critical technical is...
# suitescript
s
Hey, guys I encountered some critical technical issue while working on CSV import. Is there anyone know the solution, please note down. Thank you. Is It Possible to Programmatically Disable Tax Lookup Per Transaction When Using Advanced Tax? We are importing Sales Orders from Shopify via CSV. In Shopify: • VAT is already calculated. • Shopify is our legal source of tax calculation. • The VAT amount from Shopify must be preserved exactly. In NetSuite: • We are using Advanced Tax (Legacy Tax / Nexus-based tax). • “Enable Tax Lookup on Sales Transactions” is enabled. • Shipping addresses imported from Shopify are valid. • As a result, NetSuite automatically recalculates tax based on nexus and overrides the imported VAT amounts. Business Requirement For Sales Orders created via CSV import (identified by a custom field such as custbody_order_source = "Shopify Order by CSV"), we need: NetSuite to not recalculate tax • The system to accept the VAT amount provided in the CSV • The VAT amount to be stored as the actual tax amount per item line We cannot: • Disable Tax Lookup globally • Modify shipping addresses to avoid nexus determination • Create hundreds of custom tax codes to match Shopify • Add additional tax adjustment lines • Change our overall Advanced Tax configuration Technical Question Is there a supported way (via configuration or SuiteScript) to: 1. Disable automatic tax calculation on a per-transaction basis when Advanced Tax and Tax Lookup are enabled? 2. Programmatically override tax1amt and taxtotal fields without NetSuite recalculating them during save? 3. Prevent tax recalculation when a record is created via CSV import? If this is not supported, what is the recommended architecture when an external system (Shopify) is the authoritative tax engine and NetSuite is used only for financial reporting?
b
The one important piece of information while working with gross amounts is that there are 2 ways to calculate it
the first is that gross amount is set, and then the amount and tax amount are calculated from the tax rate
the second is that amount and tax amount are set, and the gross amount is calculated from the amount and tax amount
if you set a combination of gross amount and the other amounts, then the gross amount takes priority and the first method is used
If you don't want your tax amount to be overwritten, then you must use the second method and not set the gross amount. You can also theoretically change the tax rate, and set the gross amount, but thats essentially guaranteed to have rounding problems and will cause problems from partial amounts on related transactions
i dont think you will be able to get the tax total to not equal the sum of all the tax related lines while you have tax amounts on line items, but your only chance of doing so is using the
taxamountoverride
to set the tax total of the sales order.