Fixing style errors.

This commit is contained in:
stickler-ci 2022-02-02 14:38:33 +00:00
parent 952d77c8e1
commit 390d8694da
2 changed files with 7 additions and 14 deletions

View File

@ -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);
}

View File

@ -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);