projects
/
fa-stable.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bugfixes in fixed assets editor.
[fa-stable.git]
/
inventory
/
includes
/
db
/
items_category_db.inc
diff --git
a/inventory/includes/db/items_category_db.inc
b/inventory/includes/db/items_category_db.inc
index 25368ee75e12c1357e0e002e74ab686b952af1c6..3c643d523dfc2e35fb4c74dce5d8ac24742b4c08 100644
(file)
--- a/
inventory/includes/db/items_category_db.inc
+++ b/
inventory/includes/db/items_category_db.inc
@@
-66,11
+66,18
@@
function delete_item_category($id)
db_query($sql,"an item category could not be deleted");
}
db_query($sql,"an item category could not be deleted");
}
-function get_item_categories($show_inactive)
+function get_item_categories($show_inactive
, $fixed_asset=false
)
{
$sql = "SELECT c.*, t.name as tax_name FROM ".TB_PREF."stock_category c, "
.TB_PREF."item_tax_types t WHERE c.dflt_tax_type=t.id";
{
$sql = "SELECT c.*, t.name as tax_name FROM ".TB_PREF."stock_category c, "
.TB_PREF."item_tax_types t WHERE c.dflt_tax_type=t.id";
- if (!$show_inactive) $sql .= " AND !c.inactive";
+ if (!$show_inactive)
+ $sql .= " AND !c.inactive";
+ if ($fixed_asset)
+ $sql .= " AND c.dflt_mb_flag='F'";
+ else
+ $sql .= " AND c.dflt_mb_flag!='F'";
+
+ $sql .= " ORDER by description";
return db_query($sql, "could not get stock categories");
}
return db_query($sql, "could not get stock categories");
}
@@
-94,4
+101,3
@@
function get_category_name($id)
return $row[0];
}
return $row[0];
}
-?>
\ No newline at end of file