BR-KSA-EN16931-03: Allowance/charge amount must equal base amount × percentage / 100

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-92, BT-99, BT-136, BT-141, BT-93, BT-100, BT-137, BT-142, BT-94, BT-101, BT-138, BT-143

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

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