2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Laurent Destailleur
2020-01-25 14:03:24 +01:00
parent de6b30be8c
commit 09f809f347
10 changed files with 81 additions and 47 deletions

View File

@@ -3074,6 +3074,7 @@ class Commande extends CommonOrder
//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);
$line->fetch_optionals();
if (!empty($line->fk_product))
{
@@ -3146,7 +3147,10 @@ class Commande extends CommonOrder
$this->line->remise = $remise;
if (is_array($array_options) && count($array_options) > 0) {
$this->line->array_options = $array_options;
// We replace values in this->line->array_options only for entries defined into $array_options
foreach($array_options as $key => $value) {
$this->line->array_options[$key] = $array_options[$key];
}
}
$result = $this->line->update($user, $notrigger);