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 "Export outside the EU" shall contain in the VAT breakdown (BG-23) exactly one VAT category code (BT-118) equal with "Export outside the EU".
If an invoice line, allowance or charge uses VAT category code G, the document-level VAT breakdown must contain exactly one ram:ApplicableTradeTax entry with code G. The test also requires an entry with G in an invoice line or in ram:CategoryTradeTax.
G denotes an export outside the EU. The VAT breakdown must report this category for the invoice in accordance with the affected invoice lines, allowances or charges.
The invoice uses category G, but the related tax data at document level and in the details do not meet the rule. You can align the tax entries in the invoice.
- Check category
Gin the affected invoice lines, allowances or charges. - Make sure the VAT breakdown contains exactly one matching
ram:ApplicableTradeTaxentry. - Check that
Galso occurs in an invoice line or inram:CategoryTradeTax. - Generate the invoice again and validate it.
<ram:SpecifiedLineTradeSettlement> <ram:ApplicableTradeTax> <ram:CategoryCode>G</ram:CategoryCode> </ram:ApplicableTradeTax> </ram:SpecifiedLineTradeSettlement>
<ram:ApplicableHeaderTradeSettlement> <ram:ApplicableTradeTax> <ram:CategoryCode>G</ram:CategoryCode> </ram:ApplicableTradeTax> </ram:ApplicableHeaderTradeSettlement> <ram:SpecifiedLineTradeSettlement> <ram:ApplicableTradeTax> <ram:CategoryCode>G</ram:CategoryCode> </ram:ApplicableTradeTax> </ram:SpecifiedLineTradeSettlement>
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 XPath allows the case where G is absent from the checked tax data. Otherwise, it checks for exactly one G entry under ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax and at least one matching entry in either of the two checked detail paths.
This rule applies to the entire invoice. It compares ram:ApplicableTradeTax in the document-level VAT breakdown with ram:ApplicableTradeTax in invoice lines and with ram:CategoryTradeTax.
rule/@context)assert/@test)