# BR-31 Document level allowance amount is required

Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92).

## Problem Description

Each Document level allowance (BG-20) shall have a Document level allowance amount (BT-92).

> **ERROR**: XRechnung 3.0

## Context and Significance

This rule comes from the EN16931 core semantic model enforced by the KoSIT XRechnung 3.0.2 Schematron, ensuring invoices carry the mandatory data needed for automated processing.

## Solution

Add cbc:Amount to the document level cac:AllowanceCharge where cbc:ChargeIndicator is false.

- validate
- convert

## Valid Examples

- BT-92 = 20.00 on a document level allowance

## Invalid Examples

- Document allowance with reason but no BT-92 amount

## Code Examples

### Valid XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReason>Loyalty discount</cbc:AllowanceChargeReason>
  <cbc:Amount currencyID="EUR">20.00</cbc:Amount>
</cac:AllowanceCharge>
```

### Invalid XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReason>Loyalty discount</cbc:AllowanceChargeReason>
</cac:AllowanceCharge>
```

## Affected Fields

- [BT-92 Document level allowance amount](/resources/xrechnung/bt-92-document-level-allowance-amount)

## Related Rules

- [BR-32](/resources/kosit-validator-errors/br-32-document-allowance-vat-category-required)
- [BR-33](/resources/kosit-validator-errors/br-33-document-allowance-reason-required)
- [BR-36](/resources/kosit-validator-errors/br-36-document-charge-amount-required)

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