mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-22 00:33:17 +01:00
Merge remote-tracking branch 'upstream/develop' into refactor
This commit is contained in:
@@ -1112,10 +1112,10 @@ class Commande extends CommonOrder
|
||||
|
||||
// get extrafields from original line
|
||||
$object->fetch_optionals($object->id);
|
||||
|
||||
|
||||
$e = new ExtraFields($db);
|
||||
$element_extrafields = $e->fetch_name_optionals_label($this->element);
|
||||
|
||||
|
||||
foreach($object->array_options as $options_key => $value) {
|
||||
if(array_key_exists(str_replace('options_', '', $options_key), $element_extrafields)){
|
||||
$this->array_options[$options_key] = $value;
|
||||
@@ -2503,16 +2503,16 @@ 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);
|
||||
|
||||
$staticline = clone $line;
|
||||
|
||||
$line->oldline = $staticline;
|
||||
$this->line = $line;
|
||||
$this->line->context = $this->context;
|
||||
|
||||
// Stock previous line records
|
||||
$staticline=new OrderLine($this->db);
|
||||
$staticline->fetch($rowid);
|
||||
$this->line->oldline = $staticline;
|
||||
|
||||
// Reorder if fk_parent_line change
|
||||
if (! empty($fk_parent_line) && ! empty($staticline->fk_parent_line) && $fk_parent_line != $staticline->fk_parent_line)
|
||||
{
|
||||
@@ -3490,10 +3490,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user