Lee Brookes
10/10/2024, 9:03 AMCeligo AI
10/10/2024, 9:03 AMAI generated answer (using internal Slack threads):In NetSuite, the number of decimal places used for calculations is system-wide and cannot be increased beyond the default 19 decimal places. This is a limitation of the system and applies to all calculations, including currency conversions. For rounding in NetSuite, you can use the
ROUND (n, integer)
function, but this is only applicable for saved searches and cannot be applied system-wide.
In the context of SuiteScript, if you're encountering a rounding error when trying to save a sales order, it could be due to the way you're handling decimal numbers. If you're dealing with a SuiteTax enabled account, you might want to modify the fields on the tax details subtab.
In your script, when setting the 'total' and 'taxtotal' fields, you might want to parse the values to ensure they're treated as floating point numbers. For example, you could use parseFloat(salesTaxAmount) + parseFloat(totalPrice);
instead of salesTaxAmount + totalPrice;
.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
10/10/2024, 9:03 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.821414351
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.816784
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811377525
Celigo AI
10/10/2024, 9:03 AM