From 390d8694dafb86364dbd9f17cd65316a456b6281 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 2 Feb 2022 14:38:33 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/mrp/ajax/interface.php | 20 +++++++------------- htdocs/mrp/mo_production.php | 1 - 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/htdocs/mrp/ajax/interface.php b/htdocs/mrp/ajax/interface.php index 45709b81ac0..018f92b5dfb 100644 --- a/htdocs/mrp/ajax/interface.php +++ b/htdocs/mrp/ajax/interface.php @@ -32,8 +32,7 @@ $batch_id = GETPOST('batch_id', 'int'); $fk_product = GETPOST('product_id', 'int'); $action = GETPOST('action', 'alphanohtml'); -if($action == 'updateselectbatchbywarehouse') { - +if ($action == 'updateselectbatchbywarehouse') { $TRes = array(); $sql = "SELECT pb.batch, pb.rowid, ps.fk_entrepot, pb.qty, e.ref as label, ps.fk_product"; @@ -53,8 +52,7 @@ if($action == 'updateselectbatchbywarehouse') { } print json_encode($TRes); -} elseif($action == 'updateselectwarehousebybatch'){ - +} elseif ($action == 'updateselectwarehousebybatch') { $res = 0; $sql = "SELECT pb.batch, pb.rowid, ps.fk_entrepot, e.ref, pb.qty"; @@ -67,16 +65,12 @@ if($action == 'updateselectbatchbywarehouse') { $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); - } - - - diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index c13d1ffed9b..976801c5e3d 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -184,7 +184,6 @@ if (empty($reshook)) { $pos = 0; // Process line to consume foreach ($object->lines as $line) { - if ($line->role == 'toconsume') { $tmpproduct = new Product($db); $tmpproduct->fetch($line->fk_product);