diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 5faa94f2d08..598d34f7093 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -530,11 +530,11 @@ class Propal extends CommonObject $pu_ht_devise = $tabprice[19]; // Rang to use - $rangtouse = $rang; - if ($rangtouse == -1) + $ranktouse = $rang; + if ($ranktouse == -1) { $rangmax = $this->line_max($fk_parent_line); - $rangtouse = $rangmax + 1; + $ranktouse = $rangmax + 1; } // TODO A virer @@ -568,7 +568,7 @@ class Propal extends CommonObject $this->line->fk_remise_except=$fk_remise_except; $this->line->remise_percent=$remise_percent; $this->line->subprice=$pu_ht; - $this->line->rang=$rangtouse; + $this->line->rang=$ranktouse; $this->line->info_bits=$info_bits; $this->line->total_ht=$total_ht; $this->line->total_tva=$total_tva; diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index b1e2262f109..23d9db8f246 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1457,11 +1457,11 @@ class Commande extends CommonOrder $pu_ht_devise = $tabprice[19]; // Rang to use - $rangtouse = $rang; - if ($rangtouse == -1) + $ranktouse = $rang; + if ($ranktouse == -1) { $rangmax = $this->line_max($fk_parent_line); - $rangtouse = $rangmax + 1; + $ranktouse = $rangmax + 1; } // TODO A virer @@ -1495,7 +1495,7 @@ class Commande extends CommonOrder $this->line->fk_remise_except=$fk_remise_except; $this->line->remise_percent=$remise_percent; $this->line->subprice=$pu_ht; - $this->line->rang=$rangtouse; + $this->line->rang=$ranktouse; $this->line->info_bits=$info_bits; $this->line->total_ht=$total_ht; $this->line->total_tva=$total_tva; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index c64c42e2971..7f5dde15c59 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2825,11 +2825,11 @@ class Facture extends CommonInvoice $pu_ht_devise = $tabprice[19]; // Rank to use - $rangtouse = $rang; - if ($rangtouse == -1) + $ranktouse = $rang; + if ($ranktouse == -1) { $rangmax = $this->line_max($fk_parent_line); - $rangtouse = $rangmax + 1; + $ranktouse = $rangmax + 1; } // Insert line @@ -2863,7 +2863,7 @@ class Facture extends CommonInvoice $this->line->date_start=$date_start; $this->line->date_end=$date_end; $this->line->ventil=$ventil; - $this->line->rang=$rangtouse; + $this->line->rang=$ranktouse; $this->line->info_bits=$info_bits; $this->line->fk_remise_except=$fk_remise_except; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index f484c2690a6..6200b14ce19 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -2593,11 +2593,11 @@ class ExpeditionLigne extends CommonObjectLine if (empty($this->rang)) $this->rang = 0; // Rank to use - $rangtouse = $this->rang; - if ($rangtouse == -1) + $ranktouse = $this->rang; + if ($ranktouse == -1) { $rangmax = $this->line_max($fk_expedition); - $rangtouse = $rangmax + 1; + $ranktouse = $rangmax + 1; } $sql = "INSERT INTO ".MAIN_DB_PREFIX."expeditiondet ("; @@ -2611,7 +2611,7 @@ class ExpeditionLigne extends CommonObjectLine $sql.= ", ".(empty($this->entrepot_id) ? 'NULL' : $this->entrepot_id); $sql.= ", ".$this->fk_origin_line; $sql.= ", ".$this->qty; - $sql.= ", ".$rangtouse; + $sql.= ", ".$ranktouse; $sql.= ")"; dol_syslog(get_class($this)."::insert", LOG_DEBUG); diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index a84f18f5b7b..546a93763a6 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -524,11 +524,11 @@ class SupplierProposal extends CommonObject $pu_ht_devise = $tabprice[19]; // Rang to use - $rangtouse = $rang; - if ($rangtouse == -1) + $ranktouse = $rang; + if ($ranktouse == -1) { $rangmax = $this->line_max($fk_parent_line); - $rangtouse = $rangmax + 1; + $ranktouse = $rangmax + 1; } // TODO A virer @@ -556,7 +556,7 @@ class SupplierProposal extends CommonObject $this->line->fk_product=$fk_product; $this->line->remise_percent=$remise_percent; $this->line->subprice=$pu_ht; - $this->line->rang=$rangtouse; + $this->line->rang=$ranktouse; $this->line->info_bits=$info_bits; $this->line->total_ht=$total_ht; $this->line->total_tva=$total_tva;