Fixing style errors.
This commit is contained in:
parent
952d77c8e1
commit
390d8694da
@ -32,8 +32,7 @@ $batch_id = GETPOST('batch_id', 'int');
|
|||||||
$fk_product = GETPOST('product_id', 'int');
|
$fk_product = GETPOST('product_id', 'int');
|
||||||
$action = GETPOST('action', 'alphanohtml');
|
$action = GETPOST('action', 'alphanohtml');
|
||||||
|
|
||||||
if($action == 'updateselectbatchbywarehouse') {
|
if ($action == 'updateselectbatchbywarehouse') {
|
||||||
|
|
||||||
$TRes = array();
|
$TRes = array();
|
||||||
|
|
||||||
$sql = "SELECT pb.batch, pb.rowid, ps.fk_entrepot, pb.qty, e.ref as label, ps.fk_product";
|
$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);
|
print json_encode($TRes);
|
||||||
} elseif($action == 'updateselectwarehousebybatch'){
|
} elseif ($action == 'updateselectwarehousebybatch') {
|
||||||
|
|
||||||
$res = 0;
|
$res = 0;
|
||||||
|
|
||||||
$sql = "SELECT pb.batch, pb.rowid, ps.fk_entrepot, e.ref, pb.qty";
|
$sql = "SELECT pb.batch, pb.rowid, ps.fk_entrepot, e.ref, pb.qty";
|
||||||
@ -67,16 +65,12 @@ if($action == 'updateselectbatchbywarehouse') {
|
|||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
|
|
||||||
if($resql){
|
if ($resql) {
|
||||||
if($db->num_rows($resql) == 1){
|
if ($db->num_rows($resql) == 1) {
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
$res = $obj->fk_entrepot;
|
$res = $obj->fk_entrepot;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print json_encode($res);
|
print json_encode($res);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -184,7 +184,6 @@ if (empty($reshook)) {
|
|||||||
$pos = 0;
|
$pos = 0;
|
||||||
// Process line to consume
|
// Process line to consume
|
||||||
foreach ($object->lines as $line) {
|
foreach ($object->lines as $line) {
|
||||||
|
|
||||||
if ($line->role == 'toconsume') {
|
if ($line->role == 'toconsume') {
|
||||||
$tmpproduct = new Product($db);
|
$tmpproduct = new Product($db);
|
||||||
$tmpproduct->fetch($line->fk_product);
|
$tmpproduct->fetch($line->fk_product);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user