5186: The field lengths of item name and description don't match. Temporary fix and...
[fa-stable.git] / inventory / includes / db / items_units_db.inc
index ec6b8f5ff2729267e41785ff6f4c96841fac0abc..d90b03b39e18944493aa4819da6826d756e49cb2 100644 (file)
@@ -43,9 +43,9 @@ function get_item_unit($unit)
 
 function get_unit_descr($unit)
 {
-       $sql = "SELECT description FROM ".TB_PREF."item_units WHERE abbr=".db_escape($unit);
+       $sql = "SELECT name FROM ".TB_PREF."item_units WHERE abbr=".db_escape($unit);
 
-       $result = db_query($sql, "could not unit description");
+       $result = db_query($sql, "could not retrieve unit description");
 
        $row = db_fetch_row($result);
        return $row[0];
@@ -64,7 +64,7 @@ function get_all_item_units($all=false) {
        $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
+// 2008-06-15. Added to get a measure of unit by given stock_id
 function get_unit_dec($stock_id)
 {
        $sql = "SELECT decimals FROM ".TB_PREF."item_units,     ".TB_PREF."stock_master