Fixed false qoh alerts.
authorJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 11 Jan 2009 20:01:22 +0000 (20:01 +0000)
committerJanusz Dobrowolski <janusz@frontaccounting.eu>
Sun, 11 Jan 2009 20:01:22 +0000 (20:01 +0000)
sales/includes/ui/sales_order_ui.inc

index ab81e5f462688d7864db8ba01a2ebb8c2f815ebf..1349bdb43468e0e0e051d20180f3cc474b8d814e 100644 (file)
@@ -573,6 +573,7 @@ function check_qoh($order)
 {
        $msg = '';
        foreach($order->line_items as $line_no => $line) {
+               if (!is_inventory_item($line['stock_id'])) continue;
                $qoh = get_qoh_on_date($line->stock_id, $_POST['Location'], $_POST['OrderDate']);
                if ($line->qty_dispatched > $qoh)       {
                        $msg .= $line->stock_id . " - " . $line->item_description . ": " .