SchemaGuard by Ironbark Digital · EN 16931 / Peppol / XRechnung Reference
← All 294 EN 16931 / Peppol Rules & Live Validator
FATAL Official EN 16931 / Peppol / CIUS Rule BT/BG Fields: BT-92, BT-93, BT-94

PEPPOL-EN16931-R040 — E-Invoice Validation Rule & Fix

Fixture ID: peppolAllowanceArithmetic · XPath: /ubl:Invoice/cac:AllowanceCharge[1]/cbc:Amount

1. Why This Rule Triggers (Diagnostic Message)

The document level allowance states an amount of 60.00 EUR, a base amount of 1000.00 and a percentage of 5%. Peppol requires the three to agree: 1000.00 x 5% = 50.00, and the difference here is 10.00. The tolerance is 0.02 in the invoice currency — tight, unlike the whole-unit tolerance EN 16931 allows on the VAT rules, because this is not a rounding-strategy question but a multiplication that either was or was not performed. The usual cause is a base amount that was updated when the line changed and an amount that was not. This is a Peppol BIS Billing 3.0 profile rule: it applies because profile is "peppol-bis-3". It does not apply to the en16931, xrechnung-ubl or xrechnung-cii profiles, whose validators will accept the same document.

2. How to Fix PEPPOL-EN16931-R040

Recompute allowances[0].amount as baseAmount x percentage / 100, rounded to two decimals — this package exports round2() for exactly that. If the amount is right and the base is stale, correct the base instead; if the adjustment is not proportional at all, remove both baseAmount and percentage and state the amount alone.

3. Valid Code / Payload Example

{ "amount": 50.00, "baseAmount": 1000.00, "percentage": 5 }
Test & Validate XML / JSON in Live SchemaGuard Validator →