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

xInvoice ApplicableTradeTax wrong when using discount on article #9522

Open
support-tt opened this issue May 15, 2024 · 4 comments
Open

xInvoice ApplicableTradeTax wrong when using discount on article #9522

support-tt opened this issue May 15, 2024 · 4 comments

Comments

@support-tt
Copy link

Setup

  • Version: v5.8.55
  • Environment: Docker

Interface

  • Flutter: []
  • React: []
  • Both: []

Checklist

no errors just a Bug

Describe the bug

XML Values are wrong. Here is an example:
image
image

In the XML I got:

      <ram:SpecifiedLineTradeSettlement>
        <ram:ApplicableTradeTax>
          <ram:TypeCode>VAT</ram:TypeCode>
          <ram:CategoryCode>S</ram:CategoryCode>
          <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
        </ram:ApplicableTradeTax>
        <ram:SpecifiedTradeSettlementLineMonetarySummation>
          <ram:LineTotalAmount>1113.69</ram:LineTotalAmount>
        </ram:SpecifiedTradeSettlementLineMonetarySummation>
      </ram:SpecifiedLineTradeSettlement>

The tax is correct but the LineTotalAmount is 1113.69 I dont know where this number is coming from.
Then

      <ram:ApplicableTradeTax>
        <ram:CalculatedAmount>211.60</ram:CalculatedAmount>
        <ram:TypeCode>VAT</ram:TypeCode>
        <ram:BasisAmount>1113.69</ram:BasisAmount>
        <ram:CategoryCode>S</ram:CategoryCode>
        <ram:RateApplicablePercent>19.00</ram:RateApplicablePercent>
      </ram:ApplicableTradeTax>

Also here the 1113.69 is wrong and because of that the tax here is 211.66 instead of the 222.74 from the PDF invoice.
The last Part

      <ram:SpecifiedTradeSettlementHeaderMonetarySummation>
        <ram:LineTotalAmount>1172.30</ram:LineTotalAmount>
        <ram:ChargeTotalAmount>0.00</ram:ChargeTotalAmount>
        <ram:AllowanceTotalAmount>0.00</ram:AllowanceTotalAmount>
        <ram:TaxBasisTotalAmount>1172.30</ram:TaxBasisTotalAmount>
        <ram:TaxTotalAmount currencyID="EUR">222.74</ram:TaxTotalAmount>
        <ram:RoundingAmount>0.00</ram:RoundingAmount>
        <ram:GrandTotalAmount>1395.04</ram:GrandTotalAmount>
        <ram:TotalPrepaidAmount>1395.04</ram:TotalPrepaidAmount>
        <ram:DuePayableAmount>0.00</ram:DuePayableAmount>
      </ram:SpecifiedTradeSettlementHeaderMonetarySummation>

Here is everything correct.

Steps To Reproduce

1.Under Settings --> Product Settings --> enable Productdiscount
2. Create a Inovice with an productdiscount
3. Send Invoice with a line discount with XML (xInvoice 3.0 in my test)

Expected Behavior

The discount must be used in the calculation for the XML. Otherwise the taxes and line values are wrong.

@turbo124
Copy link
Member

@LarsK1 are we factoring in discounts with the calculations?

@LarsK1
Copy link
Contributor

LarsK1 commented May 16, 2024

@turbo124 yes we we're, but in x invoice 3.0 the schema changed. The fix is already available in #9523

@LarsK1
Copy link
Contributor

LarsK1 commented May 22, 2024

@support-tt please check, once the next release is ready.

@support-tt
Copy link
Author

@LarsK1 I will do that thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants