# BR-CO-05 Document allowance reason and code must agree

The document level allowance reason code (BT-98) and the document level allowance reason (BT-97) shall indicate the same type of allowance.

## Problem Description

> **ERROR**: EN 16931 calculation and consistency rule (BR-CO)

## Context and Significance

EN 16931 defines this rule, but its meaning cannot be checked by machine. The EN 16931 validation artefacts for UBL and CII that the KoSIT validator uses contain only a placeholder check for BR-CO-05 that always passes, so BR-CO-05 never appears in a validation report. The requirement still applies to the data: the buyer books the allowance by its code (BT-98) and reads the text (BT-97). A contradictory pair, such as code 95 (Discount) with the text "Late delivery penalty", leads to manual review or a disputed deduction.

## Solution

Make the free-text reason (BT-97) and the reason code (BT-98) describe the same allowance, for example code 95 (Discount) with the text "Volume discount". Choose the UNCL 5189 code first and use a text that matches its meaning.

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

## Valid Examples

- BT-98 = 95 (Discount) with BT-97 = "Volume discount"

## Invalid Examples

- BT-98 = 95 (Discount) with BT-97 = "Late delivery penalty"

## Code Examples

### Valid XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
  <cbc:AllowanceChargeReason>Volume discount</cbc:AllowanceChargeReason>
  <cbc:Amount currencyID="EUR">10.00</cbc:Amount>
  <cac:TaxCategory>
    <cbc:ID>S</cbc:ID>
    <cbc:Percent>19</cbc:Percent>
    <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
  </cac:TaxCategory>
</cac:AllowanceCharge>
```

### Invalid XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>false</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
  <cbc:AllowanceChargeReason>Late delivery penalty</cbc:AllowanceChargeReason>
  <cbc:Amount currencyID="EUR">10.00</cbc:Amount>
  <cac:TaxCategory>
    <cbc:ID>S</cbc:ID>
    <cbc:Percent>19</cbc:Percent>
    <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
  </cac:TaxCategory>
</cac:AllowanceCharge>
```

## Affected Fields

- [BT-97 Document level allowance reason](/resources/xrechnung/bt-97-document-level-allowance-reason)
- [BT-98 Document level allowance reason code](/resources/xrechnung/bt-98-document-level-allowance-reason-code)

## Related Rules

- [BR-CO-06](/resources/kosit-validator-errors/br-co-06-charge-reason-code-match)
- [BR-CO-21](/resources/kosit-validator-errors/br-co-21-document-allowance-reason-required)

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