[Frontaccounting-cvs_updates] /hgrepo/f/fr/frontaccounting/frontaccounting: Correction in inve...
Brought to you by:
frontaccounting,
itronics
From: FrontAccounting <fro...@us...> - 2011-05-17 21:23:45
|
details: http://frontaccounting.hg.sourceforge.net:8000/hgroot/frontaccounting/frontaccounting/hgrepo/f/fr/frontaccounting/frontaccounting/rev/da8408a9d5c2 changeset: 2791:da8408a9d5c2 user: Joe Hunt <joe...@gm...> date: Tue May 17 23:22:45 2011 +0200 description: Correction in inventory_?db.inc. Chaitanya. diffstat: includes/db/inventory_db.inc | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diffs (33 lines): diff -r f1378165d8ca -r da8408a9d5c2 includes/db/inventory_db.inc --- a/includes/db/inventory_db.inc Sat May 14 09:48:50 2011 +0200 +++ b/includes/db/inventory_db.inc Tue May 17 23:22:45 2011 +0200 @@ -129,7 +129,7 @@ $qty = 0; $flag = 0; - $negative_trans_id = 1; + $negative_trans_id = -1; while ($myrow = db_fetch($result)) { @@ -143,7 +143,10 @@ $flag = 0; } - return $negative_trans_id; + if ($flag == 1) + return $negative_trans_id; + else + return false; } //------------------------------------------------------------------- @@ -208,7 +211,7 @@ return; $from = last_negative_stock_trans_id($stock_id, $to); - if ($from == false || $from == "") + if ($from == false || $from == -1) return; $row = get_deliveries_from_trans($stock_id, $from); |