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.

error: the document is invalid

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.

What the rule checks

As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.

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(.))])

Checked with Romania RO e-Factura Invoice (UBL), Romania RO e-Factura Credit Note (UBL)