Do not combine tax categories B and S

Error BR-B-02 EN 16931

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 “Split payment" shall not contain 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”.

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

The invoice contains both CategoryCode B and CategoryCode S. The rule prohibits this combination across the checked invoice lines, allowances and charges.

What the rule means

B identifies the “Split payment” tax category, while S identifies the “Standard rated” category. The rule prevents both categories from being used together in the same invoice.

Affected fields BG-25 BG-20 BG-21 BT-151 BT-95 BT-102
Please do not use `B` and `S` together

The invoice contains both tax category B and S. You can make the categories in the relevant tax information consistent.

What to do
  1. Find the CategoryCode values B and S on invoice lines and in document-level allowances and charges.
  2. Check the category in TradeLineItem.TaxCategoryCode and TaxCategoryCodes.
  3. Check the categories for document-level allowances and charges in AbstractTradeAllowanceCharge.
  4. Regenerate the invoice and validate it again.
What it looks like
✗ Triggers the message
<ram:CategoryCode>B</ram:CategoryCode>
<ram:CategoryCode>S</ram:CategoryCode>
✓ Correct
<ram:CategoryCode>B</ram:CategoryCode>
Check in FactoorSharp
  • TaxCategoryCodes (BT-151; BT-95; BT-102)
  • TradeLineItem.TaxCategoryCode (BT-151)
  • TradeLineItem.TaxType (BT-151-0)
  • AbstractTradeAllowanceCharge (Document level allowance: BG-20; Document level charge: BG-21)
  • AbstractTradeAllowanceCharge.ChargeIndicator (Document level allowance: BG-20; Document level charge: BG-21)
Technical details

The XPath passes if no CategoryCode B occurs or if no CategoryCode S occurs. The check covers CategoryCode elements throughout the document.

Where the rule applies

The rule applies to all CategoryCode elements on invoice lines and at document level for allowances and charges.

Context (rule/@context)
/rsm:CrossIndustryInvoice
Test expression (assert/@test)
(//ram:CategoryCode ='B' and (not(//ram:CategoryCode ='S'))) or (not(//ram:CategoryCode ='B'))