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 '