MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
-$page_security = 3;
-$path_to_root="../..";
+$page_security = 'SA_INVENTORYMOVETYPE';
+$path_to_root = "../..";
include($path_to_root . "/includes/session.inc");
page(_("Inventory Movement Types"));
function can_delete($selected_id)
{
$sql= "SELECT COUNT(*) FROM ".TB_PREF."stock_moves
- WHERE type=" . systypes::inventory_adjustment(). " AND person_id=$selected_id";
+ WHERE type=" . ST_INVADJUST. " AND person_id=".db_escape($selected_id);
+
$result = db_query($sql, "could not query stock moves");
$myrow = db_fetch_row($result);
if ($myrow[0] > 0)