# BR-RO-120

Source: https://xmlvalid.com/rules/BR-RO-120

> Identificatorul de înregistrare legala a Cumparatorului (BT-47) si/sau Identificatorul de TVA al Cumparatorului (BT-48) trebuie sa fie înscris. #The Buyer legal registration identifier (BT-47) and/or the Buyer VAT identifier (BT-48) shall be present.

- Level: error
- Rule sets: Romanian RO e-Factura rules (UBL) 1.0.9
- Context: `/ubl:Invoice | /cn:CreditNote`
- Test: `not((cac:AllowanceCharge/cac:TaxCategory/cbc:ID[ancestor::cac:AllowanceCharge/cbc:ChargeIndicator = 'false' and following-sibling::cac:TaxScheme/cbc:ID = 'VAT'] = ('S', 'Z', 'E', 'AE', 'K', 'G', 'L', 'M')) or (cac:AllowanceCharge/cac:TaxCategory/cbc:ID[ancestor::cac:AllowanceCharge/cbc:ChargeIndicator = 'true'] = ('S', 'Z', 'E', 'AE', 'K', 'G', 'L', 'M')) or (cac:InvoiceLine/cac:Item/cac:ClassifiedTaxCategory/cbc:ID = ('S', 'Z', 'E', 'AE', 'K', 'G', 'L', 'M'))) or (cac:AccountingCustomerParty/cac:Party/cac:PartyLegalEntity/cbc:CompanyID, cac:AccountingCustomerParty/cac:Party/cac:PartyTaxScheme/cbc:CompanyID[boolean(normalize-space(.))])`

## Why it fails

- A line or a document level allowance or charge has a VAT category (S, Z, E, AE, K, G, L or M), and the buyer has neither `cac:PartyLegalEntity/cbc:CompanyID` (BT-47) nor `cac:PartyTaxScheme/cbc:CompanyID` (BT-48).

## How to fix it

- Give the buyer's tax code (CUI or CIF) in `cac:PartyLegalEntity/cbc:CompanyID`, or its VAT number in `cac:PartyTaxScheme/cbc:CompanyID`. For a consumer who gives no tax code, RO e-Factura uses thirteen zeros.

Validate a document against these rules: https://xmlvalid.com/validate
