2
0
forked from Wavyzz/dolibarr

Merge branch '3.5' of git@github.com:Dolibarr/dolibarr.git into 3.5

Conflicts:
	ChangeLog
This commit is contained in:
Laurent Destailleur
2015-08-13 00:06:27 +02:00
4 changed files with 23 additions and 19 deletions

View File

@@ -2349,13 +2349,14 @@ class Commande extends CommonOrder
$price = ($pu - $remise);
}
// Update line
$this->line=new OrderLine($this->db);
//Fetch current line from the database and then clone the object and set it in $oldline property
$line = new OrderLine($this->db);
$line->fetch($rowid);
// Stock previous line records
$staticline=new OrderLine($this->db);
$staticline->fetch($rowid);
$this->line->oldline = $staticline;
$staticline = clone $line;
$line->oldline = $staticline;
$this->line = $line;
// Reorder if fk_parent_line change
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)