BR-KSA-F-12: Seller/buyer ID schemeID must not contain extra spaces

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

Warning: accepted with a warningConditional, see belowFields: BT-29-1, BT-46-1

Looks at the schemeID attribute of cac:Party/cac:PartyIdentification/cbc:ID for the seller and buyer. A warning is raised when the value, once spaces are normalised and it is upper-cased, is an allowed scheme (seller: CRN, MOM, MLS, 700, SAG, OTH; buyer: TIN, CRN, MOM, MLS, 700, SAG, NAT, GCC, IQA, OTH, PAS) but the raw attribute contains leading, trailing or repeated spaces. The test shown is the failure condition.

How to fix it

Write the schemeID with no surrounding spaces, e.g. <cbc:ID schemeID="CRN">…</cbc:ID> rather than schemeID=" CRN ".

ZATCA's official text

[BR-KSA-F-12] - The Other Seller/Buyer schema ID (BT-29-1 or BT-46-1) contains spaces. Please recheck the attribute and remove the empty space to avoid non-compliance.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules

Fails when (the condition ZATCA's SDK runs)

$scheme-raw and $scheme-up = $allowed-here and $scheme-raw != $scheme-trim

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