VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: paolo.tateo on August 01, 2013, 15:39:47 PM

Title: Very bizzare bug in price visualization [video]
Post by: paolo.tateo on August 01, 2013, 15:39:47 PM
Here's a video that explains the problem (version 2.0.22a)

http://youtu.be/uOHzhMxrWmw
Title: Re: Very bizzare bug in price visualization [video]
Post by: sadrem on August 01, 2013, 16:18:16 PM
Screens of calculations rules please :)
Title: Re: Very bizzare bug in price visualization [video]
Post by: paolo.tateo on August 01, 2013, 17:50:29 PM
(http://www.101vetrine.com/images/screenshot/calculation-rules.jpg)

Thanks :)
Title: Re: Very bizzare bug in price visualization [video]
Post by: sadrem on August 01, 2013, 18:02:33 PM
You'r find the problem .
Some of Your rules doesn't work as expected.
Try to disable all of them and You will see there is no bug.

I also suggest You do not use "use generic calculation rule " in product definition. [comment by Milbo: You should "use generic calculation rule ", explanation below]
If You want vat to be applied choose it.

Regards
Title: Re: Very bizzare bug in price visualization [video]
Post by: paolo.tateo on August 01, 2013, 21:56:53 PM
Thanks, but...

ok, the problem is caused by the rule "Vat tax per product", but this is a standard function of Virtuemart... and you can see my configuration

(http://www.101vetrine.com/images/screenshot/calculation-rules-vat.jpg)
Title: Re: Very bizzare bug in price visualization [video]
Post by: sadrem on August 01, 2013, 22:23:27 PM
Hi,
logic works fine.
for example product price is 1 euro , You have 21% tax = 1.21 euro works like expected

now round :  1.213 -> round (2 decimal after point) -> 1.21
                      1.216 -> round (2 decimal after point) -> 1.22

Tell want do You want to achieve. Give me example. I'll try to provide the solution
Title: Re: Very bizzare bug in price visualization [video]
Post by: paolo.tateo on August 02, 2013, 10:34:22 AM
As you can see from the video that I captured, the problem is the fact that if the rounding is not perfect, VirtueMart shows the price, put a bar on it, and then displays it again as it was discounted

Thanks
Title: Re: Very bizzare bug in price visualization [video]
Post by: Milbo on August 02, 2013, 11:12:22 AM
Paolo the rounding is "perfect". But saying that is already showing a misunderstanding of rounding. Rounding is NOT exact => never perfect.
Please read here http://forum.virtuemart.net/index.php?topic=108809.0

And you should use the generic rules, of course. As long you have only one Vat you can configure it for all your products within 5 minutes. But not if you use the overwrite. Selecting directly a rule in a product is an override. As long you have only one tax per product, you can use the overwrite.
Usually I suggest for 2 different VAt in the shop to create unpublished categories as pure calculation categories. You can then use even different methods for B2C and B2B.

You configured a lot of shoppergroups in your rule. When you use the overwrite, all of this anyway not checked. If you use the calculation rule overwrite stuff like the euvatid plugin which is based on shoppergroups wont work. So avoid to overwrite your product calculation rules (same for discounts btw).

If you want that it works for all shoppergroups, just leave it empty.
Title: Re: Very bizzare bug in price visualization [video]
Post by: paolo.tateo on August 03, 2013, 16:17:25 PM
Thanks Milbo,
I understand your explanation, but (perhaps) could improve the situation by creating a rule, "only for display", which prevents to show a discounted price equal to the non-discounted.

What do you think?
Paolo