0001307: Insufficent quantities "marker" use wrong date in Sales Order
authorJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 22 Jan 2012 08:23:07 +0000 (09:23 +0100)
committerJoe Hunt <joe.hunt.consulting@gmail.com>
Sun, 22 Jan 2012 08:23:07 +0000 (09:23 +0100)
sales/includes/ui/sales_order_ui.inc

index efe856f243415a4a2e1974ce2b71b691d07c04ce..841294de4ec3eb03b97c46405454cb844e59ace4 100644 (file)
@@ -166,7 +166,7 @@ function display_order_summary($title, &$order, $editable_items=false)
                {
                        if (!$SysPrefs->allow_negative_stock() && is_inventory_item($stock_item->stock_id)) {
                                $qoh = get_qoh_on_date($stock_item->stock_id, 
-                                       $_POST['Location'], $_POST['OrderDate']);
+                                       $_POST['Location'], $_POST['delivery_date']);
                                if ($stock_item->qty_dispatched > $qoh) 
                                {
                                        // oops, we don't have enough of one of the component items