Each VAT breakdown (BG-23) shall have a VAT category rate (BT-119), except if the Invoice is not subject to VAT.
The VAT breakdown is missing ram:RateApplicablePercent (BT-119), even though the VAT category is not O. For category O, the amount is not subject to VAT and this rule does not require a rate.
The VAT rate (BT-119) states the percentage for the VAT category. For amounts in category O, which are not subject to VAT, this rule does not require a rate.
A VAT breakdown is missing its rate, and the specified category is not O. Add the percentage, or use category O if the amount is not subject to VAT.
- Find the relevant
ram:ApplicableTradeTax. - Add
ram:RateApplicablePercent, or setram:CategoryCodetoOif the amount is not subject to VAT. - Check the call to
AddApplicableTradeTax(...). - Generate the invoice again and validate it once more.
<ram:ApplicableTradeTax> <ram:CategoryCode>S</ram:CategoryCode> </ram:ApplicableTradeTax>
<ram:ApplicableTradeTax> <ram:CategoryCode>S</ram:CategoryCode> <ram:RateApplicablePercent>20</ram:RateApplicablePercent> </ram:ApplicableTradeTax>
FacturXInvoice.AddApplicableTradeTax(basisAmount, percent, taxAmount, typeCode, categoryCode, allowanceChargeBasisAmount, exemptionReasonCode, exemptionReason, lineTotalBasisAmount)(BG-23)FacturXInvoice.AnyApplicableTradeTaxes()(BG-23)FacturXInvoice.GetApplicableTradeTaxes()(BG-23)FacturXInvoice.Taxes(BG-23)
Technical details
The test passes if ram:RateApplicablePercent is present or ram:CategoryCode has the value O.
The rule applies to each ram:ApplicableTradeTax within the document-level settlement.
rule/@context)assert/@test)