diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 96bf7eda63bbd..8057ce3041c4e 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -1757,7 +1757,7 @@ public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $date_star } // if buy price not defined, define buyprice as configured in margin admin - if ($this->pa_ht == 0) { + if ($pa_ht == 0) { if (($result = $this->defineBuyPrice($pu, $remise_percent)) < 0) { return $result; } else { @@ -3303,7 +3303,6 @@ public function fetch($id, $ref = '') $this->statut = $obj->statut; $this->product_ref = $obj->product_ref; $this->product_label = $obj->product_label; - $this->product_description = $obj->product_description; $this->product_type = $obj->product_type; $this->label = $obj->label; // deprecated. We do not use this field. Only ref and label of product, and description of contract line $this->description = $obj->description; @@ -3440,7 +3439,7 @@ public function update($user, $notrigger = 0) // qty, pu, remise_percent et txtva // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. - $localtaxes_type = getLocalTaxesFromRate($this->txtva, 0, $this->thirdparty, $mysoc); + $localtaxes_type = getLocalTaxesFromRate($this->tva_tx, 0, $this->thirdparty, $mysoc); $tabprice = calcul_price_total($this->qty, $this->price_ht, $this->remise_percent, $this->tva_tx, $this->localtax1_tx, $this->localtax2_tx, 0, 'HT', 0, 1, $mysoc, $localtaxes_type); $this->total_ht = $tabprice[0];