From 2418754d71811bcec2d0abf3fc79fd8d69c43ddd Mon Sep 17 00:00:00 2001 From: Ion Date: Wed, 8 Feb 2017 23:27:58 +0100 Subject: [PATCH] Fill oldline in supplier order updateline --- htdocs/fourn/class/fournisseur.commande.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index f656e7a41e7..053e5b314d6 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -2346,8 +2346,11 @@ class CommandeFournisseur extends CommonOrder $subprice = price2num($pu_ht,'MU'); + //Fetch current line from the database and then clone the object and set it in $oldline property $this->line=new CommandeFournisseurLigne($this->db); $this->line->fetch($rowid); + $oldline = clone $this->line; + $this->line->oldline = $oldline; $this->line->context = $this->context;