VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: seaniemorris on February 20, 2013, 11:03:38 AM

Title: Tax being added to product's custom field option - not wanted!
Post by: seaniemorris on February 20, 2013, 11:03:38 AM
Hi there,

I have a 'Size' custom field that can be added to my products, and under the Custom Field tab in any Product, I can add this. However, if, for example, L, XL and XXL there is an extra charge, which I add e.g. €5.00000 into the 'Price' field, when viewing the product in the shop end the VAT is being added to those size options before Add to Basket (i.e., not just €5 but +23% = €6.15) - this I don't want to happen! What am I missing from the tax calculation in order to have it exempt from any custom field options for any product?

Thanks in advance,

Seanie.
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: seaniemorris on March 05, 2013, 11:05:29 AM
My own solution to this problem has been to calculate the pre-tax price of the custom field option add-on. Not desirable, but it works.

Seanie.
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: mignonnette on March 10, 2013, 02:06:09 AM
Has the same problem. hope to find out the best solution
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: illusiondrmr on March 16, 2013, 17:16:21 PM
+1 here.. "calculate the pre-tax price of the custom field option " is an option but ain't practical @ all considering the amount of calculations need to be done... Also, it ain't correct cause the final end user will see (+100euros) in the dropdown selection and when he clicks it will magically be +123euros (considering u got 23% VAT tax).. So, this is VERY misleading..

Vm1 didn't have that issue.. Somethings fixed and somethings for a weird reason are ruined in vm2 ;<
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: Rixters on March 21, 2013, 21:44:54 PM
I've got the same problem! Base price is € 100,- including tax. When I add a custom field with € 10,- a pice of € 12,10 gets added to the base price. Add the end there wil be double tax added to the custom field product! My tax is setup: Vat tax per product (+21%)

Hope someone has a solution!

Thanks in advance for any help.
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: illusiondrmr on March 22, 2013, 13:58:03 PM
I hope for an answer from any VM developer, even if its "Sorry, we cant do anything".
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: illusiondrmr on April 03, 2013, 14:40:20 PM
Friendly bump cause i really need an answer ;>
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: seaniemorris on April 09, 2013, 12:58:47 PM
Quote from: illusiondrmr on March 22, 2013, 13:58:03 PM
I hope for an answer from any VM developer, even if its "Sorry, we cant do anything".

Nah, unlikely. The amount of similar threads I have founf on these forums with NO replies with the creative, coding community is disheartening. VM2 has been a big let down for me.

What I must continue to do is take out the calculator and double back to get the pre-tax price. When you have a lot of goods, it's annoying.

Seanie.
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: Milbo on April 10, 2013, 17:43:55 PM
Guys, I am sorry, but ....

First the people said it is a bug that that it is not shown with tax. Yepp I am experienced now and know that there are people who want it exactly this way, so I added a config setting. Please check the pricing tab and search for "Display variant prices with tax " disable it and be happy.
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: illusiondrmr on April 15, 2013, 15:20:18 PM
Quote from: Milbo on April 10, 2013, 17:43:55 PM
Guys, I am sorry, but ....

First the people said it is a bug that that it is not shown with tax. Yepp I am experienced now and know that there are people who want it exactly this way, so I added a config setting. Please check the pricing tab and search for "Display variant prices with tax " disable it and be happy.

Ahh an answer !! ;>
Im using 2.0.20b saw this option, i unchecked it, but nothing happened. Again, the tax(VatTax Per Product) is added to the price of the cart variant custom field. Am i doing something wrong ?
Title: Custom Field Price with tax
Post by: schluff81 on April 19, 2013, 21:40:09 PM
Hi folks,

I'm looking for a way to show the custom field price including a tax. This is essential in Germany due to german law. Are there any extensions which enable this or does anyone know a core hack?

thx,
Daniel
Title: Re: Custom Field Price with tax
Post by: CSPS on April 28, 2013, 09:24:22 AM
If I have understood your question, can't you do this under
Virtuemart > Configuration > Pricing > tick box 'Display variant prices with tax ' 
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: nikpony on April 28, 2013, 16:36:11 PM
I have decided that i would never again use VM but a customer wanted a template that was VM and i didn't have many choices...
So again bugs and problems as always...this bug also seems in my occasion and i want to fix it quickly.
I made an update to the 2.0.20, i also unchecked the Display variant prices with tax but nothing changed.
Can a developer fix it or do you want to lose fans every day with your bugs?
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: JurgenG on May 17, 2013, 12:13:31 PM
Hello all.

I had the same issue (v2.0.16). The added value on the dropdown list of the variant-list was without tax and upon changing the variant the final price had the variant value included but WITH tax.
The solution provided by Milbo did not resolve this at least not totally..... at first.

Doing some digging in the core files i stumbled upon a line in \administrator\components\com_virtuemart\helpers\calculationh.php line 1096:
function calculateCustomPriceWithTax($price, $override_id=0) { .....

Changed the 0 into 1 and Milbo's solution worked. (For me atleast)
function calculateCustomPriceWithTax($price, $override_id=1) { .....

The variant values in the dropdown list are now INCLUDING TAX.
In the backend the price has still be inserted as EXCLUDING TAX

Maybe this will help others aswell.
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: seweryn on June 12, 2013, 15:57:50 PM
Hello, I have this problem in VM 2.0.8 (I can't make updte to the new version because I have a lot of my own changes in code of VM).

I would invert function, that I write in admin product tab price with TAX, and then this price is displayed in drop list on front and this price is adding to default product price.
Where can I find appropriate functions in VM, which I should modify?

Please help.
Title: Re: Custom Field Price with tax
Post by: markus.palsson on July 31, 2013, 08:30:32 AM
Hi schluff81,

Did you get this to work? I have the same problem, and when I tick the "configuration>pricing>display variant prices with tax" I get the double tax added in the dropdown list for some reason...

Best Regards,
Markus
Title: Re: Custom Field Price with tax
Post by: Maxim Pishnyak on July 31, 2013, 10:50:18 AM
Could this be helpful for you?
http://forum.virtuemart.net/index.php?topic=113234.msg389811#msg389811
Title: Re: Custom Field Price with tax
Post by: markus.palsson on July 31, 2013, 15:33:00 PM
Hi Maxim,

Thanks for taking the effort, but I have already seen that thread, and was curious if there was any way to solve the problem without a core hack. Also I'm wondering if I'm doing something wrong, because it seems liks such an obviuous bug, and yet nobody (almost) is complaining about it. Is there any plans to fix this in a not too future update?

Best Regards,
Markus
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: jjk on July 31, 2013, 22:28:33 PM
Quote from: markus.palsson on July 31, 2013, 15:33:00 PM
Also I'm wondering if I'm doing something wrong...
Probably a configuration problem, because it works for (almost) everybody else.  :)

QuoteI get the double tax added in the dropdown list for some reason...
What do you mean? Does the tax display twice or is it added to your net price twice? Can you provide a link to your shop or attach a screenshot to a forum post, so we can see your problem?
You may also give a short description of your price/tax settings which would allow other forum members to try to reproduce the problem. Also, which versions of Joomla/VM/php are you using?
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: Milbo on August 01, 2013, 09:41:56 AM
Quote from: Rixters on March 21, 2013, 21:44:54 PM
I've got the same problem! Base price is € 100,- including tax. When I add a custom field with € 10,- a pice of € 12,10 gets added to the base price. Add the end there wil be double tax added to the custom field product! My tax is setup: Vat tax per product (+21%)

There is the problem. "Base price is € 100,- including tax", this is wrong. What you sayed is something like "the netto price is 100 euro, including tax". The baseprice is called baseprice, because it is WITHOUT TAX AND WITHOUT ANY DISCOUNT !


Quote from: JurgenG on May 17, 2013, 12:13:31 PM
The variant values in the dropdown list are now INCLUDING TAX.
In the backend the price has still be inserted as EXCLUDING TAX

Maybe this will help others aswell.

The config setting allows you to display it with tax, or without.
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: markus.palsson on August 05, 2013, 16:51:46 PM
Milbo, jjk,

Please see my other thread for my versions etc: http://forum.virtuemart.net/index.php?topic=117566.0

jkk: the tax is added to the net price twice. See the attached table. The upper table shows how I want it to be, and the bottom shows how it is. Note that 50% tax is added to the custom price instead of 25%. What happens if I disable "display variant prices with tax" is that the front end custom price is $120 instead, i.e. tax is added to the base price but not the variant price, which is very misleading. The price in the shopping cart is correct regardless of "display variant prices with tax".

Milbo, do you see the problem?

If you want a real example go to this product on my shop: http://shop.animalix.se/index.php/hund/ovriga-tillbehor/hurtta-lifeguard-flytvast-for-hund-detail.
The prices are in SEK (swedish). As you can see the front end price is 399 for the smallest size, then according to the dropdown menu the addtional price for the bigger sizes are +120kr and +180kr.
In the backend the base price excl. 25% tax is 319.2kr and the custom prices for the bigger sizes are +80kr and +120kr. If you add tax to that you don't get +120 and +180.
If you add one of the sizes to the shopping cart you'll see that the prices in the shopping cart are correct.
I've attached screenshots of my backend prices.

I still HOPE I'm doing something wrong, cause then it would be easier to correct =), but I can't seem to find the error. Please guys, help me solve this!

[attachment cleanup by admin]
Title: Re: Tax being added to product's custom field option - not wanted!
Post by: markus.palsson on August 05, 2013, 17:18:37 PM
I finally solved the problem!  ;D

Turns out that it didn't work because I had two tax rules defined, one that I created manually, called "+25% VAT", and one that was CSVI created. Somehow, both were used. As soon as I removed the "+25% VAT" rule and only left the CSVI created rule, everything started working!

I still think it's a bug though. I mean, you should be allowed to define as many tax rules as you want as long as you only assign ONE of the the product in question, right?

Anyway, I'm happy to have a shop with correct prices ;)