Hi All, I have client(AU) based who gets SO (USA ...
# suitescript
r
Hi All, I have client(AU) based who gets SO (USA customers - US tax) via shopify integration. It create the SO with a tax code of
10.25%
. We then manually invoice the line and the tax code reverts to
0.25%
(same tax code as SO .same address). The client has asked me to update the Invoice tax rate to match the SO line rate. This is to repair the data while we try to figure out why tax rate changed. I have tried to do a CSV import which didn't allow me to update it. Then I tried the Script (load and save) which gave me Internal Server Error. Question: Any idea how I can fix the invoice tax rate to match the SO rate (CSV or script wise) . P.S if I enter a SO line manually for the item it defaults to the tax rate that is shown on the invoice.
b
in general trying to change the tax rate is doomed, netsuite will take every chance to change it back
r
yeah getting error
TRANS_UNBALNCD'
b
you can theoretically use `taxamountoverride`field to disable netsuite's handling of taxes, but then you have to set all the tax related fields yourself on all related transactions
r
I was told I only need it update it 30 odd invoice that have this issue
b
to put into perspective how hard this is, its cumbersome enough that there are entire bundles related to this, and eventually suitetax was created to actually allow taxes to be changed
r
Copy code
var rec = nlapiLoadRecord(nlapiGetRecordType(), nlapiGetRecordId());

var taxRate = rec.getLineItemValue('item', 'taxrate1', 1);
console.log('taxRate', taxRate);

// set tax rate to 10.25
rec.setLineItemValue('item', 'taxrate1', 1, '10.25%');

nlapiSubmitRecord(rec);
This is the script i'm using in the console to see if this even works
do I set
taxamountoverride
on the line level first?
give me TRANS_UNBALNCD still
b
its a body level field
after that, you will need to update all the tax related amounts yourself
r
the rate and the amount on the line?
b
i dont think the rate actually matters anymore, but you probably want to set it anyways
r
Ok will try thank you
p
things you need to check why there’s an override: 1. Check the shipping/billing address of the transaction 2. Check the Nexus 3. Check the Tax Codes/Groups
r
I think the customer is not maintain his US tax code correctly. We ended up deleting the Invoices and reimported the SO and turned off line level tax. seems to have fix the issue