Hi!
I've had this problem for quite some time but I wasn't sure if the issue was because of faulty vm config (taxes & calculation rules), my opc (rupostel), or awocoupon.
I get the same results with the standard vm checkout so I've ruled out my opc.
Earlier today I also tried using native VM coupons which actually worked as expected. But I hesitate to call my issue a bug, it's more likely a compatibility issue with my configuration.
I'm based in Sweden and my base currency is SEK (kr), but I do ship worldwide. All orders going outside the EU are sold without VAT, all other orders are charged with 25% Swedish VAT. Rupostel's "EU VAT and MOSS Calculation Plugin" handles this for me automatically, based on the customer's address or IP. So far everything is good.
I've noticed during accounting that not all orders are charged 25% VAT - the total amount is correct but the VAT amount is not always 25%. I realized all orders with discounts or gift certificates had the wrong amount of VAT (correct total though).
So I played around with the "Calculate the discount before tax" settings and found something interesting.
My test product costs 1000 SEK so the VAT is supposed to be 200 SEK. My test coupon gives 50% off.
With the "Calculate the discount before tax (Coupons)" setting to NO, I get the following results after applying the discount :
Subtotal : 1.000kr
Discount : -500kr
Tax Total : 200kr
TOTAL : 500kr
See, this doesn't add up. The tax is supposed to be 100kr in this case. The total is correct though.
When I switch "Calculate the discount before tax (Coupons)" to YES, it works :
Subtotal : 1.000kr
Discount : -500kr
Tax Total : 100kr
TOTAL : 500kr
So I thought that was the solution.
But then I ran into another problem with gift certificates and coupons with a nominal value instead of percentage :
My test customer adds the same product to cart. He has 500kr in awocoupon balance.
With "Calculate the discount before tax (Gift Certificates)" set to NO, I get the same VAT issue as above, after applying all customers balance :
Subtotal : 1.000kr
Discount : -500kr
Tax Total : 200kr
TOTAL : 500kr
(the total is correct but the VAT is again supposed to be 100kr)
If I change the setting to YES, the VAT is calculated correctly but it also adds 25% VAT on the actual customer balance, which I don't want :
Subtotal : 1.000kr
Discount : -625kr
Tax Total : 75kr
TOTAL : 375kr
The same thing happens with coupons with nominal values - with the "Calculate the discount before tax..." setting to YES. Let's say I'd like to send a coupon of 500 SEK to my customers - with the setting switched to YES the coupon turns into 625kr, but I want it to stay at 500 SEK. I can of course enter the amount without VAT (that's 400kr) - after all I add all my products prices without VAT - but then the value for non EU customer's is 400kr instead of 500kr - which I also don't want (I want to e-mail ALL my customers and tell them they have 500kr up for grabs, it's simply cleaner and easier that way :).
Now - if I instead create regular native VM coupons it just simply works as expected. Using the same examples above I create a VM coupon of 500 SEK and another one with 50 percent off. They both give the same, correct calculation :
Subtotal : 1.000kr
Discount : -500kr
Tax Total : 100kr
TOTAL : 500kr
So, I assume there's something in my setup that simply doesn't play nice with Awocoupon. The totals are correct, it's just that the VAT part doesn't change - unless I switch the settings mentioned above to YES - which unfortunately leads to other consequences that I don't want ;).
Sorry for my loooong post but I thought some examples would be the best way to describe my problem ;).
Please advise :).
Thank you!
Best regards
Peter