BR-KSA-53: Each line needs a line amount with VAT (KSA-12) on standard invoices

Explained by Matheel from ZATCA's rule text and the condition SDK 3.4.8 executes · Updated

Error: the invoice is rejectedStandard tax invoices (B2B)Fields: KSA-12, KSA-2

For standard tax invoices and their notes (InvoiceTypeCode @name starting '01'), every cac:InvoiceLine must contain a non-empty cac:TaxTotal/cbc:RoundingAmount (KSA-12).

How to fix it

Add <cbc:RoundingAmount currencyID="…">…</cbc:RoundingAmount> inside each line's cac:TaxTotal, after cbc:TaxAmount.

ZATCA's official text

[BR-KSA-53]-The line amount with VAT (KSA-12) is mandatory for tax invoice and associated credit notes and debit notes (KSA-2, position 1 and 2 = 01).
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules

Fails when (the condition ZATCA's SDK runs)

not(every $line in //cac:InvoiceLine satisfies exists($line/cac:TaxTotal/cbc:RoundingAmount) and ($line/cac:TaxTotal/cbc:RoundingAmount) != '')

Related rules

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