- $tax_group_id = $this->tax_group_id;
-
- $taxes = get_tax_for_items($items, $prices, $shipping_cost, $tax_group_id);
-
+ $tax_group_id = $this->tax_group_id;
+ $taxes = get_tax_for_items($items, $prices, $shipping_cost, $tax_group_id,
+ $this->tax_included);
+
+///////////////// Joe Hunt 2009.08.18
+
+ if ($gl_codes)
+ {
+ foreach ($this->gl_codes as $gl_code)
+ {
+ $index = is_tax_account($gl_code->gl_code);
+ if ($index !== false)
+ {
+ $taxes[$index]['Value'] += $gl_code->amount;
+ }
+ }
+ }
+////////////////