VAT rate for an allowance with category M

Error BR-AG-06 EN 16931

In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.

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

This allowance has no ram:RateApplicablePercent, or its value is less than 0. The test checks ram:CategoryCode with the value M, while the message text describes the category as “IPSI”.

What the rule means

For the tax category M selected by the test, a VAT rate of zero or greater is permitted. A negative rate does not meet this rule.

Affected fields BG-20 BT-95 BT-96
Please enter a VAT rate of at least 0 for the category `M` allowance

The document-level allowance is assigned to category M, but its VAT rate is missing or negative. You can adjust the value on the allowance.

What to do
  1. Check the allowance’s tax rate in AddTradeAllowance(...).
  2. Make sure taxPercent is at least 0.
  3. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:CategoryTradeTax>
    <ram:CategoryCode>M</ram:CategoryCode>
    <ram:RateApplicablePercent>-1</ram:RateApplicablePercent>
  </ram:CategoryTradeTax>
</ram:SpecifiedTradeAllowanceCharge>
✓ Correct
<ram:SpecifiedTradeAllowanceCharge>
  <ram:ChargeIndicator>
    <udt:Indicator>false</udt:Indicator>
  </ram:ChargeIndicator>
  <ram:CategoryTradeTax>
    <ram:CategoryCode>M</ram:CategoryCode>
    <ram:RateApplicablePercent>0</ram:RateApplicablePercent>
  </ram:CategoryTradeTax>
</ram:SpecifiedTradeAllowanceCharge>
Check in FactoorSharp
  • TaxCategoryCodes (BT-95)
  • FacturXInvoice.AddTradeAllowance(basisAmount, currency, actualAmount, chargePercentage, reason, taxTypeCode, taxCategoryCode, taxPercent, reasonCode) (BG-20)
  • FacturXInvoice.GetTradeAllowances() (BG-20)
  • FacturXInvoice.TradeAllowanceCharges (BG-20)
  • AbstractTradeAllowanceCharge (Document level allowance: BG-20)
Technical details

The XPath filters allowances by ram:ChargeIndicator and ram:CategoryCode = 'M', then requires ram:RateApplicablePercent >= 0.

Where the rule applies

The rule applies to a document-level allowance in ram:SpecifiedTradeAllowanceCharge whose ram:ChargeIndicator is false and whose ram:CategoryCode is M.

Context (rule/@context)
//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ ram:CategoryTradeTax[ram:CategoryCode = 'M']
Test expression (assert/@test)
ram:RateApplicablePercent >= 0