FIX php 8 error

This commit is contained in:
atm-lena 2022-08-24 09:12:39 +02:00
parent 5146fee408
commit 9537fb3808

View File

@ -48,11 +48,17 @@ if ($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) {
if ($resql) { if ($resql) {
while ($obj = $db->fetch_object($resql)) { while ($obj = $db->fetch_object($resql)) {
$TRes[$obj->batch] += $obj->qty; if(empty($TRes[$obj->batch])){
$TRes[$obj->batch] = $obj->qty;
} else {
$TRes[$obj->batch] += $obj->qty;
}
} }
} }
print json_encode($TRes); echo json_encode($TRes);
exit();
} elseif ($action == 'updateselectwarehousebybatch' && $permissiontoproduce) { } elseif ($action == 'updateselectwarehousebybatch' && $permissiontoproduce) {
$res = 0; $res = 0;
@ -73,5 +79,7 @@ if ($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) {
} }
} }
print json_encode($res); echo json_encode($res);
exit();
} }