Merged changes from main trunk up to version_2_1_4
[fa-stable.git] / includes / db / manufacturing_db.inc
index c2f34d9be21aac04c17bd4fcde878753313fe158..1153010d725e78cb92f1b7592c999c6c6f7ba435 100644 (file)
@@ -60,7 +60,7 @@ function stock_demand_manufacture($stock_id, $qty, $demand_id, $location, $level
        }
        $stock_qty = $qoh_stock[$stock_id];
        if ($stock_qty == NULL) $stock_qty = 0;
-       if ($qty < $stock_qty) return $demand;
+       if ($qty <= $stock_qty) return $demand;
        $bom = $bom_list[$stock_id];
        if ($bom == NULL) {
                $sql = "SELECT parent, component, quantity FROM ".TB_PREF."bom WHERE parent = '$stock_id'";