xeth_sdi
05/30/2022, 1:23 PMrec.setValue({
fieldId: 'taxamountoverride', // Error on values that are not 0 / 0.00 etc.
value: salesTaxAmountFixedFormat
})
Error:
{
"type": "error.SuiteScriptError",
"name": "ROUNDING_ERROR",
"message": "Rounding Error: 1",
"stack":
[
"Error\n at RecordInvoker.save (suitescript/resources/javascript/record/serverRecordService.js:371:13)\n at NetSuiteObject.thenableFunction() (suitescript/resources/javascript/record/proxy.js:115:24)\n at insertTax (/SuiteScripts/tax_tst.js:245:13)\n at Object.afterSubmit (/SuiteScripts/tax_tst.js:21:9)",
],
"cause":
{
"type": "internal error",
"code": "ROUNDING_ERROR",
"details": "Rounding Error: 1",
"userEvent": null,
"stackTrace":
[
"Error\n at RecordInvoker.save (suitescript/resources/javascript/record/serverRecordService.js:371:13)\n at NetSuiteObject.thenableFunction() (suitescript/resources/javascript/record/proxy.js:115:24)\n at insertTax (/SuiteScripts/tax_tst.js:245:13)\n at Object.afterSubmit (/SuiteScripts/tax_tst.js:21:9)",
],
"notifyOff": false,
},
"id": "",
"notifyOff": false,
"userFacing": true,
}
Things I tried:
• Change the format of the salesTaxAmount to a currency format (with 'N/format/i18n' module)
• Passing 1 / 1.0 / 1.00 as the value
• Using parseFloat(number).toPrecision() (passed 1 / 2 / 3)
Thanks in advance < 3battk
05/30/2022, 2:53 PMxeth_sdi
05/30/2022, 2:55 PMbattk
05/30/2022, 2:55 PMbattk
05/30/2022, 2:57 PMbattk
05/30/2022, 2:57 PMxeth_sdi
05/30/2022, 3:00 PMbattk
05/30/2022, 3:03 PMbattk
05/30/2022, 3:04 PMxeth_sdi
05/30/2022, 3:12 PMbattk
05/30/2022, 3:13 PMbattk
05/30/2022, 3:13 PMxeth_sdi
05/30/2022, 3:14 PMbattk
05/30/2022, 3:17 PMbattk
05/30/2022, 3:18 PMxeth_sdi
05/30/2022, 3:24 PMbattk
05/30/2022, 3:27 PMbattk
05/30/2022, 3:28 PMnot taxable
being the name of the default tax code for no taxesxeth_sdi
05/30/2022, 3:33 PMbattk
05/30/2022, 3:36 PMxeth_sdi
05/30/2022, 3:39 PMbattk
05/30/2022, 3:40 PMbattk
05/30/2022, 3:40 PMbattk
05/30/2022, 3:40 PMNot Taxable
tax code is not meant to be used to charge taxesxeth_sdi
05/30/2022, 3:44 PMxeth_sdi
05/30/2022, 3:45 PMbattk
05/30/2022, 3:45 PMxeth_sdi
05/30/2022, 3:52 PMbattk
05/30/2022, 4:21 PM