Hello there,
I was wondering if there is a way to round the discounted final sales price to the nearest 5 THB or nearest 10 THB.
Using the discount calculation is great, but I would prefer the final sales price to be in multiples of 5 THB.
Site is www.divegearthailand.com
Using Joomla 3.4.3, VM 3.0.9.4
All help much appreciated!
never tried but heard a rumour that the VM config setting -> Use the Rappenrundung for Swiss CHF -- rounds to 5/10..
to .00 or .05, yes
Did a bit of work on this... Use the Rappenrundung for Swiss CHF only affects the display
to get it to work on the actual amounts being used in calc (tax, the stored amounts etc) it needed a hack to the the administrator\components\com_virtuemart\helpers\calculationh.php
only use if $this->vendorCurrency_numeric==756 if Swiss francs
function roundInternal($value,$name = 0) {
if(!$this->_roundindig and $name!==0){
if($this->vendorCurrency_numeric==756 and VmConfig::get('rappenrundung',FALSE)=="1"){
//vmdebug('roundInternal rounding using rappenrundung');
return round((float)$value * 2,1) * 0.5;
}elseif(isset($this->_currencyDisplay->_priceConfig[$name][1])){
vmdebug('roundInternal rounding use '.$this->_currencyDisplay->_priceConfig[$name][1].' digits');
return round($value,$this->_currencyDisplay->_priceConfig[$name][1]);
} else {
vmdebug('roundInternal rounding not found for '.$name,$this->_currencyDisplay->_priceConfig[$name]);
return round($value, $this->_internalDigits);
}
} else {
return round($value, $this->_internalDigits);
}
}