News:

Support the VirtueMart project and become a member

Main Menu

Double rounding for shipping fee?

Started by sandomatyas, January 29, 2020, 17:26:06 PM

Previous topic - Next topic

sandomatyas

There is a shop with 27% VAT and zero decimals for the currency. The shop owner wants to set a shipping fee with this tax. The gross amount should be 990. I set the fee to 990/1.27=779.527559 but I got 991 as gross price. I tried to change the net amount but I was not able to get 990 only 989 or 991
So I checked the vmPSPlugin.setCartPrices method and found this:
$cart_prices[$this->_psType . 'Value'] = $calculator->roundInternal ($this->getCosts ($cart, $method, $cart_prices), 'salesPrice');
It rounds 779.527559 to 780
And after taxrules were applied roundInternal is triggered again

So if I'm right you need the first roundInternal only if there are no taxrules to apply

jjk

#1
In VM Configuration 'Pricing' tab, check "Round only display". Should work in this case.
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations