Scenario

A Restlet script used for importing orders populates ROUNDING_ERROR during the saving process of one order. When importing, the following data is passed for each line:

  • item
  • location
  • quantity
  • amount
  • taxcode

Solution

Based on one of the answers found on the internet (Reddit), it seems that setting taxtotal for items with istaxable=false can cause this error. However, this is not my case.

Finally, it turned out the issue was caused by an external system erroneously passing a line item with item=0, along with other values such as location and taxcode, triggering the ROUNDING_ERROR. The line item data is like:

{
“amount”: 129.99,
“item”: 0,
“location”: 213,
“quantity”: 1,
“taxcode”: “27421”
}

How strange it is! The error message should be “Item does not exist”. The ROUNDING_ERROR seems misguiding sometimes.

Last modified: 20/02/2024

Author

Comments

Write a Reply or Comment

Your email address will not be published.