$tax_multiplier += $taxitem["rate"];
}
- return $price / (1 + ($tax_multiplier / 100));
+ return round($price / (1 + ($tax_multiplier / 100)), user_price_dec());
}
//
// Full price (incl. VAT) for item $stock_id with line price $price,
$tax_multiplier += $taxitem["rate"];
}
- return $price * (1 + ($tax_multiplier / 100));
+ return round($price * (1 + ($tax_multiplier / 100)), user_price_dec());
}
//---------------------------------------------------------------------------------
foreach ($item_taxes as $item_tax)
{
$index = $item_tax['tax_type_id'];
- if($tax_included==1)
- $ret_tax_array[$index]['Value'] += $prices[$i] * $item_tax['rate']
- / ($item_tax['rate'] + 100);
+ if($tax_included==1) // 2008-11-26 Joe Hunt Taxes are stored without roundings
+ //$ret_tax_array[$index]['Value'] += round($prices[$i] * $item_tax['rate']
+ // / ($item_tax['rate'] + 100), user_price_dec());
+ $ret_tax_array[$index]['Value'] += ($prices[$i] * $item_tax['rate'] / ($item_tax['rate'] + 100));
else
- $ret_tax_array[$index]['Value'] += $prices[$i] * $item_tax['rate'] / 100;
+ //$ret_tax_array[$index]['Value'] +=
+ // round($prices[$i] * $item_tax['rate'] / 100, user_price_dec());
+ $ret_tax_array[$index]['Value'] += ($prices[$i] * $item_tax['rate'] / 100);
}
}
}
{
$index = $item_tax['tax_type_id'];
if(isset($ret_tax_array[$index])) {
- if($tax_included==1)
- $ret_tax_array[$index]['Value'] += $shipping_cost * $item_tax['rate']
- / ($item_tax['rate'] + 100);
+ if($tax_included==1) // 2008-11-26 Joe Hunt Taxes are stored without roundings
+ //$ret_tax_array[$index]['Value'] += round($shipping_cost * $item_tax['rate']
+ // / ($item_tax['rate'] + 100), user_price_dec());
+ $ret_tax_array[$index]['Value'] += ($shipping_cost * $item_tax['rate'] / ($item_tax['rate'] + 100));
else
- $ret_tax_array[$index]['Value'] += $shipping_cost * $item_tax['rate'] / 100;
+ //$ret_tax_array[$index]['Value'] +=
+ // round($shipping_cost * $item_tax['rate'] / 100, user_price_dec());
+ $ret_tax_array[$index]['Value'] += ($shipping_cost * $item_tax['rate'] / 100);
}
}
}