BR-KSA-F-04: Invoice amounts and quantities must not be negative
Checks that listed amounts and quantities are >= 0 when they have a value: cac:LegalMonetaryTotal amounts, cac:TaxTotal/cbc:TaxAmount, cac:TaxSubtotal TaxAmount and TaxableAmount (taxable amount skipped for category 'O'), allowance/charge Amount and BaseAmount, line cbc:InvoicedQuantity, cac:Price/cbc:PriceAmount, line tax amounts and cac:TaxExchangeRate/cbc:CalculationRate. Zero is accepted.
How to fix it
Use positive or zero values in these elements, e.g. <cbc:InvoicedQuantity unitCode="PCE">2</cbc:InvoicedQuantity> rather than -2.
ZATCA's official text
[BR-KSA-F-04]-All the document amounts and quantities must be positive, unless specified otherwise.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
string-length(.) > 0 and not((.) >= 0)
Related rules
- BR-KSA-EN16931-12 · Item price base quantity must be greater than zero
- BR-KSA-F-01 · Dates must use the YYYY-MM-DD format
- BR-KSA-F-02 · Allowance/charge indicator must be 'false' or 'true'
- BR-KSA-F-05 · Prepayment issue time must be a valid hh:mm:ss time
- BR-KSA-F-07 · Buyer TIN must be 10 digits starting with 3
- BR-KSA-F-08 · Seller/buyer CRN must be exactly 10 digits
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