FIX : Retours
This commit is contained in:
parent
8daa1a810a
commit
48b131b3f0
@ -2,8 +2,8 @@
|
||||
require '../../main.inc.php';
|
||||
|
||||
$action = GETPOST('action', 'alphanohtml');
|
||||
$select_product_val = GETPOST('select_product_val', 'alphanohtml');
|
||||
$current_bom_id = GETPOST('current_bom_id', 'alphanohtml');
|
||||
$select_product_val = GETPOST('select_product_val', 'int');
|
||||
$current_bom_id = GETPOST('current_bom_id', 'int');
|
||||
|
||||
global $db;
|
||||
|
||||
@ -12,7 +12,7 @@ switch ($action) {
|
||||
//Selection of nomenclatures corresponding to the selected product
|
||||
$sql = 'SELECT b.rowid, b.ref, b.label, b.fk_product, p.label AS product_label FROM '.MAIN_DB_PREFIX.'bom_bom AS b ';
|
||||
$sql.= ' INNER JOIN '.MAIN_DB_PREFIX.'product AS p ON b.fk_product=p.rowid';
|
||||
$sql.= ' WHERE fk_product='.$select_product_val.' AND b.rowid!='.$current_bom_id;
|
||||
$sql.= ' WHERE fk_product='.(int)$select_product_val.' AND b.rowid<>'. (int)$current_bom_id;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql && $db->num_rows($resql) > 0) {
|
||||
$options = array();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user