New: set bank account information to invoice on new membership subscriptions (#31688)
* set bank account information on new membership subscriptions When creating new membership subscriptions and choosing to create an invoice, existing bank account information should be used. * (fix phpstan) set bank account on new membership subscriptions set bank account information on new membership subscriptions When creating new membership subscriptions and choosing to create an invoice, existing bank account information should be used. Added
This commit is contained in:
parent
07f737cea4
commit
08714ea39b
1 changed files with 7 additions and 0 deletions
|
|
@ -1836,6 +1836,13 @@ class Adherent extends CommonObject
|
|||
}
|
||||
}
|
||||
$invoice->socid = $this->fk_soc;
|
||||
// set customer's bank account on the invoice
|
||||
if (!empty($customer->fk_account)) {
|
||||
$invoice->fk_account = $customer->fk_account;
|
||||
} elseif (getDolGlobalString('FACTURE_RIB_NUMBER')) {
|
||||
// set default bank account from invoice module settings
|
||||
$invoice->fk_account = (int) getDolGlobalString('FACTURE_RIB_NUMBER');
|
||||
}
|
||||
//$invoice->date = $datesubscription;
|
||||
$invoice->date = dol_now();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue