Handling discount and taxes, help needed!

We are not getting anywhere with this discussion, anyway like it is right now most people cannot use it without jumping the discount system all together, it’s fine to do it at v1.6.0, leaving v1.5.9 as a fixup, in the meantime I’ll fork from our end, until fixed.
Since it’s America the first user base, and America uses before tax by default, I would consider this a priority.
I also ask myself how the program does/will do accounting, since the subprice from the article side and the calculation side are different? Offsetting all the calculations?

Back on the discussion:

I think I know what you are doing @M4rt1n, I think I got it:
This is the problem! You are definitely not doing after-tax! you are doing before-tax equating to the discounted amount.
Look:

final_price_not_discounted - discount = before_tax(x) → x is the amount needed to arrive to that price, but you are using before-tax formula!

item price: 100
discount: 10
tax: 19%

final_price - discount = (price - x) + ((price - x) / 100 * tax_perc)
119 - 10 = (100 - x) + ((100 - x) / 100 * 19)

we set (100 - x) = k

109 = k + (k / 100 * 19)
109 = 119/100 k
k = (100 * 109)/119

bring back (100 - x)

100 - x = (100 * 109)/119
x = 1000/119
x = 8.4 euro

this is the x amount we need to offset the calculation to get 10 euro discount, so:

109 = (100 - 8.4) + ((100 - 8.4) / 100 * 19)
109 = 91.60 + 17.40

and those are the numbers you are getting…

So @M4rt1n you didn’t understand the point of the conversation, you are still using before-tax formula but you are offsetting an amount to get the 10 euros from the final price. This is not like using after-tax discount. IP is using after-tax discount. And this is wrong.

And this was pointed out from many users:
https://community2.invoiceplane.com/t/topic/6056/3
https://community2.invoiceplane.com/t/topic/6652
https://community2.invoiceplane.com/t/topic/1973/2
https://community2.invoiceplane.com/t/topic/6652
https://community2.invoiceplane.com/t/topic/5284

IP is not using another method, is doing the calculation wrong.
This should be on top of our priority. Users might not be aware.

1 Like