2
0
forked from Wavyzz/dolibarr

Merge remote-tracking branch 'origin/3.5' into 3.6

Conflicts:
	htdocs/compta/facture/class/facture.class.php
This commit is contained in:
Laurent Destailleur
2015-08-13 03:18:02 +02:00
6 changed files with 44 additions and 26 deletions

View File

@@ -2403,13 +2403,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)
@@ -3218,10 +3219,12 @@ class OrderLine extends CommonOrderLine
$this->date_end = $this->db->jdate($objp->date_end);
$this->db->free($result);
return 1;
}
else
{
dol_print_error($this->db);
return -1;
}
}