fatalEN 16931EN 16931 business ruleCIIUBLBG-20BG-21BG-23BG-25BT-102BT-118BT-151BT-95
An Invoice that contains an Invoice line (BG-25), a Document level allowance (BG-20) or a Document level charge (BG-21) where the VAT category code (BT-151, BT-95 or BT-102) is "Standard rated" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "Standard rated".
The invoice has at least one line, allowance or charge with VAT category Standard rated (S), but the VAT breakdown (BG-23) has no group for that category.
Add a VAT breakdown group (BG-23) with VAT category code S and its taxable amount (BT-116) — the sum of the net amounts in that category. Set the VAT rate (BT-119) to the rate you charged — it must be greater than zero — and the VAT category tax amount (BT-117) to taxable amount x rate / 100, rounded to two decimals (BR-S-09). Do not add an exemption reason: BR-S-10 forbids BT-120 and BT-121 on a standard-rated group, which is the usual second failure after fixing this. A category code used anywhere on the invoice needs exactly one matching VAT breakdown group (BG-23) — the breakdown is a summary per category, not per line.
CII — context /rsm:CrossIndustryInvoice
((count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='S']) + count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='S'])) >=2 or not (//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='S'])) and ((count(//ram:CategoryTradeTax[ram:CategoryCode='S']) + count(//ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='S'])) >=2 or not (//ram:CategoryTradeTax[ram:CategoryCode='S']))
UBL — context /ubl:Invoice | /cn:CreditNote
((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'])) > 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) > 0) or ((count(//cac:AllowanceCharge/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) + count(//cac:ClassifiedTaxCategory[normalize-space(cbc:ID) = 'S'])) = 0 and count(cac:TaxTotal/cac:TaxSubtotal/cac:TaxCategory[normalize-space(cbc:ID) = 'S']) = 0)
Nothing is stored, and the whole invoice is checked, not just this rule. A PDF only works if it is Factur-X / ZUGFeRD — a PDF with the invoice XML inside it.