Bug 5522, 5523, 5524: Journal Entry Affecting in both sales and purchase and more...
[fa-stable.git] / includes / ui / items_cart.inc
index 7de50277ff2d9fcc40104c0d0365064c8451f800..f5b1940d317dc9842ad8e36337c4bf3b63a27b5e 100644 (file)
@@ -280,7 +280,7 @@ class items_cart
                        } elseif ($tax_id = is_tax_account($gl->code_id))
                        {
                                $tax_type = get_tax_type($tax_id);
-                               if ($gl->code_id == $tax_type['purchasing_gl_code']) {
+                               if ($gl->code_id == $tax_type['purchasing_gl_code'] && $gl->amount > 0) {
                                        if (!isset($tax_info['tax_in'][$tax_id]))
                                                $tax_info['tax_in'][$tax_id] = 0;
                                        $tax_info['tax_in'][$tax_id] += $gl->amount;