# PEPPOL-EN16931-R120 Invoice line net amount must equal quantity multiplied by unit net price adjusted for line allowances and charges

Under Peppol rule PEPPOL-EN16931-R120, the invoice line net amount in BT-131 (LineExtensionAmount) must match the line pricing formula: LineExtensionAmount = InvoicedQuantity × (ItemNetPrice ÷ BaseQuantity) + Sum(LineCharges) − Sum(LineAllowances). The Peppol Schematron accepts a deviation of at most 0.02 to absorb rounding. Common causes of failure include dropping line-level discounts during XML conversion, rounding unit prices to 2 decimals too early, or not dividing by the item price base quantity (BT-149).

## Problem Description

> **ERROR**: Peppol BIS Billing 3.0 rule (OpenPeppol)

## Context and Significance

PEPPOL-EN16931-R120 fails as soon as the exported BT-131 deviates by more than 0.02 from the amount recalculated from quantity, net price, base quantity and line allowances and charges. Typical causes are a line allowance lost during conversion, a unit price rounded to 2 decimals too early, or a base quantity (BT-149) that was not divided by.

## Solution

In your ERP billing configuration or conversion pipeline, keep unit prices at full precision and include all line-level allowances and charges in the BT-131 calculation before rounding the line amount to 2 decimals; divide by the base quantity (BT-149) when it is set. In UBL 2.1, for quantity 2 at price 100.00 with a 10.00 line allowance, write <cbc:LineExtensionAmount currencyID="EUR">190.00</cbc:LineExtensionAmount>.

- [Validate XML](/en/xrechnung-validator?source=resource&rule=PEPPOL-EN16931-R120)
- [Convert invoice](/en/pdf-to-xrechnung?source=resource&rule=PEPPOL-EN16931-R120)

## Valid Examples

- Quantity 2 x Unit price 100.00 EUR minus Line allowance 10.00 EUR gives BT-131 = 190.00 EUR
- Quantity 50 x Unit price 1.2550 EUR (62.75 EUR) gives BT-131 = 62.75 EUR

## Invalid Examples

- Quantity 2 x Price 100.00 EUR minus Allowance 10.00 EUR = 190.00 EUR, but exported BT-131 is 200.00 EUR because line allowance was omitted from calculation
- Formula yields 190.00 EUR but BT-131 is exported as 189.90 EUR due to rounding truncation

## Code Examples

### Valid XML
```
<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="H87">2</cbc:InvoicedQuantity>
  <cbc:LineExtensionAmount currencyID="EUR">190.00</cbc:LineExtensionAmount>
  <cac:AllowanceCharge>
    <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
    <cbc:Amount currencyID="EUR">10.00</cbc:Amount>
  </cac:AllowanceCharge>
  <cac:Price>
    <cbc:PriceAmount currencyID="EUR">100.00</cbc:PriceAmount>
  </cac:Price>
</cac:InvoiceLine>
```

### Invalid XML
```
<cac:InvoiceLine>
  <cbc:ID>1</cbc:ID>
  <cbc:InvoicedQuantity unitCode="H87">2</cbc:InvoicedQuantity>
  <cbc:LineExtensionAmount currencyID="EUR">200.00</cbc:LineExtensionAmount>
  <cac:AllowanceCharge>
    <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
    <cbc:Amount currencyID="EUR">10.00</cbc:Amount>
  </cac:AllowanceCharge>
  <cac:Price>
    <cbc:PriceAmount currencyID="EUR">100.00</cbc:PriceAmount>
  </cac:Price>
</cac:InvoiceLine>
```

## Affected Fields

- [BT-131 Invoice line net amount](/resources/xrechnung/bt-131-invoice-line-net-amount)
- [BT-129 Invoiced quantity](/resources/xrechnung/bt-129-invoice-line-quantity)
- [BT-146 Item net price](/resources/xrechnung/bt-146-item-net-price)
- [BG-25 Invoice line](/resources/xrechnung/bt-126-invoice-line-identifier)

## Related Rules

- [BR-22](/resources/kosit-validator-errors/br-22-invoice-line-quantity-must-be-present)
- [BR-24](/resources/kosit-validator-errors/br-24-invoice-line-net-amount-must-be-present)
- [PEPPOL-EN16931-R046](/resources/kosit-validator-errors/peppol-en16931-r046-item-net-price-math)

## Validation Tools

- [Official KoSIT Validator](https://github.com/itplr-kosit/validator): Run the official KoSIT validator with the XRechnung configuration to check EN 16931 and XRechnung rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Find validation errors during conversion and review each correction.

## Related Resources

- [Official Specification](https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-peppol/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [All validation errors](/resources/kosit-validator-errors): Overview of the EN 16931, XRechnung and Peppol validation rules explained here.
