projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved safety handling of bad PHP interpretor releases.
[fa-stable.git]
/
inventory
/
includes
/
db
/
items_units_db.inc
diff --git
a/inventory/includes/db/items_units_db.inc
b/inventory/includes/db/items_units_db.inc
index b3df604a14c40902f1d9a9ce5bf466680e86529e..c06aeafb775d4f3090b7221a6d169948a2b41185 100644
(file)
--- a/
inventory/includes/db/items_units_db.inc
+++ b/
inventory/includes/db/items_units_db.inc
@@
-58,8
+58,10
@@
function item_unit_used($unit) {
return ($myrow[0] > 0);
}
return ($myrow[0] > 0);
}
-function get_all_item_units() {
- $sql = "SELECT * FROM ".TB_PREF."item_units ORDER BY name";
+function get_all_item_units($all=false) {
+ $sql = "SELECT * FROM ".TB_PREF."item_units";
+ if (!$all) $sql .= " WHERE !inactive";
+ $sql .= " ORDER BY name";
return db_query($sql, "could not get stock categories");
}
// 2008-06-15. Added Joe Hunt to get a measure of unit by given stock_id
return db_query($sql, "could not get stock categories");
}
// 2008-06-15. Added Joe Hunt to get a measure of unit by given stock_id