Closed Anas-Nabulsi closed 4 months ago
I am not sure what is causing the error but you can view the relevant validation criteria here:
You can just search this repo for those error codes and it will help you point you to the right direction.
Hey @Anas-Nabulsi, if you no longer need help with this please close this issue.
I have a confusion regarding how to handle discounts at the invoice level versus the line item level. Currently, applying the discount solely to the invoice line items without reflecting it at the document level doesn't trigger any warnings or errors. However, when the total discount from the invoice lines is added to the discount at the document level and allowance_total_amount, these warning appears in zatca response:
Despite there being only one discount amount per invoice line (in my case that I'm testing), this same discount amount is present in both "discount_amount" and "allowance_total_amount" at the document level so as per the documentation it's correct.
Here's the relevant part of the xml for the invoice that gets a pass without errors or warnings (notice discount is only on invoice line)
And this is the xml that gets the warnings mentioned