# 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

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.

> **ERROR**: XRechnung 3.0

## Context and Significance

This is a core EN16931 rule; BT-106 is the starting point of the document total calculation chain, so it must be present.

## Solution

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

- validate
- convert

## 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://erechnungsvalidator.service-bw.de/): Validate your XRechnung files against all BR-DE rules.
- [Convert PDF to XRechnung](/pdf-to-xrechnung): Automatic validation error fixes when converting.

## Related Resources

- [Official Specification](https://xeinkauf.de/xrechnung/)
- [Test Suite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [Complete Error List](/resources/kosit-validator-errors): Overview of all German XRechnung validation rules.
