$sql = "UPDATE ".TB_PREF."item_units SET
abbr = ".db_escape($abbr).",
name = ".db_escape($description).",
$sql = "UPDATE ".TB_PREF."item_units SET
abbr = ".db_escape($abbr).",
name = ".db_escape($description).",
else
$sql = "INSERT INTO ".TB_PREF."item_units
(abbr, name, decimals) VALUES( ".db_escape($abbr).",
else
$sql = "INSERT INTO ".TB_PREF."item_units
(abbr, name, decimals) VALUES( ".db_escape($abbr).",
db_query($sql,"an item unit could not be updated");
}
function delete_item_unit($unit)
{
db_query($sql,"an item unit could not be updated");
}
function delete_item_unit($unit)
{
db_query($sql,"an unit of measure could not be deleted");
}
function get_item_unit($unit)
{
db_query($sql,"an unit of measure could not be deleted");
}
function get_item_unit($unit)
{
$result = db_query($sql, "could not query stock master");
$myrow = db_fetch_row($result);
return ($myrow[0] > 0);
$result = db_query($sql, "could not query stock master");
$myrow = db_fetch_row($result);
return ($myrow[0] > 0);
$sql .= " ORDER BY name";
return db_query($sql, "could not get stock categories");
}
$sql .= " ORDER BY name";
return db_query($sql, "could not get stock categories");
}
function get_unit_dec($stock_id)
{
$sql = "SELECT decimals FROM ".TB_PREF."item_units, ".TB_PREF."stock_master
function get_unit_dec($stock_id)
{
$sql = "SELECT decimals FROM ".TB_PREF."item_units, ".TB_PREF."stock_master
$result = db_query($sql, "could not get unit decimals");
$row = db_fetch_row($result);
$result = db_query($sql, "could not get unit decimals");
$row = db_fetch_row($result);