projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Layout improvements
[fa-stable.git]
/
includes
/
db
/
manufacturing_db.inc
diff --git
a/includes/db/manufacturing_db.inc
b/includes/db/manufacturing_db.inc
index c47cc561815c1387fb6a024c3bb51bb69c6a53f0..9378f645219edbab59dc6aeb24b4778a60a853ce 100644
(file)
--- a/
includes/db/manufacturing_db.inc
+++ b/
includes/db/manufacturing_db.inc
@@
-61,8
+61,8
@@
function stock_demand_manufacture($stock_id, $qty, $demand_id, $location, $level
$qoh_stock = array();
load_stock_levels($location);
}
$qoh_stock = array();
load_stock_levels($location);
}
-
$stock_qty = $qoh_stock[$stock_id]
;
-
if ($stock_qty == NULL) $stock_qty = 0
;
+
if (empty($qoh_stock[$stock_id])) $stock_qty = 0
;
+
else $stock_qty = $qoh_stock[$stock_id]
;
if ($qty <= $stock_qty) return $demand;
$bom = @$bom_list[$stock_id];
if ($bom == NULL) {
if ($qty <= $stock_qty) return $demand;
$bom = @$bom_list[$stock_id];
if ($bom == NULL) {