X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=inventory%2Fincludes%2Fdb%2Fitems_category_db.inc;h=3c643d523dfc2e35fb4c74dce5d8ac24742b4c08;hb=fd069bba86276f15311ff6ab10b22d4a06a55513;hp=b454b88127da7b9808e239708319b4c008cb2d32;hpb=0a6ba584ca896ba3b592c54e2421a6ab75207c42;p=fa-stable.git diff --git a/inventory/includes/db/items_category_db.inc b/inventory/includes/db/items_category_db.inc index b454b881..3c643d52 100644 --- a/inventory/includes/db/items_category_db.inc +++ b/inventory/includes/db/items_category_db.inc @@ -66,12 +66,17 @@ function delete_item_category($id) 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"; 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");