Set calculation precision to currency + tax decimals (#759)

This commit is contained in:
jekkos
2016-07-25 21:28:56 +02:00
parent 0727ae06af
commit 28129ef075
2 changed files with 1 additions and 2 deletions

View File

@@ -43,6 +43,6 @@ function load_config()
date_default_timezone_set('America/New_York');
}
bcscale((1 + $CI->config->item('quantity_decimals')) * $CI->config->item('tax_decimals'));
bcscale($CI->config->item('currency_decimals') + $CI->config->item('tax_decimals'));
}
?>

View File

@@ -644,7 +644,6 @@ class Sale_lib
public function get_item_tax($quantity, $price, $discount_percentage, $tax_percentage)
{
$price = $this->get_item_total($quantity, $price, $discount_percentage, TRUE);
if($this->CI->config->config['tax_included'])
{
$tax_fraction = bcadd(100, $tax_percentage);