diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 2abc2fa5798..bb1da4d852a 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1996,8 +1996,7 @@ class ActionComm extends CommonObject $this->db->commit(); return 1; } - else - { + else { $this->db->rollback(); $this->error = $this->db->lasterror(); return -1; diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index f2197c0d06d..467275d5fc0 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -210,12 +210,12 @@ if (empty($reshook) && !empty($massaction)) break; } - if(isset($percent)) + if (isset($percent)) { foreach ($toselect as $toselectid) { $result = $object->updatePercent($toselectid, $percent); - if($result < 0) + if ($result < 0) { dol_print_error($db); break; diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 7f99b2697af..06005febfe4 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -389,8 +389,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fourn $errors = $object->errors; $error++; } - else - { + else { // 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)) { @@ -412,8 +411,7 @@ if ($action == 'confirm_deleteline' && $confirm == 'yes' && $user->rights->fourn $db->rollback(); setEventMessages($error, $errors, 'errors'); } - else - { + else { $db->commit(); } } @@ -446,8 +444,7 @@ if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionne $error++; $errors=$supplierorderdispatch->errors; } - else - { + else { // 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)) { @@ -461,8 +458,7 @@ if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionne $errors=$mouv->errors; $error++; } - else - { + else { $mouv->origin = &$object; $result=$mouv->reception($user, $product, $supplierorderdispatch->fk_entrepot, $supplierorderdispatch->qty, $price, $comment, $eatby, $sellby, $batch); if ($result < 0) @@ -479,8 +475,7 @@ if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionne $db->rollback(); setEventMessages($error, $errors, 'errors'); } - else - { + else { $db->commit(); } } @@ -1151,8 +1146,7 @@ if ($id > 0 || !empty($ref)) { { print ''; } - else - { + else { print $objp->qty; } print ''; @@ -1171,8 +1165,7 @@ if ($id > 0 || !empty($ref)) { print $langs->trans("ErrorNoWarehouseDefined"); } } - else - { + else { $warehouse_static->id = $objp->warehouse_id; $warehouse_static->libelle = $objp->entrepot; print $warehouse_static->getNomUrl(1); @@ -1241,8 +1234,7 @@ if ($id > 0 || !empty($ref)) { print ''; print ''; } - else - { + else { print '