{
$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.')
);