From 09efa97a3170f1da71236617b8b3d192b9175690 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 7 Feb 2022 10:00:17 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/mrp/ajax/interface.php | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/htdocs/mrp/ajax/interface.php b/htdocs/mrp/ajax/interface.php index 639e0d21642..36b17ed9354 100644 --- a/htdocs/mrp/ajax/interface.php +++ b/htdocs/mrp/ajax/interface.php @@ -33,8 +33,7 @@ $fk_product = GETPOST('product_id', 'int'); $action = GETPOST('action', 'alphanohtml'); $permissiontoproduce = GETPOST('permissiontoproduce', 'int'); -if($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) { - +if ($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) { $TRes = array(); $sql = "SELECT pb.batch, pb.rowid, ps.fk_entrepot, pb.qty, e.ref as label, ps.fk_product"; @@ -54,8 +53,7 @@ if($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) { } print json_encode($TRes); -} elseif($action == 'updateselectwarehousebybatch' && $permissiontoproduce){ - +} elseif ($action == 'updateselectwarehousebybatch' && $permissiontoproduce) { $res = 0; $sql = "SELECT pb.batch, pb.rowid, ps.fk_entrepot, e.ref, pb.qty"; @@ -68,16 +66,12 @@ if($action == 'updateselectbatchbywarehouse' && $permissiontoproduce) { $resql = $db->query($sql); - if($resql){ - if($db->num_rows($resql) == 1){ - $obj = $db->fetch_object($resql); - $res = $obj->fk_entrepot; - } + if ($resql) { + if ($db->num_rows($resql) == 1) { + $obj = $db->fetch_object($resql); + $res = $obj->fk_entrepot; + } } print json_encode($res); - } - - -