X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fincludes%2Fdb%2Fitems_units_db.inc;h=b5c98d9118f7afd5f39d2fcc0f9754618e16a9ed;hb=3ff9ed87cb909f19c8fe3e7dfda5df79d0c01a6c;hp=958b6cafa21c2a473aafb50817de7a2c12a008ef;hpb=818719f38b8327cdca616d58b13913dbd174d96a;p=fa-stable.git diff --git a/inventory/includes/db/items_units_db.inc b/inventory/includes/db/items_units_db.inc index 958b6caf..b5c98d91 100644 --- a/inventory/includes/db/items_units_db.inc +++ b/inventory/includes/db/items_units_db.inc @@ -1,13 +1,13 @@ . + See the License here . ***********************************************************************/ function write_item_unit($selected, $abbr, $description, $decimals) { @@ -58,8 +58,10 @@ function item_unit_used($unit) { 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