# BR-AG-02 IPSI invoice line requires a seller tax identifier

An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

## Problem Description

An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).

> **ERROR**: XRechnung 3.0

## Context and Significance

IPSI supplies (the indirect tax of Ceuta and Melilla) presuppose a registered seller, so the IPSI category comes from the updated EN16931 code lists supported by the current XRechnung 3.0.2 rulepack requires at least one seller tax identifier on the invoice.

## Solution

Populate at least one of cac:AccountingSupplierParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID (BT-31/BT-32) or the tax representative VAT ID (BT-63), e.g. seller VAT ID ESB51123456.

- validate
- convert

## Valid Examples

- A line with category "M" (IPSI) and seller VAT ID (BT-31) ESB51123456 present

## Invalid Examples

- A line with category "M" (IPSI) while the seller party carries no VAT ID, tax registration or tax representative ID

## Code Examples

### Valid XML
```
<cac:AccountingSupplierParty>
  <cac:Party>
    <cac:PartyTaxScheme>
      <cbc:CompanyID>ESB51123456</cbc:CompanyID>
      <cac:TaxScheme><cbc:ID>VAT</cbc:ID></cac:TaxScheme>
    </cac:PartyTaxScheme>
  </cac:Party>
</cac:AccountingSupplierParty>
```

### Invalid XML
```
<cac:AccountingSupplierParty>
  <cac:Party>
    <cac:PartyLegalEntity>
      <cbc:RegistrationName>Seller SL</cbc:RegistrationName>
    </cac:PartyLegalEntity>
  </cac:Party>
</cac:AccountingSupplierParty>
```

## Affected Fields

- [BT-31 Seller VAT identifier](/resources/xrechnung/bt-31-seller-vat-identifier)
- [BT-32 Seller tax registration identifier](/resources/xrechnung/bt-32-seller-tax-registration-identifier)
- [BT-63 Seller tax representative VAT identifier](/resources/xrechnung/bt-63-seller-tax-representative-vat-identifier)

## Related Rules

- [BR-AG-01](/resources/kosit-validator-errors/br-ag-01-ipsi-vat-breakdown-required)
- [BR-AG-03](/resources/kosit-validator-errors/br-ag-03-ipsi-allowance-seller-vat-identifier-required)
- [BR-AG-04](/resources/kosit-validator-errors/br-ag-04-ipsi-charge-seller-vat-identifier-required)

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