Modify fix

This commit is contained in:
Alexandre SPANGARO 2022-02-26 07:17:44 +01:00
parent 0510d84263
commit 18a8eac1cd

View File

@ -3009,9 +3009,7 @@ if ($action == 'create') {
}
// when bank account is empty (means not override by payment mode form a other object, like third-party), try to use default value
if (empty($fk_account)) {
$fk_account = GETPOST("fk_account", 'int');
}
$fk_account = GETPOSTISSET("fk_account") ? GETPOST("fk_account", 'int') : $fk_account;
if (!empty($soc->id)) {
$absolute_discount = $soc->getAvailableDiscounts();
@ -3616,7 +3614,7 @@ if ($action == 'create') {
if (!empty($conf->banque->enabled)) {
print '<tr><td>'.$langs->trans('BankAccount').'</td><td colspan="2">';
print img_picto('', 'bank_account', 'class="pictofixedwidth"');
print $form->select_comptes(GETPOSTISSET('fk_account') ? GETPOST('fk_account') : $fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1);
print $form->select_comptes($fk_account, 'fk_account', 0, '', 1, '', 0, 'maxwidth200 widthcentpercentminusx', 1);
print '</td></tr>';
}