Skip to content

Ironfang Finance - Rule reference

BR-DEC-02: Write the document allowance base amount with no more than two decimals

The cbc:BaseAmount of a document-level allowance has more than two digits after the decimal point. Write the base of the percentage discount with two.

EN 16931Fatal: the document is invalidAllowances and charges

On this page

The short answer

BR-DEC-02 fails when a document-level allowance, a cac:AllowanceCharge under the root with cbc:ChargeIndicator of false, gives its cbc:BaseAmount with more than two characters after the decimal point. Write the base amount of the discount with two decimals at most: 50.00, not 50.000.

The base amount is the figure a percentage discount is taken from, so it only appears beside cbc:MultiplierFactorNumeric. The recorded base of 50.000 for a 2 percent discount has the right value and one padding zero, and UBL-DT-01 reports the same cbc:BaseAmount beside this rule.

What the rule checks

The rule visits each allowance directly under the Invoice or CreditNote root, takes the text of its cbc:BaseAmount and counts the characters after the first full stop; three or more fail. A discount given as a fixed sum carries no base amount, so there is nothing to count and it passes.

Only the form of the base is tested, not whether it produces the allowance. When tried, a base of 50.004 reported this rule and UBL-DT-01 alone: 2 percent of it is 1.00008, which PEPPOL-EN16931-R040 accepts against the allowance of 1.00 because it allows 0.02 either way.

The indicator decides which rule counts a base amount. On a document charge, with cbc:ChargeIndicator of true, it belongs to BR-DEC-06; the gross price inside cac:Price is left alone by both rules and by UBL-DT-01. When tried, a price allowance of 1.000 on a gross price of 6.000 validated cleanly.

Fewer decimals are always fine. When tried, the base written as the whole number 50 validated.

TermMeaningUBL element
BT-93Document level allowance base amountcac:AllowanceCharge[cbc:ChargeIndicator = false]/cbc:BaseAmount

How an integration ends up here

Possible causes, from the shape of the rule rather than from measured usage:

  • The base is the subtotal the discount applies to, added up from line amounts kept at three or four decimals and written without rounding.
  • The allowance amount is rounded before it is written, but the base it came from is copied straight from the pricing engine.
  • A decimal column with a scale of three stores 50 as 50.000, and the serialiser writes the full scale.

How to fix it

  1. Round the base amount to two decimals where the discount is calculated, then apply the percentage to the rounded base.
  2. Write it to cbc:BaseAmount in the document-level cac:AllowanceCharge with at most two decimals and no whitespace.
  3. Round the allowance cbc:Amount to two decimals as well, and keep it within 0.02 of base times percentage over 100 so that PEPPOL-EN16931-R040 still agrees.
  4. If the discount is really a fixed sum, leave out both the base amount and the percentage rather than rounding a base nobody needs.

Validate your corrected invoice

Before and after

These are fragments, not complete documents. The complete synthetic documents they come from are linked below.

Fragment of the failing invoice: a 2 percent document discount whose base is written as 50.000

<cac:AllowanceCharge>
  <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
  <cbc:AllowanceChargeReason>Example document discount</cbc:AllowanceChargeReason>
  <cbc:MultiplierFactorNumeric>2</cbc:MultiplierFactorNumeric>
  <cbc:Amount currencyID="GBP">1.00</cbc:Amount>
  <cbc:BaseAmount currencyID="GBP">50.000</cbc:BaseAmount>
  <!-- tax category omitted from this fragment -->
</cac:AllowanceCharge>

Fragment of the corrected invoice: the same base written as 50.00

<cac:AllowanceCharge>
  <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
  <cbc:AllowanceChargeReason>Example document discount</cbc:AllowanceChargeReason>
  <cbc:MultiplierFactorNumeric>2</cbc:MultiplierFactorNumeric>
  <cbc:Amount currencyID="GBP">1.00</cbc:Amount>
  <cbc:BaseAmount currencyID="GBP">50.00</cbc:BaseAmount>
  <!-- tax category omitted from this fragment -->
</cac:AllowanceCharge>

The failing and corrected invoices differ in one element, the base amount of the document discount: 50.000 against 50.00. Both state the discount as 2 percent of that base, giving the allowance of 1.00 that the totals already use. The failing document reports BR-DEC-02 at the first cac:AllowanceCharge and UBL-DT-01 at its cbc:BaseAmount. UBL-DT-01 applies two decimals to every element named as an amount, cbc:BaseAmount included, and exempts only the item net price and the amounts of a price-level allowance, so an allowance base that breaks this rule breaks that one as well. The corrected invoice is the larger example with its discount restated as a percentage, and it validates with no findings.

What the validator reported

Recorded on phive 12.1.0 / phive-rules-peppol 4.5.6 / Saxon-HE 12.10, the engine behind the free validator, using synthetic data. A recorded result is regression evidence for these documents; it is not a certification.

Where it applies

  • Applies to UBL Invoice and CreditNote. When tried, a credit note with the same 2 percent document discount on a base of 50.000 reported the same two findings.
  • The limit is two decimals in every currency; currencyID is not read.
  • Peppol ties the base amount to the percentage: PEPPOL-EN16931-R041 requires a base when a percentage is given, and PEPPOL-EN16931-R042 requires a percentage when a base is given. In a document that passes Peppol, then, a base amount appears only on a percentage allowance.

Scope and source

Written for Peppol BIS Billing 3.0.21 (May 2026), EN 16931 1.3.16, as applied to UBL 2.1 Invoice and CreditNote documents. Other profiles, syntaxes and releases can define this identifier differently. Guidance version 2026-09-28.1: source checked 2026-09-28, explanation last updated 2026-09-28.

The official definition of BR-DEC-02 carries the normative wording and test. This page is our explanation of it, not a copy.

Guidance does not change the engine verdict. Fixing this finding does not mean the document passes every layer, and validation does not certify legal or tax compliance or transmit a document over Peppol.