Fixed shipment tax calculation regresion.
authorJanusz Dobrowolski <janusz@frontaccouting.eu>
Mon, 11 Apr 2011 11:34:00 +0000 (13:34 +0200)
committerJanusz Dobrowolski <janusz@frontaccouting.eu>
Mon, 11 Apr 2011 11:34:00 +0000 (13:34 +0200)
taxes/tax_calc.inc

index 08efec416550deb9376b788efce1f3171dcd157a..22fc35f3271a2b36b8525fad691a5fcf1b302cba 100644 (file)
@@ -196,7 +196,7 @@ function get_tax_for_items($items, $prices, $shipping_cost, $tax_group, $tax_inc
                        {
                                if ($item_tax['rate'] != null) {
                                        $index = $item_tax['tax_type_id'];
-                                       if(isset($ret_tax_array[$index])) {
+                                       if (isset($item_tax[$index]['rate'])) { // use customer tax group on shipment 
                                          if($tax_included==1) {// 2008-11-26 Joe Hunt Taxes are stored without roundings
                                                $ret_tax_array[$index]['Value'] += ($shipping_net * $item_tax['rate'] / 100);
                                            $ret_tax_array[$index]['Net'] += $shipping_net;