Change the following file: magento\app\code\core\Mage\Tax\Model\Calculation.php
/** * Calculate rated tax abount based on price and tax rate. * If you are using price including tax $priceIncludeTax should be true. * * @param float $price * @param float $taxRate * @param boolean $priceIncludeTax * @return float */ public function calcTaxAmount($price, $taxRate, $priceIncludeTax=false, $round=true) { $taxRate = 10; $taxRate = $taxRate/100; $this->insertInLog('taxRate', $taxRate); $this->insertInLog('price', $price); if ($priceIncludeTax) { $amount = $price*(1-1/(1+$taxRate)); } else { $amount = $price*$taxRate; } $this->insertInLog('Amount', $amount); if ($round) { return $this->round($amount); } else { return $amount; } } /** * Insert in to Log Table. It helps to trace and stores in table * * @param varchar $title * @param varchar $desc */ function insertInLog($title, $desc){ mysql_connect("localhost","root",""); mysql_select_db("magento"); $sql = "insert into log_tbl values('".$title."', '".$desc."', '".date("Y-m-d h:i:s")."')"; mysql_query($sql); }
0 comments:
Post a Comment
Thanks for commenting. I will Reply you soon