Browse Source

FIX : special_code update line keep old value. (#26819)

* FIX : special code update line keep old value.

* Update fournisseur.commande.class.php

---------

Co-authored-by: jpb <jean-pascal.boudet@atm-consulting>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
boudet jean pascal 1 year ago
parent
commit
b3345e1796
1 changed files with 2 additions and 2 deletions
  1. 2 2
      htdocs/fourn/class/fournisseur.commande.class.php

+ 2 - 2
htdocs/fourn/class/fournisseur.commande.class.php

@@ -2854,7 +2854,7 @@ class CommandeFournisseur extends CommonOrder
 			$this->line->localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2];
 			$this->line->remise_percent = $remise_percent;
 			$this->line->subprice       = $pu_ht;
-			$this->line->rang           = $this->rang;
+			$this->line->rang           = $oldline->rang;
 			$this->line->info_bits      = $info_bits;
 			$this->line->total_ht       = $total_ht;
 			$this->line->total_tva      = $total_tva;
@@ -2862,7 +2862,7 @@ class CommandeFournisseur extends CommonOrder
 			$this->line->total_localtax2 = $total_localtax2;
 			$this->line->total_ttc      = $total_ttc;
 			$this->line->product_type   = $type;
-			$this->line->special_code   = $this->special_code;
+			$this->line->special_code   = $oldline->special_code;
 			$this->line->origin         = $this->origin;
 			$this->line->fk_unit        = $fk_unit;