PEPPOL-EN16931-R120fatal

How to fix PEPPOL-EN16931-R120

Invoice line net amount MUST equal (Invoiced quantity * (Item net price/item price base quantity) + Sum of invoice line charge amount - sum of invoice line allowance amount.

What this rule checks

PEPPOL-EN16931-R120 checks the arithmetic of every invoice line. The Invoice line net amount (BT-131, cbc:LineExtensionAmount) must equal the invoiced quantity (BT-129) times the item net price (BT-146) divided by the price base quantity (BT-149), plus the line charges, minus the line allowances. The validator accepts a difference of up to 0.02. If the base quantity is missing, it counts as 1. On a credit note, cbc:CreditedQuantity is used instead of cbc:InvoicedQuantity. This rule is not the same as PEPPOL-EN16931-R130, which only compares unit codes.

How to fix it

Ensure cbc:LineExtensionAmount = cbc:InvoicedQuantity * (cac:Price → cbc:PriceAmount / cac:Price → cbc:BaseQuantity) + line charges - line allowances. Correct any value that breaks this equation.

Common causes

  • The price is per 100 or per 1000 units (cbc:BaseQuantity), but the line amount was calculated as quantity × price.
  • Line allowances or charges (cac:InvoiceLine/cac:AllowanceCharge) were not deducted or added, or were applied twice.
  • A price-level discount (cac:Price/cac:AllowanceCharge) was deducted again from the line amount. cbc:PriceAmount is already the net price after that discount.
  • The unit price has many decimals and the line amount was rounded from a different value, so the difference is more than 0.02.

Example: before (broken)

<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="KGM">250</cbc:InvoicedQuantity>
  <!-- 250 × 12.00 - 5.00: the base quantity of 100 is ignored -->
  <cbc:LineExtensionAmount currencyID="EUR">2995.00</cbc:LineExtensionAmount>
  <cac:AllowanceCharge>
    <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
    <cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
    <cbc:Amount currencyID="EUR">5.00</cbc:Amount>
  </cac:AllowanceCharge>
  <cac:Price>
    <cbc:PriceAmount currencyID="EUR">12.00</cbc:PriceAmount>
    <cbc:BaseQuantity unitCode="KGM">100</cbc:BaseQuantity>
  </cac:Price>
</cac:InvoiceLine>

Example: after (fixed)

<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="KGM">250</cbc:InvoicedQuantity>
  <!-- 250 × (12.00 / 100) - 5.00 = 25.00 -->
  <cbc:LineExtensionAmount currencyID="EUR">25.00</cbc:LineExtensionAmount>
  <cac:AllowanceCharge>
    <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
    <cbc:AllowanceChargeReason>Discount</cbc:AllowanceChargeReason>
    <cbc:Amount currencyID="EUR">5.00</cbc:Amount>
  </cac:AllowanceCharge>
  <cac:Price>
    <cbc:PriceAmount currencyID="EUR">12.00</cbc:PriceAmount>
    <cbc:BaseQuantity unitCode="KGM">100</cbc:BaseQuantity>
  </cac:Price>
</cac:InvoiceLine>

Related rules

Rule sets

PEPPOL-EN16931-R120 is in these rule sets. Each page lists all its rules and the pinned version.

Validate your invoice

Upload your corrected invoice to check it passes PEPPOL-EN16931-R120 and all other EN 16931 and Peppol BIS 3.0 rules. Free, instant, no signup.