BR-22: Each invoice line needs an invoiced quantity (BT-129)
Checks each cac:InvoiceLine / cac:CreditNoteLine for cbc:InvoicedQuantity. The check the validator actually executes is stricter than the displayed test: it fails when cbc:InvoicedQuantity is missing or its text is exactly '0', and it does not accept cbc:CreditedQuantity as a substitute (the displayed test accepts either element).
How to fix it
Add <cbc:InvoicedQuantity>1.00</cbc:InvoicedQuantity> to every line, and do not write the quantity as the bare value 0.
ZATCA's official text
[BR-22]-Each Invoice line (BG-25) shall have an Invoiced quantity (BT-129).
Source: ZATCA SDK 3.4.8 · EN 16931 (CEN) rules
Fails when (the condition ZATCA's SDK runs)
(not(exists(cbc:InvoicedQuantity)) or cbc:InvoicedQuantity/text() = '0')
Related rules
- BR-16 · Every invoice needs at least one invoice line (BG-25)
- BR-21 · Each invoice line needs a line identifier (BT-126)
- BR-24 · Each invoice line needs a line net amount (BT-131)
- BR-25 · Each invoice line needs an item name (BT-153)
- BR-26 · Each invoice line needs an item net price (BT-146)
- BR-CO-04 · Every invoice line needs a VAT category code
Validate your invoice against ZATCA's rules
Paste the XML and see every error and warning. It runs in your browser; the invoice goes nowhere.
Validate an invoice or try Matheel