Taxable amount for each IGIC rate

Error BR-AF-08 EN 16931

For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is "IGIC", the VAT category taxable amount (BT-116) in a VAT breakdown (BG-23) shall equal the sum of Invoice line net amounts (BT-131) plus the sum of document level charge amounts (BT-99) minus the sum of document level allowance amounts (BT-92) where the VAT category code (BT-151, BT-102, BT-95) is "IGIC" and the VAT rate (BT-152, BT-103, BT-96) equals the VAT category rate (BT-119).

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

For at least one rate specified in the VAT breakdown with category L, ram:BasisAmount does not exactly equal the sum of the net amounts of invoice lines with category L and that rate, plus the corresponding document-level charges and minus the corresponding allowances.

What the rule means

L denotes IGIC. The taxable amount must be calculated separately for each IGIC rate from amounts with the same category and rate.

Please reconcile the IGIC taxable amount for each rate

For at least one IGIC rate, the taxable amount does not match the associated invoice lines and document-level allowances or charges. You can correct the amounts and rate matching.

What to do
  1. For each ram:RateApplicablePercent in category L, check the corresponding ram:BasisAmount.
  2. Compare the taxable amount with TradeLineItem.LineTotalAmount and AbstractTradeAllowanceCharge.ActualAmount values for the same rate.
  3. For invoice lines, check the assignment using TradeLineItem.TaxCategoryCode and TradeLineItem.TaxPercent.
  4. Generate the invoice again and validate it once more.
What it looks like
✗ Triggers the message
<ram:ApplicableTradeTax>
  <ram:CategoryCode>L</ram:CategoryCode>
  <ram:RateApplicablePercent>7</ram:RateApplicablePercent>
  <ram:BasisAmount>99.00</ram:BasisAmount>
</ram:ApplicableTradeTax>
<ram:IncludedSupplyChainTradeLineItem>
  <ram:SpecifiedLineTradeSettlement>
    <ram:ApplicableTradeTax>
      <ram:CategoryCode>L</ram:CategoryCode>
      <ram:RateApplicablePercent>7</ram:RateApplicablePercent>
    </ram:ApplicableTradeTax>
    <ram:SpecifiedTradeSettlementLineMonetarySummation>
      <ram:LineTotalAmount>100.00</ram:LineTotalAmount>
    </ram:SpecifiedTradeSettlementLineMonetarySummation>
  </ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
✓ Correct
<ram:ApplicableTradeTax>
  <ram:CategoryCode>L</ram:CategoryCode>
  <ram:RateApplicablePercent>7</ram:RateApplicablePercent>
  <ram:BasisAmount>100.00</ram:BasisAmount>
</ram:ApplicableTradeTax>
<ram:IncludedSupplyChainTradeLineItem>
  <ram:SpecifiedLineTradeSettlement>
    <ram:ApplicableTradeTax>
      <ram:CategoryCode>L</ram:CategoryCode>
      <ram:RateApplicablePercent>7</ram:RateApplicablePercent>
    </ram:ApplicableTradeTax>
    <ram:SpecifiedTradeSettlementLineMonetarySummation>
      <ram:LineTotalAmount>100.00</ram:LineTotalAmount>
    </ram:SpecifiedTradeSettlementLineMonetarySummation>
  </ram:SpecifiedLineTradeSettlement>
</ram:IncludedSupplyChainTradeLineItem>
Check in FactoorSharp
  • TaxCategoryCodes (BT-151; BT-95; BT-102; BT-118)
  • AbstractTradeAllowanceCharge.ActualAmount (Document level allowance: BT-92; Document level charge: BT-99)
  • TradeLineItem.LineTotalAmount (BT-131)
  • TradeLineItem.TaxCategoryCode (BT-151)
  • TradeLineItem.TaxPercent (BT-152)
Technical details

The test iterates over each decimal value of ram:RateApplicablePercent in the header breakdown and requires exact equality for each rate against the calculation of line amounts, charges, and allowances rounded to two decimal places.

Where the rule applies

The rule applies to each distinct rate in ram:RateApplicablePercent of a VAT breakdown ram:ApplicableTradeTax with category L. It compares invoice lines and document-level allowances and charges with the same category and rate.

Context (rule/@context)
//rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode = 'L']
Test expression (assert/@test)
every $rate in ../ram:RateApplicablePercent/xs:decimal(.) satisfies (../ram:BasisAmount = (round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement[ ram:ApplicableTradeTax/ram:CategoryCode = 'L' and ram:ApplicableTradeTax/xs:decimal(ram:RateApplicablePercent) =$rate ]/ram:SpecifiedTradeSettlementLineMonetarySummation/xs:decimal(ram:LineTotalAmount)) * 10 * 10) div 100 + round(sum(/ rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ ram:ChargeIndicator/udt:Indicator=true() and ram:CategoryTradeTax/ram:CategoryCode='L' and ram:CategoryTradeTax/xs:decimal(ram:RateApplicablePercent)=$rate ]/xs:decimal(ram:ActualAmount)) * 10 * 10) div 100 - round(sum(/rsm:CrossIndustryInvoice/ rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ ram:SpecifiedTradeAllowanceCharge[ ram:ChargeIndicator/udt:Indicator=false() and ram:CategoryTradeTax/ram:CategoryCode='L' and ram:CategoryTradeTax/xs:decimal(ram:RateApplicablePercent)=$rate ]/xs:decimal(ram:ActualAmount)) * 10 * 10) div 100))