VAT breakdown for IGIC

Error BR-AF-01 EN 16931

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 "IGIC" shall contain in the VAT breakdown (BG-23) at least one VAT category code (BT-118) equal with "IGIC".

Mandatory rule: As long as it is violated, the invoice is invalid and will be rejected by validators.
What is wrong

If ram:ApplicableTradeTax with code L occurs in invoice lines or in ram:CategoryTradeTax, the test requires a corresponding number of such entries together with the document-level VAT breakdown. If the corresponding breakdown is missing, the rule is not met.

What the rule means

L denotes IGIC. The VAT breakdown must account for the IGIC category used in the checked invoice details.

Please complete the VAT breakdown for IGIC

Category L is used in the checked invoice details, but the matching tax entries do not align with the VAT breakdown. You can align the relevant entries.

What to do
  1. Check the entries with ram:CategoryCode equal to L in the invoice lines and in ram:CategoryTradeTax.
  2. Align these entries with the document-level VAT breakdown.
  3. Generate the invoice again and validate it.
Check in FactoorSharp
  • 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 checks two conditions: the total number of L entries in invoice lines and the breakdown, and the total number of L entries in ram:CategoryTradeTax and the breakdown. Each condition applies only when its corresponding detail path contains L; the total must then be at least two.

Where the rule applies

This rule applies to the entire invoice. It checks entries with ram:CategoryCode equal to L in invoice lines, in ram:CategoryTradeTax and in the document-level VAT breakdown.

Context (rule/@context)
/rsm:CrossIndustryInvoice
Test expression (assert/@test)
( (count(//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='L']) + count(// ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='L'])) >=2 or not (//ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode='L']) ) and ( (count(//ram:CategoryTradeTax[ram:CategoryCode='L']) + count(//ram:ApplicableHeaderTradeSettlement/ ram:ApplicableTradeTax[ram:CategoryCode='L'])) >=2 or not (//ram:CategoryTradeTax[ram:CategoryCode='L']) )