An Invoice that contains an Invoice line (BG-25) where the "Subtype of invoice line item" (EXT-FR-FE-163 / 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 “AE” ("Reverse Charge") shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with “AE” ("Reverse Charge").
If a relevant invoice line or an allowance or charge uses VAT category AE, the corresponding category AE is missing from the VAT breakdown. Relevant invoice lines have no subtype specified or have ram:LineStatusReasonCode equal to DETAIL.
AE denotes the “Reverse Charge” category. The VAT breakdown must include this category when it is used for the items, allowances, or charges covered by the rule.
A relevant invoice line, allowance, or charge uses category AE, but the VAT breakdown does not include a matching category. You can add the corresponding tax category information.
- Check category
AEin the relevantram:ApplicableTradeTaxdetails and check the invoice line subtype inram:LineStatusReasonCode. - Add the matching category to the VAT breakdown with
AddApplicableTradeTax(...). - Generate the invoice again and validate it once more.
<ram:SpecifiedLineTradeSettlement> <ram:ApplicableTradeTax> <ram:CategoryCode>AE</ram:CategoryCode> </ram:ApplicableTradeTax> </ram:SpecifiedLineTradeSettlement>
<ram:ApplicableHeaderTradeSettlement> <ram:ApplicableTradeTax> <ram:CategoryCode>AE</ram:CategoryCode> </ram:ApplicableTradeTax> </ram:ApplicableHeaderTradeSettlement> <ram:SpecifiedLineTradeSettlement> <ram:ApplicableTradeTax> <ram:CategoryCode>AE</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 XPath counts occurrences of ram:CategoryCode equal to AE in ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax, the relevant ram:SpecifiedLineTradeSettlement elements, and ram:CategoryTradeTax and ram:AppliedTradeTax. The condition passes if none of the checked locations contains AE, or if the VAT breakdown and at least one relevant source contain AE.
The rule applies to the VAT breakdown in rsm:CrossIndustryInvoice and considers the VAT categories of invoice lines and document-level allowances and charges.
rule/@context)assert/@test)