News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

need to tax bill total after discount not before

Started by Parsimonious, January 26, 2013, 23:27:09 PM

Previous topic - Next topic

Parsimonious

Joomla 2.5.8
VM 2.0.18a

I just tried to set up a coupon for customers for the first time, but I found that VM seems to apply tax and then take the $ amount off. In Canada you need to take the $ amount off then charge tax only on the discounted price. Is there a way to accomplish this?

Thanks

jingtao

Joomla 2.5.8
Virtuemart 2.0.18a

I have a similar issue, but probably with a slightly different setup.

As I need to show all my product prices inclusive of GST, I have entered all my product prices exc GST, then created a calculation rule called GST 10%, Tax per product, +10%.

Then I created a calculation rule targeting the -default- shopper group (i.e. registered shoppers), these shoppers get 10% off the bill total. Initially I created a calculation rule 10% off promotion, Price modifier before tax per bill, -10%.

On my cart page, I show the total amount of GST included in the bill. This figure is not correct, it did not have the 10% discount applied to it. So a bill total of $100, would be discounted to $90 after the 10% off, but the GST included shown is $9.09 ($100 / 11), not $8.18 ($90 / 11).

To resolve this, I created two calculation rules, one that reduces the bill total exc GST, another that reduces the GST alone:
10% off promotion (GST exclusive), Price modifier before tax per bill, -%9.0909
10% off promotion (GST amount), Tax per bill, -%1


This produces the correct result, however I now have two discount lines on the cart totals summary.

I am going to try hardcoding the calculation rules and combining them into one line on the cart page, but if anyone here knows of an alternative way to set up this that would be great.

K&K media production

@jingtao

There is a bug in calculationhelper to calculate totaltax with discount.

After next update it should work correct.

K&K media production

You can download the new calculationh.php on this site:

http://dev.virtuemart.net/projects/virtuemart/repository/show/branches/com_virtuemart2.0.14mp/administrator/components/com_virtuemart/helpers

Copy the file calculationh.php to your current vm 2.0.18a and replace the existing one. (Don't forget backup)


Parsimonious

Tried installing the fix and the cart page just hangs when you try to view it. You can see the fields on the page, but it's in the washed out looking state with a loading bar at the top and you can't interact with any of the fields. Thanks you for the reminder to back up the old file - I just reinstalled it for now.

K&K media production

I've currently test it with this file and the cart works correct.

Parsimonious

I'll try it again later. I had one page checkout installed so that may have been causing an issue.