FIX Bank account not set when creating invoice from order

This commit is contained in:
Laurent Destailleur 2022-06-02 19:34:16 +02:00
parent f5da6ebfe2
commit ed5b8df385

View File

@ -2843,6 +2843,7 @@ if ($action == 'create') {
} }
$currency_code = $conf->currency; $currency_code = $conf->currency;
$fk_account = 0;
// Load objectsrc // Load objectsrc
$remise_absolue = 0; $remise_absolue = 0;
@ -3580,7 +3581,7 @@ if ($action == 'create') {
if (!empty($conf->banque->enabled)) { if (!empty($conf->banque->enabled)) {
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">'; print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
print img_picto('', 'bank_account', 'class="pictofixedwidth"'); print img_picto('', 'bank_account', 'class="pictofixedwidth"');
print $form->select_comptes($fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1); print $form->select_comptes(($fk_account < 0 ? '' : $fk_account), 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1);
print '</td></tr>'; print '</td></tr>';
} }