PHP 7.X produces A non-numeric value encountered in \includes\date_functions.inc...
[fa-stable.git] / includes / ui / items_cart.inc
index 96108f483a346b3d6f0989243e734a5d08f59c7d..0e32165b0be23c17dda2b8fc05fcd11cbd26330d 100644 (file)
@@ -101,7 +101,7 @@ class items_cart
 
                $low_stock = array();
 
-       if (!$SysPrefs->allow_negative_stock() || is_fixed_asset($line_item->mb_flag))
+       if (!$SysPrefs->allow_negative_stock())
        {
                        foreach ($this->line_items as $line_no => $line_item)
                                if (has_stock_holding($line_item->mb_flag) || is_fixed_asset($line_item->mb_flag))
@@ -309,7 +309,7 @@ class items_cart
                if (!isset($tax_info['tax_reg']) && isset($tax_info['person_type']))
                        $tax_info['tax_reg'] = $tax_info['person_type']==PT_CUSTOMER ? TR_OUTPUT : TR_INPUT;
 
-               if (count(@$tax_info['net_amount']))    // guess exempt sales/purchase if any tax has been found
+               if (count_array(@$tax_info['net_amount']))      // guess exempt sales/purchase if any tax has been found
                {
                        $ex_net = abs($net_sum) - @array_sum($tax_info['net_amount']);
                        if ($ex_net != 0)