Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add AppliedTradeTax to LogisticsServiceCharge (backport #34) #35

Merged
merged 4 commits into from
Jan 2, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 2, 2025

Adding shipping costs as taxes with charge type "Actual" and VAT on the next line with charge type "On Previous Row Amount" or "On Previous Row Total" will produce an invalid e-invoice xml file with the extended profile.

The validation on import in erpnext will fail with the error

[BR-FXEXT-S-08]-For each different value of VAT category rate (BT-119) where the VAT category code (BT-118) is equal to “S” ("Standard rated"), Absolute Value of (VAT category taxable amount (BT-116) - ∑ Invoice line net amounts (BT-131) + Σ Document level allowance amounts (BT-92) - Σ Document level charges amounts (BT-99) - Σ Logistics Service fee amounts (BT-x-272)) <= 0,01 * ((Number of line net amounts (BT-131) + Number of Document level allowance amounts (BT-92) + Number of Document level charge amounts (BT-99) + Number of Logistics Service fee amounts (BT-X-272)), where the VAT category code (BT-151, BT-95, BT-102, BT-X-273) is "Standard rated" (S) and the VAT rate (BT-152, BT-96, BT-103, BT-X-274) equals the VAT category rate (BT-119).
Element 'ram:AppliedTradeTax' must occur at least 1 times.

In order to fix this, output SpecifiedLogisticsServiceCharge with AppliedTradeTax.

      <ram:SpecifiedLogisticsServiceCharge>
        <ram:Description>DHL Paket bis 5 kg</ram:Description>
        <ram:AppliedAmount>5.99</ram:AppliedAmount>
        <ram:AppliedTradeTax>
          <ram:TypeCode>VAT</ram:TypeCode>
          <ram:CategoryCode>S</ram:CategoryCode>
          <ram:RateApplicablePercent>19.0</ram:RateApplicablePercent>
        </ram:AppliedTradeTax>
      </ram:SpecifiedLogisticsServiceCharge>
```<hr>This is an automatic backport of pull request #34 done by [Mergify](https://mergify.com).

@barredterra barredterra merged commit b55965a into develop Jan 2, 2025
4 checks passed
@barredterra barredterra deleted the mergify/bp/develop/pr-34 branch January 2, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants