VirtueMart Forum

VirtueMart 2 + 3 + 4 => Product creation => Topic started by: osclicker on February 27, 2012, 20:14:11 PM

Title: problem with price calculation in VM2 - How can I change base price rounding?
Post by: osclicker on February 27, 2012, 20:14:11 PM
Hi,
in order to calculate the final price for a product I need a base price of 3 digits after comma. Unfortunately VM2 by default offer only 2 digits after comma for the base price. By this I can only reach 13.99 or 14.01 €, but I need 14.00 € exactly.

Example:
Cost Price = 11.76490
Base Price = 11.77
Final Price = 14.01

I have a rule with 19% tax for Germany.

How can I adjust the price calculation/change the base price calculation in order to reach a final price of 14.00 €?
I have Joomla 1.7.4 with Virtuemart 2.0.0

Thank you in advance for help!

Oliver



Title: Re: problem with price calculation in VM2 - How can I change base price rounding?
Post by: osclicker on March 01, 2012, 10:33:04 AM
Ok, I have changed the function in calculation.php and it now works perfectly with 3 decimals calculated for for the final price.
Here is the solution: https://forum.virtuemart.net/index.php?topic=98076.msg323403#msg323403
Now, I get 14,00 € instead of 14,01 €.
Title: Re: problem with price calculation in VM2 - How can I change base price rounding?
Post by: Milbo on March 02, 2012, 00:27:58 AM
ah nice, yes I admit the configuration for the internal rounding is missing. But I set the standard on 4 now, erhrm and rename the function maybe.
Title: Re: problem with price calculation in VM2 - How can I change base price rounding?
Post by: lipes on March 03, 2012, 06:05:18 AM
if we could write directly the Final Price (like in VM1 .. )  .... or if the Final Price was the default price .. we dont get this kind of problems because the rouded was in the base price ;D

i'll love if we got that solution in the future of VM2 (i'll hope..)... like i said beforein some post the most important thing to display is the principal price that all clients pay at the end in any place (fisical or virtual shop) for any product...
http://forum.virtuemart.net/index.php?topic=98944.0