Tax is calculated on pre-discount amount

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 anos atrás
I think my explanation was not very clear. What I tried to say is that is doesn't matter if you calculate the discount before or after tax is applied, in the end, the total value is correct. And that I AGREE WITH YOU that this should be changed on the invoice prints. Hence my last line in my previous post:

linkXperts wrote:
I'm with you on the fact that you need to change the VAT amount on your invoice. So this should be changed.
13 anos atrás
exactly!

I was hoping 1.8 would have fixed the 1.7 tax/discount bug, it kind of has but also seems to have introduced a new one - hoping for a patch for this prior to the next release...
13 anos atrás
I served it all fixed and working on a plate. All the Team had to do was implement the code into their upgrade path. I wont do any modification until i get my hands on VS2010 and then start again making logic out of their tax calculation mess.

It is not only for presenting to accurate calculation to the customers, but also for the tax offices in your country. If they will notice this kind of vaults in you invoices boy!.... I do not even want to go there.
13 anos atrás
miles wrote:


Thankfully I got a fix for this through the community.

Is this the fix that didn't work under 1.7 (and I'm guessing 1.8)


I got the fix for 1.6 version from USRFobiwan and it works like a charm. :)

BR
Joakim
13 anos atrás
jockesoft wrote:


Thankfully I got a fix for this through the community.

Is this the fix that didn't work under 1.7 (and I'm guessing 1.8)

I got the fix for 1.6 version from USRFobiwan and it works like a charm. :)

BR
Joakim



It's not working for 1.7 and up. So stick with 1.6 if you want correct EU tax handling. I can't look into it, do not have VS2010.
13 anos atrás
Can we get an official comment from the NOP team on this please.

Going to be fixed as priority ?
Going to be fixed in next release ?
Going to be fixed at some point in future ?
No problem, so no fix ?

thanks :)
13 anos atrás
I didn't notice this thread when I post my comment here:

https://www.nopcommerce.com/boards/t/6273/tax-calculated-before-discount-taken-customer-pays-tax-on-nothing.aspx

I don't know about discounts on categories or product variants... but I have a fix for discounts that fall under the total/subtotal. It may work for the other discounts, but I'm not sure - I have only tested it on shipping and the subtotal one.

What I did was take the order subtotal and used the applied discount to figure out how much of the order subtotal should be taxed:

Subtotal = $10.00
Discount = $2.00 (20%)
Taxable amount = $8.00 or .80 (80%)

and I multiplied the different taxes (item, shipping, checkout attribute) by that number and it comes out perfect (after a rounding change in GetPrice) every time.

It requires a boolean flag in GetPrice and GetCheckoutAttributePrice because sometimes you want to round the price, and sometimes you don't - like situations where you are trying to figure the correct tax.

I can try to explain in detail or post the files somewhere if anyone wants.
13 anos atrás
sounds similar to the dirty hack I implemented (in 1.8)

The hack goes a bit wrong when you have taxable and non-taxable items in your store though as only some of the subtotal is taxable

A proper fix is needed, hopefully NOP Team return from their holiday soon :)
13 anos atrás
miles wrote:
sounds similar to the dirty hack I implemented (in 1.8)

The hack goes a bit wrong when you have taxable and non-taxable items in your store though as only some of the subtotal is taxable

A proper fix is needed, hopefully NOP Team return from their holiday soon :)


Well damn it miles - why didn't you tell me about this sooner!?!?  :)

Now I have to go back and fix it! Don't worry... I'll find a way to fix this... I never quit until it is fixed for good.

Any other considerations you're not telling me about??
13 anos atrás
well 1.8 is quite different to 1.7 when it comes to discounts I think - I'm talking specifically 1.8 here.

download it and take a peek. Dirty hacks are just that though, I feel filthy !

if you want to test your fix then try:

Product 1 (tax exempt) with a 10% discount at variant level
Product 2 (taxable)
15% voucher discount to whole cart

That should keep you busy, hehe
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.