PEPPOL-EN16931-R040
Allowance/charge amount must equal base amount * percentage/100 if base amount and percentage exists
ErrorXRechnungUBLCII
The official rule
EN 16931, EnglishAllowance/charge amount must equal base amount * percentage/100 if base amount and percentage exists
Technical detail — where the rule is evaluated and the exact test
| Syntax | Context and assertion |
|---|---|
| UBL | ubl-invoice:Invoice/cac:AllowanceCharge | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge | ubl-creditnote:CreditNote/cac:AllowanceCharge | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge |
not(cbc:MultiplierFactorNumeric and cbc:BaseAmount) or u:slack(if (cbc:Amount) then cbc:Amount else 0, (xs:decimal(cbc:BaseAmount) * xs:decimal(cbc:MultiplierFactorNumeric)) div 100, $slackValue) | |
| CII | ram:SpecifiedTradeAllowanceCharge |
not(ram:CalculationPercent and ram:BasisAmount) or u:slack(if (ram:ActualAmount) then ram:ActualAmount else 0, (xs:decimal(ram:BasisAmount) * xs:decimal(ram:CalculationPercent)) div 100, $slackValue) |
This page reproduces the official rule text and its technical definition. A written explanation has not been added yet — tell us you hit this rule and we will write one up.
Check your own invoice
Paste or drop your UBL or CII file into the free validator. It runs the official EN 16931 ruleset plus the German XRechnung layer and lists every rule that fires, PEPPOL-EN16931-R040 included — no signup, no limit.
Validate an e-invoice freeFixing the data at source instead? The CSV converter builds a compliant invoice from a spreadsheet export.