BR-KSA-CL-06: Charge reason codes must come from UNTDID 7161
For every cac:AllowanceCharge with cbc:ChargeIndicator true that is not inside cac:Price (document-level and line-level charges), cbc:AllowanceChargeReasonCode (BT-105, BT-145) must be one of the UNTDID 7161 codes listed in the rule. The executed check is a substring match against that list; the test string displayed for the rule does not reflect it.
How to fix it
Use a listed code, e.g. <cbc:AllowanceChargeReasonCode>LF</cbc:AllowanceChargeReasonCode> in the charge.
ZATCA's official text
[BR-KSA-CL-06]-Code for the reason for document level charge (BT-105) and the code for the reason for invoice line charge (BT-145) MUST be coded using UNTDID 7161 code list. https://unece.org/fileadmin/DAM/trade/untdid/d16b/tred/tred7161.htm
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
not(contains( ' AA AAA AAC AAD AAE AAF AAH AAI AAS AAT AAV AAY AAZ ABA ABB ABC ABD ABF ABK ABL ABN ABR ABS ABT ABU ACF ACG ACH ACI ACJ ACK ACL ACM ACS ADC ADE ADJ ADK ADL ADM ADN ADO ADP ADQ ADR ADT ADW ADY ADZ AEA AEB AEC AED AEF AEH AEI AEJ AEK AEL AEM AEN AEO AEP AES AET AEU AEV AEW AEX AEY AEZ AJ AU CA CAB CAD CAE CAF CAI CAJ CAK CAL CAM CAN CAO CAPCAQ CAR CAS CAT CAU CAV CAW CD CG CS CT DAB DAD DL EG EP ER FAA FAB FAC FC FH FI GAA HAA HD HH IAA AB ID IF IR IS KO L1 LA LAA LAB LF MAE MI ML NAA OA PA PAA PC PL RAB RAC RAD RAF RE RF RH RV SA SAA SAD SAE SAI SG SH SM SU TAB AC TT TV V1 V2 WH XAA YY ZZZ ', cbc:AllowanceChargeReasonCode))
Related rules
- BR-KSA-19 · Each document-level charge needs a reason code
- BR-KSA-20 · Each invoice line charge needs a reason code
- BR-KSA-CL-02 · Every amount's currencyID must match the invoice currency
- BR-KSA-CL-03 · Attachment mimeCode must be one of the allowed types
- BR-KSA-CL-04 · VAT exemption reason code must fit the VAT category
- BR-KSA-CL-07 · Prepayment exemption reason code must fit its VAT category
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