BR-KSA-EN16931-03: Allowance/charge amount must equal base amount × percentage / 100
For each document-level or line-level cac:AllowanceCharge that has both cbc:Amount and cbc:BaseAmount, cbc:Amount must equal cbc:BaseAmount × cbc:MultiplierFactorNumeric / 100. The executed check rounds the computed value to two decimals and compares it with cbc:Amount formatted to two decimals; the published test expression shows an exact comparison.
How to fix it
Calculate cbc:Amount from the base and the percentage and round to two decimals: base 200.00 with <cbc:MultiplierFactorNumeric>10</cbc:MultiplierFactorNumeric> needs <cbc:Amount currencyID="SAR">20.00</cbc:Amount>. If the allowance or charge is not percentage-based, leave out both cbc:BaseAmount and cbc:MultiplierFactorNumeric.
ZATCA's official text
[BR-KSA-EN16931-03]-Allowance/Charge amount (BT-92, BT-99, BT-136, BT-141) must equal base amount (BT-93, BT-100, BT-137, BT-142) * percentage (BT-94, BT-101, BT-138, BT-143) / 100 if base amount and percentage exists.
Source: ZATCA SDK 3.4.8 · ZATCA KSA rules
Fails when (the condition ZATCA's SDK runs)
string-length(./cbc:Amount) > 0 and string-length(./cbc:BaseAmount) > 0 and not ( format-number(./cbc:Amount,'#.00') = format-number(( floor((((./cbc:BaseAmount * ./cbc:MultiplierFactorNumeric) div 100) * 100 + 0.5)) div 100), '#.00'))
Related rules
- BR-31 · Each document-level allowance needs an amount (BT-92)
- BR-36 · Each document-level charge needs an amount (BT-99)
- BR-41 · Each line-level allowance needs an amount (BT-136)
- BR-43 · Each line-level charge needs an amount (BT-141)
- BR-CO-11 · Allowance total must equal the sum of document-level allowances
- BR-CO-12 · Charge total must equal the sum of document-level charges
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