Merged changes form stable branch up to 2.3.13
[fa-stable.git] / sales / includes / ui / sales_order_ui.inc
index af675e7769c6a53b0574021b4b732e03f4b553a9..7de74b07dd2565a397703a25e5f362f04974eff6 100644 (file)
@@ -169,7 +169,8 @@ function display_order_summary($title, &$order, $editable_items=false)
                $qoh_msg = '';
                if (!$editable_items || $id != $line_no)
                {
-                       if (!$SysPrefs->allow_negative_stock() && is_inventory_item($stock_item->stock_id)) {
+                       if (!$SysPrefs->allow_negative_stock() && is_inventory_item($stock_item->stock_id) && 
+                               $order->trans_type != ST_SALESORDER && $order->trans_type!=ST_SALESQUOTE) {
                                $qoh = get_qoh_on_date($stock_item->stock_id, 
                                        $_POST['Location'], $_POST['delivery_date']);
                                if (($stock_item->qty_dispatched -$stock_item->qty_done) > $qoh)