Skip to content

Commit

Permalink
Merge pull request Dolibarr#26091 from elkoiko/fix-warnings-contrat-a…
Browse files Browse the repository at this point in the history
…nd-contratligne

FIX warnings for undefined properties in Contrat and ContratLigne
  • Loading branch information
eldy authored Oct 4, 2023
2 parents dd2e68d + 59fc407 commit ee4d662
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions htdocs/contrat/class/contrat.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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];
Expand Down

0 comments on commit ee4d662

Please sign in to comment.