Update interface.php
This commit is contained in:
parent
2d728b4cbb
commit
94a2b4bdfc
@ -23,15 +23,24 @@ if (!defined('NOREQUIREAJAX')) {
|
|||||||
define('NOREQUIREAJAX', '1');
|
define('NOREQUIREAJAX', '1');
|
||||||
}
|
}
|
||||||
|
|
||||||
global $db, $langs;
|
|
||||||
|
|
||||||
require '../../main.inc.php'; // Load $user and permissions
|
require '../../main.inc.php'; // Load $user and permissions
|
||||||
|
|
||||||
$warehouse_id = GETPOST('warehouse_id', 'int');
|
$warehouse_id = GETPOST('warehouse_id', 'int');
|
||||||
$batch = GETPOST('batch', 'alphanohtml');
|
$batch = GETPOST('batch', 'alphanohtml');
|
||||||
$fk_product = GETPOST('product_id', 'int');
|
$fk_product = GETPOST('product_id', 'int');
|
||||||
$action = GETPOST('action', 'alphanohtml');
|
$action = GETPOST('action', 'alphanohtml');
|
||||||
$permissiontoproduce = GETPOST('permissiontoproduce', 'int');
|
|
||||||
|
$result = restrictedArea($user, 'mrp');
|
||||||
|
|
||||||
|
$permissiontoproduce = $user->rights->mrp->write;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* View
|
||||||
|
*/
|
||||||
|
|
||||||
|
top_httphead("application/json");
|
||||||
|
|
||||||
if ($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) {
|
if ($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) {
|
||||||
$TRes = array();
|
$TRes = array();
|
||||||
@ -57,7 +66,6 @@ if ($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode($TRes);
|
echo json_encode($TRes);
|
||||||
exit();
|
|
||||||
} elseif ($action == 'updateselectwarehousebybatch' && $permissiontoproduce) {
|
} elseif ($action == 'updateselectwarehousebybatch' && $permissiontoproduce) {
|
||||||
$res = 0;
|
$res = 0;
|
||||||
|
|
||||||
@ -79,5 +87,4 @@ if ($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
echo json_encode($res);
|
echo json_encode($res);
|
||||||
exit();
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user