From b4734c926527e55cf43109afa21ee32ac3acdfa0 Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 19 Sep 2014 02:04:30 +0200 Subject: [PATCH] We must always test for stock availability by todays date. --- sales/sales_order_entry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sales/sales_order_entry.php b/sales/sales_order_entry.php index f73a6d5f..a147ea7f 100644 --- a/sales/sales_order_entry.php +++ b/sales/sales_order_entry.php @@ -509,7 +509,7 @@ function check_item_data() elseif ($is_inventory_item && $_SESSION['Items']->trans_type!=ST_SALESORDER && $_SESSION['Items']->trans_type!=ST_SALESQUOTE && !$SysPrefs->allow_negative_stock()) { - $qoh = get_qoh_on_date($_POST['stock_id'], $_POST['Location'], $_POST['OrderDate']); + $qoh = get_qoh_on_date($_POST['stock_id'], $_POST['Location'], null); // Of course we must always test for stock availability by todays date. if (input_num('qty') > $qoh) { $stock = get_item($_POST['stock_id']); -- 2.30.2