# BR-AF-09 IGIC VAT amount must equal base times rate

The VAT category tax amount (BT-117) in a VAT breakdown (BG-23) where VAT category code (BT-118) is "IGIC" shall equal the VAT category taxable amount (BT-116) multiplied by the VAT category rate (BT-119).

## Problem Description

> **ERROR**: EN 16931 rule for IGIC/IPSI (Canary Islands, Ceuta, Melilla)

## Context and Significance

The IGIC category (the Canary Islands indirect tax) comes from the updated EN16931 code lists supported by the current XRechnung 3.0.2 rulepack; this rule guarantees the declared IGIC VAT amount matches the base and rate exactly.

## Solution

Compute BT-117 as BT-116 × BT-119 ÷ 100 (rounded to two decimals) and write it into the "L" (IGIC) cac:TaxSubtotal/cbc:TaxAmount, e.g. 100.00 × 7.00 % = 7.00.

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

## Valid Examples

- BT-116 = 100.00, BT-119 = 7.00, BT-117 = 7.00

## Invalid Examples

- BT-116 = 100.00, BT-119 = 7.00, but BT-117 = 5.00

## Code Examples

### Valid XML
```
<cac:TaxSubtotal>
  <cbc:TaxableAmount currencyID="EUR">100.00</cbc:TaxableAmount>
  <cbc:TaxAmount currencyID="EUR">7.00</cbc:TaxAmount>
  <cac:TaxCategory>
    <cbc:ID>L</cbc:ID>
    <cbc:Percent>7.00</cbc:Percent>
    <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
  </cac:TaxCategory>
</cac:TaxSubtotal>
```

### Invalid XML
```
<cac:TaxSubtotal>
  <cbc:TaxableAmount currencyID="EUR">100.00</cbc:TaxableAmount>
  <cbc:TaxAmount currencyID="EUR">5.00</cbc:TaxAmount>
  <cac:TaxCategory>
    <cbc:ID>L</cbc:ID>
    <cbc:Percent>7.00</cbc:Percent>
    <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
  </cac:TaxCategory>
</cac:TaxSubtotal>
```

## Affected Fields

- [BT-117 VAT category tax amount](/resources/xrechnung/bt-117-vat-category-tax-amount)
- [BT-116 VAT category taxable amount](/resources/xrechnung/bt-116-vat-category-taxable-amount)
- [BT-119 VAT category rate](/resources/xrechnung/bt-119-vat-category-rate)

## Related Rules

- [BR-AF-08](/resources/kosit-validator-errors/br-af-08-igic-taxable-amount-equals-sum)
- [BR-AF-01](/resources/kosit-validator-errors/br-af-01-igic-vat-breakdown-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.
