# BR-12 Sum of Invoice line net amount is required

An invoice shall have the Sum of Invoice line net amount (BT-106), the total of all line net amounts before document allowances, charges and VAT.

## Problem Description

> **ERROR**: EN 16931 core business rule (CEN)

## Context and Significance

This is an EN 16931 core rule. BT-106 is the starting point of the document totals: the sum of all line net amounts (BR-CO-10). In UBL, cbc:LineExtensionAmount in cac:LegalMonetaryTotal is optional in the schema, so an export that writes only the tax-exclusive and payable totals passes the schema and fails on BR-12. In CII, BT-106 is ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:LineTotalAmount.

## Solution

Add cac:LegalMonetaryTotal/cbc:LineExtensionAmount equal to the sum of every line’s BT-131 net amount.

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

## Valid Examples

- BT-106 = 1000.00 — equals the sum of all line net amounts

## Invalid Examples

- cac:LegalMonetaryTotal has no cbc:LineExtensionAmount element

## Code Examples

### Valid XML
```
<cac:LegalMonetaryTotal>
  <cbc:LineExtensionAmount currencyID="EUR">1000.00</cbc:LineExtensionAmount>
  <cbc:TaxExclusiveAmount currencyID="EUR">1000.00</cbc:TaxExclusiveAmount>
</cac:LegalMonetaryTotal>
```

### Invalid XML
```
<cac:LegalMonetaryTotal>
  <cbc:TaxExclusiveAmount currencyID="EUR">1000.00</cbc:TaxExclusiveAmount>
  <cbc:PayableAmount currencyID="EUR">1190.00</cbc:PayableAmount>
</cac:LegalMonetaryTotal>
```

## Affected Fields

- [BT-106 Sum of Invoice line net amount](/resources/xrechnung/bt-106-sum-of-invoice-line-net-amount)

## Related Rules

- [BR-13](/resources/kosit-validator-errors/br-13-invoice-total-without-vat-required)
- [BR-CO-10](/resources/kosit-validator-errors/br-co-10-sum-of-line-net-amounts-must-equal-line-total)

## 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-tc434/)
- [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.
