2
0
forked from Wavyzz/dolibarr

better clone oldline and avoid emptylabel on update

This commit is contained in:
Christophe Battarel
2019-03-27 12:15:50 +01:00
parent 3006e2bf75
commit 631be04d5d

View File

@@ -2195,9 +2195,7 @@ class Commande extends CommonOrder
$line->fetch($lineid);
// Memorize previous line for triggers
$staticline=new OrderLine($this->db);
$staticline->fetch($lineid);
$staticline->fetch_optionals($lineid);
$staticline = clone $line;
$line->oldline = $staticline;
if ($line->delete($user) > 0)
@@ -3054,7 +3052,7 @@ class Commande extends CommonOrder
}
$this->line->rowid=$rowid;
$this->line->label=$label;
$this->line->label=!empty($label)?$label:$this->line->oldline->label;
$this->line->desc=$desc;
$this->line->qty=$qty;