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 “M” ("Ceuta and Mellita tax") shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with “M” ("Ceuta and Melilla tax").
If the VAT breakdown in ApplicableHeaderTradeSettlement contains an ApplicableTradeTax with CategoryCode M, the rule must also find a CategoryCode M in at least one of the checked ApplicableTradeTax, CategoryTradeTax or AppliedTradeTax elements. No such entry is found.
The code M identifies the tax category for Ceuta and Melilla. The VAT breakdown must report this category consistently with the related tax information.
The VAT breakdown contains category M, but the checked tax information does not. You can make the tax information in the invoice consistent.
- Check tax category
MinApplicableTradeTax,CategoryTradeTaxandAppliedTradeTax. - Check the tax-category mapping using
TaxCategoryCodes. - Check whether
AddApplicableTradeTax(...)represents the VAT breakdown consistently. - Regenerate the invoice and validate it again.
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 passes if no CategoryCode M occurs in any of the checked areas, or if an ApplicableTradeTax with CategoryCode M at document level is accompanied by that code in at least one of the checked line or tax-group elements.
The rule applies to the VAT breakdown in ApplicableHeaderTradeSettlement and compares it with ApplicableTradeTax on invoice lines and with CategoryTradeTax and AppliedTradeTax.
rule/@context)assert/@test)