# BR-CO-12 De som van de toeslagen op documentniveau (BT-108) moet kloppen

De som van de toeslagen op documentniveau (BT-108) moet gelijk zijn aan de som van alle toeslagbedragen op documentniveau (BT-99): BT-108 = Σ BT-99.

## Probleembeschrijving

> **FOUT**: Reken- en consistentieregel van EN 16931 (BR-CO)

## Context en betekenis

BT-108 (UBL: cac:LegalMonetaryTotal/cbc:ChargeTotalAmount) telt mee in het totaal exclusief btw (BR-CO-13). De validator vergelijkt BT-108 exact met de som van de toeslagen op documentniveau. Een verschil ontstaat meestal wanneer verzendkosten worden toegevoegd zonder BT-108 bij te werken, wanneer BT-108 is gevuld zonder toeslag op documentniveau, of wanneer regeltoeslagen (BG-28) in BT-108 worden meegeteld terwijl ze al in de nettoregelbedragen zitten.

## Oplossing

Herbereken BT-108 als de exacte som van alle toeslagbedragen op documentniveau (BT-99) en zet die waarde in cbc:ChargeTotalAmount (UBL) of ram:ChargeTotalAmount (CII). Zijn er geen toeslagen op documentniveau, laat BT-108 dan weg of vul 0,00 in.

- [XML valideren](/nl/xrechnung-validator?source=resource&rule=BR-CO-12)
- [Factuur converteren](/nl/pdf-to-xrechnung?source=resource&rule=BR-CO-12)

## Geldige voorbeelden

- Twee toeslagen BT-99 = 20,00 en 10,00 → BT-108 = 30,00
- Geen toeslag op documentniveau en BT-108 ontbreekt

## Ongeldige voorbeelden

- Twee toeslagen BT-99 = 20,00 en 10,00, maar BT-108 = 25,00
- BT-108 = 3,00 terwijl de enige toeslag van 3,00 een regeltoeslag (BG-28) is

## Codevoorbeelden

### Geldig XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>FC</cbc:AllowanceChargeReasonCode>
  <cbc:AllowanceChargeReason>Freight charge</cbc:AllowanceChargeReason>
  <cbc:Amount currencyID="EUR">20.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>
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>ABL</cbc:AllowanceChargeReasonCode>
  <cbc:AllowanceChargeReason>Additional packaging</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>
<cac:LegalMonetaryTotal>
  <cbc:ChargeTotalAmount currencyID="EUR">30.00</cbc:ChargeTotalAmount>
</cac:LegalMonetaryTotal>
```

### Ongeldig XML
```
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>FC</cbc:AllowanceChargeReasonCode>
  <cbc:AllowanceChargeReason>Freight charge</cbc:AllowanceChargeReason>
  <cbc:Amount currencyID="EUR">20.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>
<cac:AllowanceCharge>
  <cbc:ChargeIndicator>true</cbc:ChargeIndicator>
  <cbc:AllowanceChargeReasonCode>ABL</cbc:AllowanceChargeReasonCode>
  <cbc:AllowanceChargeReason>Additional packaging</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>
<cac:LegalMonetaryTotal>
  <cbc:ChargeTotalAmount currencyID="EUR">25.00</cbc:ChargeTotalAmount>
</cac:LegalMonetaryTotal>
```

## Betrokken velden

- [BT-99 Toeslagbedrag op documentniveau](/resources/xrechnung/bt-99-document-level-charge-amount)
- [BT-108 Som van toeslagen op documentniveau](/resources/xrechnung/bt-108-sum-of-charges-on-document-level)

## Gerelateerde regels

- [BR-CO-11](/resources/kosit-validator-errors/br-co-11-sum-of-document-allowances-must-match)
- [BR-CO-13](/resources/kosit-validator-errors/br-co-13-invoice-total-without-vat-must-match-totals-chain)

## Validatietools

- [Officiële KoSIT-validator](https://github.com/itplr-kosit/validator): Draai de officiële KoSIT-validator met de XRechnung-configuratie om EN 16931- en XRechnung-regels te controleren.
- [PDF naar XRechnung converteren](/pdf-to-xrechnung): Vind validatiefouten tijdens de conversie en controleer elke correctie.

## Gerelateerde bronnen

- [Officiële specificatie](https://docs.peppol.eu/poacc/billing/3.0/rules/ubl-tc434/)
- [Testsuite](https://github.com/itplr-kosit/xrechnung-testsuite)
- [Alle validatiefouten](/resources/kosit-validator-errors): Overzicht van de hier uitgelegde validatieregels uit EN 16931, XRechnung en Peppol.
