Hi,
I finally got it !
So, please edit the file "administrator/components/classes/currency.php" and replace
function getUntaxedPrice(&$price,$zone_id,$tax_category_id,$round=2){
$this->taxRates=array();
$tax = (float)$this->getTax($zone_id,$tax_category_id);
if(empty($tax)) return $this->_round($price,$round);
$config =& hikashop_config();
if(!$config->get('floating_tax_prices',0)){
$float_price=(float)$price;
$untaxedPrice = $this->_round($float_price/(1.00000+$tax),$round);
if(!empty($this->taxRates)){
foreach($this->taxRates as $k => $rate){
$this->taxRates[$k]->tax_amount = $this->_round($float_price*floatval($rate->tax_rate)/(1.00000+floatval($rate->tax_rate)),$round);
}
}
}else{
$untaxedPrice=(float)$price;
$taxedPrice=$this->_round($untaxedPrice+$untaxedPrice*$tax,$round);
if(!empty($this->taxRates)){
foreach($this->taxRates as $k => $rate){
$this->taxRates[$k]->tax_amount = $this->_round($untaxedPrice*floatval($rate->tax_rate),$round);
}
}
}
return $untaxedPrice;
}
By
function getUntaxedPrice(&$price, $zone_id, $tax_category_id, $round = 2) {
$this->taxRates = array();
$tax = (float)$this->getTax($zone_id, $tax_category_id);
if(empty($tax))
return $this->_round($price, $round);
$float_price = (float)$price;
$untaxedPrice = $this->_round($float_price / (1.00000 + $tax), $round);
if(!empty($this->taxRates)) {
foreach($this->taxRates as $k => $rate) {
$this->taxRates[$k]->tax_amount = $this->_round($float_price * floatval($rate->tax_rate) / (1.00000 + floatval($rate->tax_rate)), $round);
}
}
return $untaxedPrice;
}
And it will fix the issue with the floating taxes and the discount after taxes.
I made some tests and some checks ; the modifications does not seems to have bad side effects.
Let me know if you have any feedback on that patch.
Regards,