problem with price calculation in VM2 - How can I change base price rounding?

Started by osclicker, February 27, 2012, 20:14:11 PM

Previous topic - Next topic

osclicker

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




osclicker

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 €.

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

lipes

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
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25