Hi dear ZATCA
We have a rounding issues which are caused the failures with ERROR status now. We would like to ask how to solve these (and similar) issues going forward.
The following numbers we got after calculation (not rounded)
TaxTotal.TaxAmount: 208.321956525 (208.32 in XML)
TaxExclusiveAmount: 1388.813043500 (1388.81 in XML)
TaxInclusiveAmount: 1597.135000025 (1597.14 in XML)
208.321956525 + 1388.813043500 == 1597.135000025
208.32 + 1388.81 != 1597.14
The question is: how we should handle this situation? Please note that it can happen on any other level which will end up in non-matching total/sum
According to the documentation the rounding should be applied on final value (as late as possible). We are applying rounding on final values when constructing XML. But in some cases we are getting these errors. Sometimes it is Warning (if mismatch in TaxTotal
) and now it is Error (mismatch in TaxInclusiveAmount
)
These are the official rounding rules:
Rules to minimize the risk of differences due to rounding as illustrated in the examples are:
- All document level totals shall be rounded to two decimals for accounting;
- Rounding shall be done on the final calculation results not on any intermediate results;
- VAT category tax amount (BT-110) shall be rounded on document level and not as a summation of rounded Invoice line VAT amounts.
Error we are getting:
...
"errorMessages": [
{
"type": "ERROR",
"code": "BR-CO-15",
"category": "EN_16931",
"message": "Invoice total amount with VAT (BT-112) ",
"status": "ERROR"
}
],
...
Best regards,
Sergei