From 18a8eac1cd4f79757abd6f48c86e486d6135cfcb Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Sat, 26 Feb 2022 07:17:44 +0100 Subject: [PATCH] Modify fix --- htdocs/compta/facture/card.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index ff39e29ab00..6fdccb366c2 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -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 ''.$langs->trans('BankAccount').''; 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 ''; }