fatalEN 16931syntax binding ruleCIIBG-20BG-21BT-95
Each Specified Trade Allowance Charge (BG-20)(BG-21) shall contain a VAT category code (BT-95).
An allowance or charge has no VAT category code.
Add the category code (BT-95 for allowances, BT-102 for charges). It must match a category used elsewhere on the invoice, because the amount is folded into that category's taxable amount.
CII — context //ram:SpecifiedTradeAllowanceCharge
count(ram:RateApplicablePercent) <= 1
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.