# BR-CL-19 Coded allowance reason must come from UNCL5189

When an allowance reason is coded (BT-98 at document level, BT-140 at line level), the code must belong to the UNCL5189 code list.

## Problem Description

When an allowance reason is coded (BT-98 at document level, BT-140 at line level), the code must belong to the UNCL5189 code list.

> **ERROR**: XRechnung 3.0

## Context and Significance

This EN16931 core code-list rule standardises why an amount is deducted, aiding automated posting.

## Solution

Set the allowance reason code to a UNCL5189 value such as 95 (discount) or 100 (special rebate); use the free-text reason field for anything not covered.

- validate
- convert

## Valid Examples

- BT-98 = 95 — discount
- BT-140 = 100 — special rebate at line level

## Invalid Examples

- BT-98 = DISC — free text instead of a code
- BT-98 = 9999 — not part of UNCL5189

## Code Examples

### Valid XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
</cac:AllowanceCharge>
```

### Invalid XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>DISC</cbc:AllowanceChargeReasonCode>
</cac:AllowanceCharge>
```

## Affected Fields

- [BT-98 Document level allowance reason code](/resources/xrechnung/bt-98-document-level-allowance-reason-code)
- [BT-140 Line level allowance reason code](/resources/xrechnung/bt-140-invoice-line-allowance-reason-code)

## Related Rules

- [BR-CL-20](/resources/kosit-validator-errors/br-cl-20-uncl7161-charge-reason)

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