Update actions_massactions.inc.php
This commit is contained in:
parent
47448b77f0
commit
a1f5ede736
@ -516,7 +516,9 @@ if ($massaction == 'confirm_createbills')
|
|||||||
$objecttmp = new Facture($db);
|
$objecttmp = new Facture($db);
|
||||||
if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order.
|
if (!empty($createbills_onebythird) && !empty($TFactThird[$cmd->socid])) $objecttmp = $TFactThird[$cmd->socid]; // If option "one bill per third" is set, we use already created order.
|
||||||
else {
|
else {
|
||||||
|
// Load extrafields of order
|
||||||
|
$cmd->fetch_optionals();
|
||||||
|
|
||||||
$objecttmp->socid = $cmd->socid;
|
$objecttmp->socid = $cmd->socid;
|
||||||
$objecttmp->type = Facture::TYPE_STANDARD;
|
$objecttmp->type = Facture::TYPE_STANDARD;
|
||||||
$objecttmp->cond_reglement_id = $cmd->cond_reglement_id;
|
$objecttmp->cond_reglement_id = $cmd->cond_reglement_id;
|
||||||
@ -533,9 +535,7 @@ if ($massaction == 'confirm_createbills')
|
|||||||
$objecttmp->origin = 'commande';
|
$objecttmp->origin = 'commande';
|
||||||
$objecttmp->origin_id = $id_order;
|
$objecttmp->origin_id = $id_order;
|
||||||
|
|
||||||
// Replicate extrafields
|
$objecttmp->array_options = $cmd->array_options; // Copy extrafields
|
||||||
$cmd->fetch_optionals($id_order);
|
|
||||||
$objecttmp->array_options = $cmd->array_options;
|
|
||||||
|
|
||||||
$res = $objecttmp->create($user);
|
$res = $objecttmp->create($user);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user