Skip to content

VATEX ExemptionReasonCode not written to Header VAT Breakdown (BR-IC-10 violation) #237

@oteschner

Description

@oteschner

Title
VATEX ExemptionReasonCode not written to Header VAT Breakdown (BR-IC-10 violation)

Environment

  • ERPNext 15.x
  • eu_einvoice 15.x
  • Hosted on Frappe Cloud

Scenario

  • Intra-community supply (DE → SK)
  • VAT Category Code: K
  • VAT Rate: 0%
  • VATEX-EU-IC mapped via Code List (Applies to: Tax Category, Account, Sales Taxes and Charges Template)

Observed Behaviour

  • VATEX-EU-IC is correctly written at line level:
    ram:SpecifiedLineTradeSettlement
    ram:ApplicableTradeTax
    ram:TypeCodeVAT</ram:TypeCode>
    ram:CategoryCodeK</ram:CategoryCode>
    ram:ExemptionReasonCodeVATEX-EU-IC</ram:ExemptionReasonCode>
    ram:RateApplicablePercent0</ram:RateApplicablePercent>
    </ram:ApplicableTradeTax>
    </ram:SpecifiedLineTradeSettlement>

  • However, the same exemption reason is not written in the VAT Breakdown at header level:
    ram:ApplicableHeaderTradeSettlement
    ram:ApplicableTradeTax
    ram:CalculatedAmount0.0</ram:CalculatedAmount>
    ram:TypeCodeVAT</ram:TypeCode>
    ram:BasisAmount20.0</ram:BasisAmount>
    ram:CategoryCodeK</ram:CategoryCode>
    ram:RateApplicablePercent0</ram:RateApplicablePercent>
    </ram:ApplicableTradeTax>
    </ram:ApplicableHeaderTradeSettlement>

The header VAT Breakdown contains:

  • CategoryCode = K
  • RateApplicablePercent = 0
  • but no ExemptionReasonCode and no ExemptionReason text

Result
Peppol validation fails with:
[BR-IC-10] – A VAT Breakdown (BG-23) with VAT Category Code (BT-118) "Intra-community supply" shall have a VAT exemption reason code (BT-121), meaning "Intra-community supply" or the VAT exemption reason text (BT-120) "Intra-community supply" (or the equivalent standard text in another language).

Expected Behaviour
If VATEX-EU-IC is determined for VAT Category K, it should also be written in the corresponding Header VAT Breakdown block (BT-121), or alternatively the exemption reason text (BT-120) should be populated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions