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 "Standard rated" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "Standard rated".
For amounts in tax category S, the counted tax details do not meet the minimum counts required by the test. The test counts ram:ApplicableTradeTax under ram:SpecifiedLineTradeSettlement and at document level, as well as ram:CategoryTradeTax and document-level tax details.
The VAT breakdown associates tax amounts with tax categories. For standard-rated amounts, category S must be represented there in accordance with the tax details checked by the test.
The tax details for category S do not meet the count conditions checked by the test. Add or correct the related tax details in the VAT breakdown.
- Check tax category
Son the relevant invoice lines, allowances, or charges. - Check the VAT breakdown tax details using
FacturXInvoice.AddApplicableTradeTax(...). - Generate the invoice again and validate it.
TaxCategoryCodes(BT-151; BT-95; BT-102; BT-118)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 combines two count conditions: when matching lines exist, the number of S tax details on lines and at document level must be at least two; when ram:CategoryTradeTax exists, its count combined with document-level tax details must also be at least two. If the corresponding source structure is absent, that condition passes.
The rule applies to the entire document when invoice lines, allowances, or charges use tax category S. It checks the related tax details at document level and in the VAT breakdown.
rule/@context)assert/@test)