Update interface.php

This commit is contained in:
Laurent Destailleur 2023-04-04 23:35:42 +02:00 committed by GitHub
parent 2d728b4cbb
commit 94a2b4bdfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,15 +23,24 @@ if (!defined('NOREQUIREAJAX')) {
define('NOREQUIREAJAX', '1');
}
global $db, $langs;
require '../../main.inc.php'; // Load $user and permissions
$warehouse_id = GETPOST('warehouse_id', 'int');
$batch = GETPOST('batch', 'alphanohtml');
$fk_product = GETPOST('product_id', 'int');
$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) {
$TRes = array();
@ -57,7 +66,6 @@ if ($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) {
}
echo json_encode($TRes);
exit();
} elseif ($action == 'updateselectwarehousebybatch' && $permissiontoproduce) {
$res = 0;
@ -79,5 +87,4 @@ if ($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) {
}
echo json_encode($res);
exit();
}