Each Document level allowance (BG-20) shall have a Document level allowance VAT category code (BT-95).
The allowance is missing CategoryCode under CategoryTradeTax with tax type VAT. Each document-level allowance must have a VAT category code.
The VAT category code assigns the allowance to its VAT category. This information is required for every document-level allowance.
The VAT category code is missing for the allowance. Add the code in its associated VAT details.
- Review the tax category using
TaxCategoryCodes. - Add
CategoryCodein theCategoryTradeTaxwithTypeCodeVAT, for example throughAddTradeAllowance(...). - Generate the invoice again and validate it.
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> <ram:CategoryTradeTax> <ram:TypeCode>VAT</ram:TypeCode> </ram:CategoryTradeTax> </ram:SpecifiedTradeAllowanceCharge>
<ram:SpecifiedTradeAllowanceCharge> <ram:ChargeIndicator> <udt:Indicator>false</udt:Indicator> </ram:ChargeIndicator> <ram:CategoryTradeTax> <ram:TypeCode>VAT</ram:TypeCode> <ram:CategoryCode>S</ram:CategoryCode> </ram:CategoryTradeTax> </ram:SpecifiedTradeAllowanceCharge>
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
For allowances with ChargeIndicator set to false, the test looks for a TypeCode with the value VAT under CategoryTradeTax and requires CategoryCode there.
The rule applies to an allowance in SpecifiedTradeAllowanceCharge at document level when ChargeIndicator has the value false.
rule/@context)assert/@test)