- $tax_items = get_shipping_tax_as_array($this->tax_group_id);
- $tax_rate = 0;
- if ($tax_items != null) {
- foreach ($tax_items as $item_tax) {
- $index = $item_tax['tax_type_id'];
- if (isset($this->tax_group_array[$index]['rate'])) {
- $tax_rate += $item_tax['rate'];
- }
- }
- }
- if($this->tax_included)
- return round($this->freight_cost*$tax_rate/($tax_rate+100), user_price_dec());
- else
- return round($this->freight_cost*$tax_rate/100, user_price_dec());