# BR-CO-24 Line charge needs a reason or reason code

Each invoice line charge (BG-28) shall contain an invoice line charge reason (BT-144) or an invoice line charge reason code (BT-145), or both.

## Problem Description

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

> **Where BR-CO-24 is checked**
>
> A validator checks an e-invoice in stages. First the file must be well-formed XML that matches the UBL or CII schema (XSD). Then the EN 16931 business rules run: BR core rules, BR-CO calculations, BR-CL code lists, BR-DEC decimals and VAT-category rules such as BR-S. Next come the national or network rules that BT-24 selects: BR-DE for XRechnung, PEPPOL-EN16931 for Peppol BIS Billing. The report lists every failed rule: one error means reject, warnings alone still mean accept. BR-CO-24: EN 16931 calculation rule, reported in the stage “EN 16931 rules”.

## Solution

For every invoice line charge, add a reason (BT-144) and/or a reason code (BT-145): cbc:AllowanceChargeReason / cbc:AllowanceChargeReasonCode in cac:InvoiceLine/cac:AllowanceCharge in UBL, ram:Reason / ram:ReasonCode in ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeAllowanceCharge in CII.

- [Check XML for free](/en/xrechnung-validator)

## Context and Significance

This rule is the line-level counterpart of BR-CO-22: every invoice line charge (UBL: cac:InvoiceLine/cac:AllowanceCharge with cbc:ChargeIndicator = true) needs a reason or a reason code, for example ABL (Additional packaging). The error often occurs when surcharges such as extra packaging or small-quantity fees are exported only as an amount on the line.

## Valid Examples

- Line charge with BT-145 = ABL and BT-144 = "Special packaging"

## Invalid Examples

- Line charge amount 3.00 with neither BT-144 nor BT-145

## Code Examples

### Valid XML
```
<cac:InvoiceLine>
  <cac:AllowanceCharge>
    <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
    <cbc:AllowanceChargeReasonCode>ABL</cbc:AllowanceChargeReasonCode>
    <cbc:AllowanceChargeReason>Special packaging</cbc:AllowanceChargeReason>
    <cbc:Amount currencyID="EUR">3.00</cbc:Amount>
  </cac:AllowanceCharge>
</cac:InvoiceLine>
```

### Invalid XML
```
<cac:InvoiceLine>
  <cac:AllowanceCharge>
    <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
    <cbc:Amount currencyID="EUR">3.00</cbc:Amount>
  </cac:AllowanceCharge>
</cac:InvoiceLine>
```

## Affected Fields

- [BG-28 Invoice line charges](/en/resources/xrechnung/bt-141-invoice-line-charge-amount)
- [BT-144 Invoice line charge reason](/en/resources/xrechnung/bt-144-invoice-line-charge-reason)
- [BT-145 Invoice line charge reason code](/en/resources/xrechnung/bt-145-invoice-line-charge-reason-code)

## Related Rules

- [BR-CO-08](/en/resources/kosit-validator-errors/br-co-08-line-charge-reason-code-match)
- [BR-CO-22](/en/resources/kosit-validator-errors/br-co-22-document-charge-reason-required)
- [BR-CO-23](/en/resources/kosit-validator-errors/br-co-23-line-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](/en/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](/en/resources/kosit-validator-errors): Overview of the EN 16931, XRechnung and Peppol validation rules explained here.
