Changed context help organization to enable use of central, multilanguage wiki.
[fa-stable.git] / inventory / manage / items.php
index 9d30127725d6b60ffa49b70d2af4ceaa768aca28..0fadbe52b4d6d9be11ecd391613db456724e3355 100644 (file)
@@ -13,7 +13,7 @@ $page_security = 'SA_ITEM';
 $path_to_root = "../..";
 include($path_to_root . "/includes/session.inc");
 
-page(_("Items"), @$_REQUEST['popup']);
+page(_($help_context = "Items"), @$_REQUEST['popup']);
 
 include_once($path_to_root . "/includes/date_functions.inc");
 include_once($path_to_root . "/includes/ui.inc");
@@ -212,16 +212,16 @@ function check_usage($stock_id, $dispmsg=true)
 {
        $sqls=  array(
        "SELECT COUNT(*) FROM "
-               .TB_PREF."stock_moves WHERE stock_id='$stock_id'" =>
+               .TB_PREF."stock_moves WHERE stock_id=".db_escape($stock_id) =>
         _('Cannot delete this item because there are stock movements that refer to this item.'),
        "SELECT COUNT(*) FROM "
-               .TB_PREF."bom WHERE component='$stock_id'"=>
+               .TB_PREF."bom WHERE component=".db_escape($stock_id)=>
         _('Cannot delete this item record because there are bills of material that require this part as a component.'),
        "SELECT COUNT(*) FROM "
-               .TB_PREF."sales_order_details WHERE stk_code='$stock_id'" =>
+               .TB_PREF."sales_order_details WHERE stk_code=".db_escape($stock_id) =>
         _('Cannot delete this item because there are existing purchase order items for it.'),
        "SELECT COUNT(*) FROM "
-               .TB_PREF."purch_order_details WHERE item_code='$stock_id'"=>
+               .TB_PREF."purch_order_details WHERE item_code=".db_escape($stock_id)=>
         _('Cannot delete this item because there are existing purchase order items for it.')
        );