Merge pull request #13322 from atm-lena/6.0_FIX_FournCommandClone_ExtrafieldsLines

FIX - Clone Fourn Command, add line's extrafields
This commit is contained in:
Laurent Destailleur 2020-03-11 16:36:27 +01:00 committed by GitHub
commit 7f759c6ff5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1178,7 +1178,7 @@ class CommandeFournisseur extends CommonOrder
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)
@ -1288,6 +1288,10 @@ class CommandeFournisseur extends CommonOrder
$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;