An Invoice that contains an Invoice line (BG-25) where the "Subtype of invoice line item" (BT-X-8) has the value "DETAIL" or is not specified, a Document level allowance (BG-20) or a Document level charge or tax (BG-21) or a Logistics Service Charge ( BG-X-42) where the VAT category code (BT-151, BT-95, BT-102, or BT-X-273) is “L” ("Canary Islands tax") shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with “L” ("Canary Islands tax").
A relevant invoice line with a missing or DETAIL value in ram:LineStatusReasonCode, an allowance, a charge, or a logistics service uses VAT category L, but the VAT breakdown does not contain both ram:ApplicableTradeTax/ram:CategoryCode with value L and at least one matching VAT detail with value L on an invoice line, category, or applied tax.
The code L identifies the tax category for the Canary Islands. This category must be represented in the invoice VAT breakdown and in at least one associated VAT detail.
VAT category L is used in the tax details, but its required representation in the VAT breakdown is incomplete. Complete the related details so that the category is represented consistently.
- Check VAT category
Lon the affected invoice lines and tax details. - Check
AssociatedDocument.LineStatusReasonCodeif an invoice line should not be included. - Complete the VAT breakdown with
FacturXInvoice.AddApplicableTradeTax(...)and use categoryLthere. - Generate the invoice again and validate it.
<ram:SpecifiedLineTradeSettlement> <ram:ApplicableTradeTax> <ram:CategoryCode>L</ram:CategoryCode> </ram:ApplicableTradeTax> </ram:SpecifiedLineTradeSettlement>
<ram:ApplicableHeaderTradeSettlement> <ram:ApplicableTradeTax> <ram:CategoryCode>L</ram:CategoryCode> </ram:ApplicableTradeTax> </ram:ApplicableHeaderTradeSettlement> <ram:SpecifiedLineTradeSettlement> <ram:ApplicableTradeTax> <ram:CategoryCode>L</ram:CategoryCode> </ram:ApplicableTradeTax> </ram:SpecifiedLineTradeSettlement>
TaxCategoryCodes(BT-151; BT-95; BT-102; BT-118)AssociatedDocument.LineStatusReasonCode(BT-X-8)FacturXInvoice.AddApplicableTradeTax(basisAmount, percent, taxAmount, typeCode, categoryCode, allowanceChargeBasisAmount, exemptionReasonCode, exemptionReason, lineTotalBasisAmount)(BG-23)FacturXInvoice.AnyApplicableTradeTaxes()(BG-23)FacturXInvoice.GetApplicableTradeTaxes()(BG-23)
Technical details
The test allows category L to be absent from all checked areas, or requires L in ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax and in at least one checked line or tax area.
The rule applies to the invoice VAT breakdown and to VAT details on invoice lines, allowances, charges, and logistics services.
rule/@context)assert/@test)