Try to save on fetch

This commit is contained in:
Laurent Destailleur 2022-04-11 15:24:39 +02:00
parent 751b9efcd9
commit dd6238cb2d

View File

@ -657,7 +657,8 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders.
} else {
// If we want one invoice per order or if there is no first invoice yet for this thirdparty.
$objecttmp->socid = $cmd->socid;
$objecttmp->fetch_thirdparty();
$objecttmp->thirdparty = $cmd->thirdparty;
$objecttmp->type = $objecttmp::TYPE_STANDARD;
$objecttmp->cond_reglement_id = !empty($cmd->cond_reglement_id) ? $cmd->cond_reglement_id : $cmd->thirdparty->cond_reglement_id;
$objecttmp->mode_reglement_id = !empty($cmd->mode_reglement_id) ? $cmd->mode_reglement_id : $cmd->thirdparty->mode_reglement_id;