# PEPPOL-EN16931-R046 Item net price must equal item gross price minus item price discount

Under Peppol rule PEPPOL-EN16931-R046, whenever an invoice line states an item gross price in BT-148 (cbc:BaseAmount) and an item price discount in BT-147 (cbc:Amount), the item net price in BT-146 (cbc:PriceAmount) must satisfy the exact equality: net price = gross price − price discount. The rule applies only when the gross price is present, and the comparison uses exact decimal values with no rounding tolerance.

## Problem Description

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

## Context and Significance

Discrepancies between gross price, unit discount and net price trigger PEPPOL-EN16931-R046. Because the check has no rounding tolerance, a net price rounded to 2 decimals already fails when gross price and discount carry 4 decimals. The error also appears when a discount is exported in cbc:Amount but the net price still equals the gross price.

## Solution

In your ERP pricing configuration, compute the net unit price as the gross unit price minus the unit price discount before exporting, using the same decimal precision for all three values. In UBL 2.1, within <cac:Price>, make <cbc:PriceAmount> exactly equal to <cac:AllowanceCharge><cbc:BaseAmount> minus <cbc:Amount>. If you do not state a gross price, omit cbc:BaseAmount; R046 is then not evaluated.

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

## Valid Examples

- Gross price BT-148 = 100.00 EUR, Price discount BT-147 = 20.00 EUR, Net price BT-146 = 80.00 EUR
- Gross price BT-148 = 50.00 EUR, Price discount BT-147 = 5.00 EUR, Net price BT-146 = 45.00 EUR

## Invalid Examples

- Gross price 100.00 EUR minus discount 20.00 EUR exported with Net price = 85.00 EUR (Arithmetic mismatch)
- Price discount declared as 10.00 EUR but Net price equals Gross price without deduction

## Code Examples

### Valid XML
```
<cac:Price>
  <cbc:PriceAmount currencyID="EUR">80.00</cbc:PriceAmount>
  <cac:AllowanceCharge>
    <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
    <cbc:Amount currencyID="EUR">20.00</cbc:Amount>
    <cbc:BaseAmount currencyID="EUR">100.00</cbc:BaseAmount>
  </cac:AllowanceCharge>
</cac:Price>
```

### Invalid XML
```
<cac:Price>
  <cbc:PriceAmount currencyID="EUR">85.00</cbc:PriceAmount>
  <cac:AllowanceCharge>
    <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
    <cbc:Amount currencyID="EUR">20.00</cbc:Amount>
    <cbc:BaseAmount currencyID="EUR">100.00</cbc:BaseAmount>
  </cac:AllowanceCharge>
</cac:Price>
```

## Affected Fields

- [BT-146 Item net price](/resources/xrechnung/bt-146-item-net-price)
- [BT-148 Item gross price](/resources/xrechnung/bt-148-item-gross-price)
- [BT-147 Item price discount](/resources/xrechnung/bt-147-item-price-discount)
- [BG-29 Price details](/resources/xrechnung/bt-146-item-net-price)

## Related Rules

- [BR-24](/resources/kosit-validator-errors/br-24-invoice-line-net-amount-must-be-present)
- [PEPPOL-EN16931-R120](/resources/kosit-validator-errors/peppol-en16931-r120-line-net-amount-formula)

## 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.
