From 4efbac8f02f10e3e99dab0c256d368891011f2c8 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Sun, 22 Jan 2012 23:23:51 +0100 Subject: [PATCH] 0001309: Insufficient Quantities "Red Marker" doesn't take into account dispatched quantity --- sales/includes/ui/sales_order_ui.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sales/includes/ui/sales_order_ui.inc b/sales/includes/ui/sales_order_ui.inc index 841294d..2724292 100644 --- a/sales/includes/ui/sales_order_ui.inc +++ b/sales/includes/ui/sales_order_ui.inc @@ -167,7 +167,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['delivery_date']); - if ($stock_item->qty_dispatched > $qoh) + if (($stock_item->qty_dispatched -$stock_item->qty_done) > $qoh) { // oops, we don't have enough of one of the component items start_row("class='stockmankobg'"); -- 2.30.2