BR-KSA-99: Buyer VAT number must not be empty when the element is present
For standard tax invoices and their notes (KSA-2 @name starting 01), if cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID (BT-48) is present, its trimmed value must not be empty. The test string shown for the rule is malformed; this describes the executed condition.
How to fix it
Fill cbc:CompanyID with the buyer's VAT number, or remove the empty element (BR-KSA-81 then requires another buyer ID in cac:PartyIdentification/cbc:ID).
ZATCA's official text
If it exists in the invoice, the buyer VAT registration number or buyer group VAT registration number (BT-48) should not be left empty in the 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)
normalize-space(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID) = '' and (exists(//cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID))
Related rules
- BR-CUSTOM-VALIDATION-01 · Seller and buyer VAT numbers must not be the same
- BR-KSA-06 · Invoice transaction code (name attribute) must follow NNPNESB
- BR-KSA-07 · Export invoices cannot be self-billed
- BR-KSA-10 · Standard invoices need buyer street, city and country code
- BR-KSA-15 · Standard tax invoices (388) need a supply date
- BR-KSA-25 · Simplified invoice with EDU/HEA exemption needs the buyer name
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