Do not use B and S together

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

If a ram:CategoryCode has the value B, no ram:CategoryCode with the value S may occur in the invoice. Using both codes in the same invoice does not meet the rule.

What the rule means

B denotes “Split payment” and S denotes “Standard rated”. The rule prevents these two VAT 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 in one invoice

The invoice contains both tax category B and S. You can align the tax categories used for invoice lines, allowances and charges.

What to do
  1. Check TradeLineItem.TaxCategoryCode in the invoice lines for the values B or S.
  2. For document-level allowances and charges, check the tax categories and AbstractTradeAllowanceCharge.ChargeIndicator.
  3. Make sure B and S do not occur together in the invoice.
  4. Generate the invoice again and validate it.
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 ram:CategoryCode equals B, or, when B is present, if no ram:CategoryCode equals S. The check applies to the entire invoice.

Where the rule applies

This rule applies to the entire invoice. It checks all ram:CategoryCode entries, including those in invoice lines and document-level 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'))