Fixing style errors.

This commit is contained in:
stickler-ci 2022-06-02 08:15:04 +00:00
parent bd1d6de326
commit 858926d95e

View File

@ -1248,7 +1248,7 @@ class Expedition extends CommonObject
$lotArray = $shipmentlinebatch->fetchAll($obj->expeditiondet_id); $lotArray = $shipmentlinebatch->fetchAll($obj->expeditiondet_id);
if (!is_array($lotArray)) { if (!is_array($lotArray)) {
$error++; $error++;
$this->errors[] = "Error ".$this->db->lasterror(); $this->errors[] = "Error ".$this->db->lasterror();
} }
} }
@ -1258,8 +1258,8 @@ class Expedition extends CommonObject
// We use warehouse selected for each line // We use warehouse selected for each line
$result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ShipmentCanceledInDolibarr", $this->ref)); // Price is set to 0, because we don't want to see WAP changed $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ShipmentCanceledInDolibarr", $this->ref)); // Price is set to 0, because we don't want to see WAP changed
if ($result < 0) { if ($result < 0) {
$error++; $error++;
$this->errors = array_merge($this->errors, $mouvS->errors); $this->errors = array_merge($this->errors, $mouvS->errors);
break; break;
} }
} else { } else {
@ -1268,8 +1268,8 @@ class Expedition extends CommonObject
foreach ($lotArray as $lot) { foreach ($lotArray as $lot) {
$result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $lot->qty, 0, $langs->trans("ShipmentCanceledInDolibarr", $this->ref), $lot->eatby, $lot->sellby, $lot->batch); // Price is set to 0, because we don't want to see WAP changed $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $lot->qty, 0, $langs->trans("ShipmentCanceledInDolibarr", $this->ref), $lot->eatby, $lot->sellby, $lot->batch); // Price is set to 0, because we don't want to see WAP changed
if ($result < 0) { if ($result < 0) {
$error++; $error++;
$this->errors = array_merge($this->errors, $mouvS->errors); $this->errors = array_merge($this->errors, $mouvS->errors);
break; break;
} }
} }
@ -1444,8 +1444,8 @@ class Expedition extends CommonObject
// We use warehouse selected for each line // We use warehouse selected for each line
$result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ShipmentDeletedInDolibarr", $this->ref)); // Price is set to 0, because we don't want to see WAP changed $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $obj->qty, 0, $langs->trans("ShipmentDeletedInDolibarr", $this->ref)); // Price is set to 0, because we don't want to see WAP changed
if ($result < 0) { if ($result < 0) {
$error++; $error++;
$this->errors = array_merge($this->errors, $mouvS->errors); $this->errors = array_merge($this->errors, $mouvS->errors);
break; break;
} }
} else { } else {
@ -1455,7 +1455,7 @@ class Expedition extends CommonObject
$result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $lot->qty, 0, $langs->trans("ShipmentDeletedInDolibarr", $this->ref), $lot->eatby, $lot->sellby, $lot->batch); // Price is set to 0, because we don't want to see WAP changed $result = $mouvS->reception($user, $obj->fk_product, $obj->fk_entrepot, $lot->qty, 0, $langs->trans("ShipmentDeletedInDolibarr", $this->ref), $lot->eatby, $lot->sellby, $lot->batch); // Price is set to 0, because we don't want to see WAP changed
if ($result < 0) { if ($result < 0) {
$error++; $error++;
$this->errors = array_merge($this->errors, $mouvS->errors); $this->errors = array_merge($this->errors, $mouvS->errors);
break; break;
} }
} }
@ -2201,7 +2201,7 @@ class Expedition extends CommonObject
$this->error = $mouvS->error; $this->error = $mouvS->error;
$this->errors = $mouvS->errors; $this->errors = $mouvS->errors;
$error++; $error++;
break; break;
} }
} else { } else {
// line with batch detail // line with batch detail
@ -2212,7 +2212,7 @@ class Expedition extends CommonObject
$this->error = $mouvS->error; $this->error = $mouvS->error;
$this->errors = $mouvS->errors; $this->errors = $mouvS->errors;
$error++; $error++;
break; break;
} }
} }
} }
@ -2377,7 +2377,7 @@ class Expedition extends CommonObject
$this->error = $mouvS->error; $this->error = $mouvS->error;
$this->errors = $mouvS->errors; $this->errors = $mouvS->errors;
$error++; $error++;
break; break;
} }
} else { } else {
// line with batch detail // line with batch detail
@ -2388,7 +2388,7 @@ class Expedition extends CommonObject
$this->error = $mouvS->error; $this->error = $mouvS->error;
$this->errors = $mouvS->errors; $this->errors = $mouvS->errors;
$error++; $error++;
break; break;
} }
} }
} }