Question Regarding Document-Level Discount After VAT in ZATCA XML Calculation

@Ankit_Tiwari , @idaoud
We are implementing ZATCA e-invoicing (Phase 2) and would like clarification regarding the handling of document-level discounts.

Our client has a business practice where the document-level discount is applied after VAT calculation, meaning the discount is subtracted from the Amount With VAT — not from the net amount before VAT.

This approach was followed before ZATCA integration, and the client would like to continue the same practice after integration as well.

:blue_circle: Is this “discount-after-VAT” approach compliant with ZATCA Phase 2 XML specifications and validation rules?
If not, what is the compliant method to represent this scenario in the invoice XML?

Here is an example of the calculation:

Invoice Lines:
Line 1: Unit Price = 100.00, Quantity = 1, Line Total (Excl. VAT) = 100.00, VAT (15%) = 15.00, Amount with VAT = 115.00  
Line 2: Unit Price = 100.00, Quantity = 2, Line Total (Excl. VAT) = 200.00, VAT (15%) = 30.00, Amount with VAT = 230.00

Invoice Totals:
Total Excluding VAT:           300.00  
Total VAT Amount:              45.00  
Total Amount With VAT:         345.00  
Document-Level Discount:       20.00   (applied after VAT)  
Net Payable:                   325.00

@arjun_tech24 the amount towards “Document level discount (BT-92)” must be provided excluding VAT. Please go through the formula for calculation of VAT Breakdown in para 9.6 of XML Implementation Standard, it states that for every VAT category, there should be one sub-total which should be calculated as follows:

VAT category taxable amount (BT-116) = ∑(Invoice line net amounts (BT-131)) + Document level charge amount (BT-99) − Document level allowance amount (BT-92)

VAT category tax amount (BT-117) = VAT category taxable amount (BT-116) × (VAT rate (BT-119) ÷ 100