From: Joe Date: Fri, 19 Sep 2014 00:04:30 +0000 (+0200) Subject: We must always test for stock availability by todays date. X-Git-Tag: 2.3-final~110 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=b4734c926527e55cf43109afa21ee32ac3acdfa0;p=fa-stable.git We must always test for stock availability by todays date. --- 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']);