projects
/
textcart.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c0ca25
)
Fixed qoh to return 0 instead of null when moves history is empty.
author
Maxime Bourget
<bmx007@gmail.com>
Sun, 23 Jun 2013 19:54:18 +0000
(20:54 +0100)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Tue, 16 Jul 2013 12:15:27 +0000
(14:15 +0200)
includes/db/inventory_db.inc
patch
|
blob
|
history
diff --git
a/includes/db/inventory_db.inc
b/includes/db/inventory_db.inc
index aca5447577cf512cab8d7bbfc6c75886411dd13e..288434d50a133217e8896db499201448f0d12390 100644
(file)
--- a/
includes/db/inventory_db.inc
+++ b/
includes/db/inventory_db.inc
@@
-45,7
+45,8
@@
function get_qoh_on_date($stock_id, $location=null, $date_=null, $exclude=0)
$myrow[0] -= $myrow2[0];
}
- return $myrow[0];
+ $qoh = $myrow[0];
+ return $qoh ? $qoh : 0;
}
//--------------------------------------------------------------------------------------
@@
-428,4
+429,4
@@
function get_location_name($loc_code)
//--------------------------------------------------------------------------------------------------
-?>
\ No newline at end of file
+?>