diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 5c51309967ebc..4d1df520c8f46 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1228,7 +1228,7 @@ public function create($user, $notrigger=0) false, $this->lines[$i]->date_start, $this->lines[$i]->date_end, - 0, + $this->lines[$i]->array_options, $this->lines[$i]->fk_unit ); if ($result < 0) @@ -1338,6 +1338,10 @@ public function createFromClone() $this->db->begin(); + // get extrafields so they will be clone + foreach($this->lines as $line) + $line->fetch_optionals($line->rowid); + // Load source object $objFrom = clone $this;