Merge remote-tracking branch 'origin/Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword' into Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword

This commit is contained in:
Frédéric FRANCE 2020-05-23 18:58:18 +02:00
commit 48f12c8307
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
3 changed files with 11 additions and 20 deletions

View File

@ -1996,8 +1996,7 @@ class ActionComm extends CommonObject
$this->db->commit(); $this->db->commit();
return 1; return 1;
} }
else else {
{
$this->db->rollback(); $this->db->rollback();
$this->error = $this->db->lasterror(); $this->error = $this->db->lasterror();
return -1; return -1;

View File

@ -210,12 +210,12 @@ if (empty($reshook) && !empty($massaction))
break; break;
} }
if(isset($percent)) if (isset($percent))
{ {
foreach ($toselect as $toselectid) foreach ($toselect as $toselectid)
{ {
$result = $object->updatePercent($toselectid, $percent); $result = $object->updatePercent($toselectid, $percent);
if($result < 0) if ($result < 0)
{ {
dol_print_error($db); dol_print_error($db);
break; break;

View File

@ -389,8 +389,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fourn
$errors = $object->errors; $errors = $object->errors;
$error++; $error++;
} }
else else {
{
// If module stock is enabled and the stock increase is done on purchase order dispatching // If module stock is enabled and the stock increase is done on purchase order dispatching
if ($entrepot > 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) if ($entrepot > 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER))
{ {
@ -412,8 +411,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fourn
$db->rollback(); $db->rollback();
setEventMessages($error, $errors, 'errors'); setEventMessages($error, $errors, 'errors');
} }
else else {
{
$db->commit(); $db->commit();
} }
} }
@ -446,8 +444,7 @@ if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionne
$error++; $error++;
$errors=$supplierorderdispatch->errors; $errors=$supplierorderdispatch->errors;
} }
else else {
{
// If module stock is enabled and the stock increase is done on purchase order dispatching // If module stock is enabled and the stock increase is done on purchase order dispatching
if ($entrepot > 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER)) if ($entrepot > 0 && ! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_DISPATCH_ORDER))
{ {
@ -461,8 +458,7 @@ if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionne
$errors=$mouv->errors; $errors=$mouv->errors;
$error++; $error++;
} }
else else {
{
$mouv->origin = &$object; $mouv->origin = &$object;
$result=$mouv->reception($user, $product, $supplierorderdispatch->fk_entrepot, $supplierorderdispatch->qty, $price, $comment, $eatby, $sellby, $batch); $result=$mouv->reception($user, $product, $supplierorderdispatch->fk_entrepot, $supplierorderdispatch->qty, $price, $comment, $eatby, $sellby, $batch);
if ($result < 0) if ($result < 0)
@ -479,8 +475,7 @@ if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionne
$db->rollback(); $db->rollback();
setEventMessages($error, $errors, 'errors'); setEventMessages($error, $errors, 'errors');
} }
else else {
{
$db->commit(); $db->commit();
} }
} }
@ -1151,8 +1146,7 @@ if ($id > 0 || !empty($ref)) {
{ {
print '<input style="width: 50px;" type="number" min="1" name="qty" value="' . $objp->qty . '" />'; print '<input style="width: 50px;" type="number" min="1" name="qty" value="' . $objp->qty . '" />';
} }
else else {
{
print $objp->qty; print $objp->qty;
} }
print '<input type="hidden" name="price" value="'.$objp->subprice.'" />'; print '<input type="hidden" name="price" value="'.$objp->subprice.'" />';
@ -1171,8 +1165,7 @@ if ($id > 0 || !empty($ref)) {
print $langs->trans("ErrorNoWarehouseDefined"); print $langs->trans("ErrorNoWarehouseDefined");
} }
} }
else else {
{
$warehouse_static->id = $objp->warehouse_id; $warehouse_static->id = $objp->warehouse_id;
$warehouse_static->libelle = $objp->entrepot; $warehouse_static->libelle = $objp->entrepot;
print $warehouse_static->getNomUrl(1); print $warehouse_static->getNomUrl(1);
@ -1241,8 +1234,7 @@ if ($id > 0 || !empty($ref)) {
print '</a>'; print '</a>';
print '</td>'; print '</td>';
} }
else else {
{
print '<td class="center valignmiddle">'; print '<td class="center valignmiddle">';
print '<input type="submit" class="button" id="savelinebutton" name="save" value="'.$langs->trans("Save").'" />'; print '<input type="submit" class="button" id="savelinebutton" name="save" value="'.$langs->trans("Save").'" />';
print '</td>'; print '</td>';