2

What is the pattern of Netsuite when it comes to rounding off value in Purchase orders and Invoices.I need all the scenario that needs to be handled while rounding off values.For instance if the value of 123.987 will be rounded to 2 decimal digit value i.e123.99 Now since the value is 123.99 it again rounds it off to 124. Anymore scenario which i am not aware of, or which needs to be handled.

Thank you in advance

Rubein
  • 21
  • 1
  • 2

3 Answers3

1

See the other answers for general rounding.

The area where care needs to be taken is in scenario where your item rate is some value beyond 2 digits. Lets say your customer has negotiated a rate of $0.0756 per kg and you want to sell 1000 kg. You set a custom price level and set the rate to $0.0756 and the quantity to 1000. You think the extended line amount should be $75.60 but instead it will be $76.00. This is because the rate is a currency value in NS and it will only retain 2 decimal places so the amount is calculated as though the rate is $0.76/kg

This is the only rounding issue in Netsuite of which I am aware. Otherwise NS uses the same rounding algorithms as defined for Javascript (which can produce interesting rounding surprises - see Rounding quirk in JavaScript or IEEE-754? )

Community
  • 1
  • 1
bknights
  • 14,408
  • 2
  • 18
  • 31
0

What I got form the client tests.

  • 123.984 = 123.98
  • 123.985 = 123.99
  • 123.986 = 123.99

Currency values always work with two decimals.

Hope it helps.

felipechang
  • 916
  • 6
  • 14
0

You may want to have a look on nlapiFormatCurrency(str).

nlapiFormatCurrency('123.985');     // "123.99"
nlapiFormatCurrency('123.998');     // "123.99"
nlapiFormatCurrency('123.999');     // "124.00"
Rockstar
  • 2,228
  • 3
  • 20
  • 39