Document-Level Allowance and Tax Totals in Phase 2 e-Invoice XML

Hello,

I need clarification regarding VAT calculation in the ZATCA Phase 2 e-invoice XML when the invoice includes multiple tax categories.

Scenario:

• I have three invoice line items.

• Two items are subject to 15% VAT.

• One item is subject to 0% VAT.

• A document-level allowance/discount is applied to the whole invoice.

My question is:

How should the document-level tax totals be calculated?

Specifically:

• After applying the document-level allowance, should the “Document-Level Tax Total” remain at 15%?

• Or should it become 0% because one of the items has 0% VAT?

I need confirmation on the correct ZATCA-compliant behavior for generating XML TaxTotal and TaxSubtotal nodes when mixing 15% and 0% items with document-level discounts.

Thank you.