Handling Rounding Issues in ERP Invoice Line Calculations: Proposed Method and ZATCA Compliance

In our ERP system, the invoice line calculation is done in reverse. Users enter the quantity, total amount (including VAT), and discount amount. The system then calculates the unit price, amount before discount, amount after discount and VAT amount.

We face a recurring rounding issue with the formula:

Net Amount (BT-131) =
(Quantity (BT-129) * (Net Price (BT-146) / Price Base Quantity (BT-149))) + Charge Amount (BT-141) - Allowance Amount (BT-136)

To resolve this, we are considering setting the quantity as 1 and using the amount after discount as the unit price. This change would only apply in the XML sent to ZATCA, while the PDF would still display the original calculation.

Example 1: Current Method

  • Quantity: 5
  • Unit Price: 20
  • Amount: 100
  • Discount Amount: 10
  • Amount After Discount: 90
  • VAT Amount (15%): 13.50
  • Net Amount: 103.50

Example 2: Proposed Method (Quantity as 1)

  • Quantity: 1 (Constant)
  • Unit Price: 90 (Same as Amount After Discount)
  • Amount: 90
  • Discount Amount: 10
  • Amount After Discount: 90
  • VAT Amount (15%): 13.50
  • Net Amount: 103.50

Questions:

  1. Is this method valid for ZATCA compliance?
  2. Could using this method in XML while keeping the old method in the PDF cause any issues?

Any insights would be greatly appreciated!

@arjun_tech24 the values provided in XML and values displayed on human readable of invoice must be same. Your proposed method would most likely attract penalties. Please keep the values in XML same as per source ERP system.

Reverse calculation of VAT from final price (incl VAT) is not a new issue, this has been discussed and tested at length since pilot phase back in 2021. In this scenario there may be mathematical rounding difference of a halala per line which is not an issue and known to ZATCA. Many rules have been relaxed to accommodate such mathematical rounding difference. Please keep the values strictly as per source ERP system and do not manipulate the data.

1 Like

@Ankit_Tiwari
Thank you for your detailed response and guidance.
Your guidance is highly appreciated, and I will make sure the values are accurately maintained as per the source ERP system, without any alterations.