X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=taxes%2Ftax_calc.inc;h=acc8f0f0633d468aadd47b528f3ad2262b717bd9;hb=813a5c558638f7937da410b969a7935dd0de7342;hp=9d1ba576097fba04bc6ccac1e86fdf24a4c4b6e1;hpb=d34add5e762a470a52fade37173b4491462ee22a;p=fa-stable.git diff --git a/taxes/tax_calc.inc b/taxes/tax_calc.inc index 9d1ba576..acc8f0f0 100644 --- a/taxes/tax_calc.inc +++ b/taxes/tax_calc.inc @@ -175,12 +175,14 @@ function get_tax_for_items($items, $prices, $shipping_cost, $tax_group, $tax_inc foreach ($item_taxes as $item_tax) { $index = $item_tax['tax_type_id']; - if($tax_included==1) - $ret_tax_array[$index]['Value'] += round($prices[$i] * $item_tax['rate'] - / ($item_tax['rate'] + 100), user_price_dec()); + 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'] += - round($prices[$i] * $item_tax['rate'] / 100, user_price_dec()); + //$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); } } } @@ -195,12 +197,14 @@ function get_tax_for_items($items, $prices, $shipping_cost, $tax_group, $tax_inc { $index = $item_tax['tax_type_id']; if(isset($ret_tax_array[$index])) { - if($tax_included==1) - $ret_tax_array[$index]['Value'] += round($shipping_cost * $item_tax['rate'] - / ($item_tax['rate'] + 100), user_price_dec()); + 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'] += - round($shipping_cost * $item_tax['rate'] / 100, user_price_dec()); + //$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); } } }