diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 675ed2e2687..093418b4ba7 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -735,7 +735,7 @@ class Propal extends CommonObject // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines + } elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 49012e486b0..fe7f93ff86c 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1649,7 +1649,7 @@ class Commande extends CommonOrder // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines + } elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 6bec2c37d5c..a5b690f5a7c 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2088,7 +2088,7 @@ class Facture extends CommonInvoice $facligne->rang = -1; $facligne->info_bits = 2; - if(!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { $facligne->rang = 1; for ($ii = 1; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1); @@ -3363,7 +3363,7 @@ class Facture extends CommonInvoice // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines + } elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); } diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 30d0ae09fc4..c224f33edf0 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -311,7 +311,7 @@ if ($nolinesbefore) { echo ''; } - if(!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { $tab = array(-1 => $langs->trans('AtTheEnd')); if (!empty($object->lines)) { $langs->load('admin'); diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index b8a0ac93d3d..b742fab65ee 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1858,8 +1858,7 @@ class CommandeFournisseur extends CommonOrder $localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0]; $localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2]; - if ($rang < 0) - { + if ($rang < 0) { $rangmax = $this->line_max(); $rang = $rangmax + 1; } @@ -1924,7 +1923,7 @@ class CommandeFournisseur extends CommonOrder // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines + } elseif ($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines for ($ii = $rang; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index ddd79cc46c2..773e7aa04cd 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1112,7 +1112,7 @@ class FactureFournisseur extends CommonInvoice public function insert_discount($idremise) { // phpcs:enable - global $conf, $langs; + global $conf, $langs; include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; @@ -1143,7 +1143,7 @@ class FactureFournisseur extends CommonInvoice $facligne->rang = -1; $facligne->info_bits = 2; - if(!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { $facligne->rang = 1; for ($ii = 1; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1); @@ -2015,7 +2015,7 @@ class FactureFournisseur extends CommonInvoice // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines + } elseif ($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines for ($ii = $rang; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); } diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index b299176c56e..ac6344d91da 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -674,7 +674,7 @@ if (empty($reshook)) { $pu_ttc, $tva_npr, $type, - $rank, + $rank, 0, GETPOST('fk_parent_line'), $fournprice, diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 632b44dba2a..c89b9657d4c 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -622,7 +622,7 @@ class SupplierProposal extends CommonObject // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines + } elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); }