News:

Support the VirtueMart project and become a member

Main Menu

Wrong tax if a price discount is given

Started by Anders69, March 10, 2012, 15:24:00 PM

Previous topic - Next topic

jjk

Concerning your error message I suppose that your PHP configuration doesn't allow the 'shell_exec()' function. This is one of the functions disabled when PHP is run in Safe Mode.

Concering your price: What do you actually want to achieve? In your screenshot you instruct VM2 to overwrite your base price (100 €) and instead use a net price of 10 € and a final sales price (including 19% BTW) of 11.80 €. There is no discount set.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

bpluijms

Ok. Maybe I don't understand the way a discount works, could you point me in the right direction?

But when I use these settings, on the front-end the "discount price" will show up as you can see in the other screenshot.
There is still a wrong discount amount shown as I have noticed before.

Hope someone can help me out with this. A discount amount of 88,10 Euro which is calculated from a price without tax minus a price with tax doesn't make any sense.

jjk

How to set up pricing, tax and discounts depends on how much of the price calculations you want VirtueMart to do.

Before starting to add lots of products into VM2, you should answer yourself some questions:
Do you want VM2 to calculate the final price from the cost price (the price you have to pay to your supplier) or are you doing this calculation elsewhere?
Do you buy your products in your home currency only or also in countries using other currencies?
Do you want to add the same profit margin (currently VM2 can handle only one) to your cost price?
Do you sell only new products or also used (second hand) products? (when you sell i.e. used cars, BTW is only applied to your profit)
...

However, if you just want to enter a net price into VM2, from which BTW and discounts are calculated, the procedure is not very complicated. In 'Taxes and Calculation Rules' configure the following:

1. Configure BTW 19%, tax per product
2. Configure 'Discount 10% or 10 Euro (before tax) and set it 'visible for vendor and shopper'

Also enable 'Show tax in Cart' in VM2 configuration

Then in your Product Edit view, enter i.e:
100 Euro as the cost price (includes your profit margin, if you don't use a profit margin rule)
Set Override price to 'Disabled'
Select Tax: 19% BTW
Select Discount Type: 10% Discount (or whatever you previously configured in the tax and calculation rules)

In your example this would lead to a final sales price of 107,10 Euro (10% discount on 119 Euro), a tax of 17,10 Euro and a net price of 90,00 Euro




Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

bpluijms

Oké. Thank you for your explanation.
But what if I want to give a couple of products all a different kind of discount. So let say one product 5 Euro discount , the next 8 euro etc.
I thought I could use the price override per product.

And still I do not understand why you guys let VM calculate a discount amount from a base price without tax minus a new price (override) with tax.

This is not something I make up , but something that you could see yourself in the two attached screenshots in the previous posts.

I will mention it again and I hope you will finally see it yourself that it really doesn't make any sense.
In the example I have a base price without tax from 100 Euro. VM says it is without tax calculated.
I have a price override of 10 Euro, from which VM has calculated 11,90 because of the tax rule of 19% I have set.
This is all correct. But now comes the problem.
When I have a price override, VM doesn't show the old price with tax, it shows only the base price without tax.
And, as I have said before, a discount amount is calculated by VM of 88,10 Euro which is the base price without tax minus the price override including tax. It should be both including tax or both be without it.

Could someone explain it to me why this happens? This problem drives me crazy.

bpluijms

After updating to the 2.0.7d the problem is fixed and all prices shown fine. Thank you!