From 1d62834b2ce0fcb1696377450f0a42ea0c3e6ef2 Mon Sep 17 00:00:00 2001 From: Laurent De Coninck Date: Sat, 24 Oct 2020 17:15:48 +0200 Subject: [PATCH] use the second version for default bank account --- htdocs/adherents/subscription.php | 2 +- htdocs/compta/bank/various_payment/card.php | 2 +- htdocs/compta/localtax/card.php | 2 +- htdocs/compta/paiement.php | 2 +- htdocs/compta/paiement_charge.php | 2 +- htdocs/compta/sociales/card.php | 2 +- htdocs/compta/tva/card.php | 2 +- htdocs/compta/tva/list.php | 2 +- htdocs/core/class/html.form.class.php | 2 +- htdocs/don/payment/payment.php | 2 +- htdocs/expensereport/payment/payment.php | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 512f845fb02..851a611648b 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -927,7 +927,7 @@ if ($rowid > 0) { // Bank account print ''.$langs->trans("FinancialAccount").''; - $form->select_comptes(GETPOST('accountid'), 'accountid'); + $form->select_comptes(GETPOST('accountid'), 'accountid', 0, '', 2); print "\n"; // Payment mode diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index bdac6a858ed..544dec1645d 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -370,7 +370,7 @@ if ($action == 'create') { print ''; print $form->editfieldkey('BankAccount', 'selectaccountid', '', $object, 0, 'string', '', 1).''; - $form->select_comptes($accountid, "accountid", 0, ''); // Affiche liste des comptes courant + $form->select_comptes($accountid, "accountid", 0, '', 2); // Affiche liste des comptes courant print ''; } diff --git a/htdocs/compta/localtax/card.php b/htdocs/compta/localtax/card.php index 6297563b127..0dc7c20f7f7 100644 --- a/htdocs/compta/localtax/card.php +++ b/htdocs/compta/localtax/card.php @@ -178,7 +178,7 @@ if ($action == 'create') if (!empty($conf->banque->enabled)) { print ''.$langs->trans("Account").''; - $form->select_comptes($_POST["accountid"], "accountid", 0, "courant=1"); // Affiche liste des comptes courant + $form->select_comptes($_POST["accountid"], "accountid", 0, "courant=1", 2); // Affiche liste des comptes courant print ''; print ''.$langs->trans("PaymentMode").''; diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 435e12cef40..efe102c48b2 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -496,7 +496,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie if ($facture->type != 2) print ''.$langs->trans('AccountToCredit').''; if ($facture->type == 2) print ''.$langs->trans('AccountToDebit').''; print ''; - $form->select_comptes($accountid, 'accountid', 0, ''); + $form->select_comptes($accountid, 'accountid', 0, '', 2); print ''; } else { print ' '; diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php index b1325f81a16..20170c9e838 100644 --- a/htdocs/compta/paiement_charge.php +++ b/htdocs/compta/paiement_charge.php @@ -236,7 +236,7 @@ if ($action == 'create') print ''; print ''.$langs->trans('AccountToDebit').''; print ''; - $form->select_comptes(isset($_POST["accountid"]) ? $_POST["accountid"] : $charge->accountid, "accountid", 0, ''); // Show opend bank account list + $form->select_comptes(isset($_POST["accountid"]) ? $_POST["accountid"] : $charge->accountid, "accountid", 0, '', 2); // Show opend bank account list print ''; // Number diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index 504d27c6d17..793d1112c2c 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -370,7 +370,7 @@ if ($action == 'create') if (!empty($conf->banque->enabled)) { print ''.$langs->trans('BankAccount').''; - $form->select_comptes($fk_account, 'fk_account', 0, ''); + $form->select_comptes($fk_account, 'fk_account', 0, '', 2); print ''; } diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index c807096a368..a39e14466eb 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -271,7 +271,7 @@ if ($action == 'create') if (!empty($conf->banque->enabled)) { print ''.$langs->trans("BankAccount").''; - $form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1"); // List of bank account available + $form->select_comptes(GETPOST("accountid", 'int'), "accountid", 0, "courant=1", 2); // List of bank account available print ''; } diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 02c51898fb5..554143e7a7e 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -291,7 +291,7 @@ if (!empty($arrayfields['transaction']['checked'])) { // Filter: Bank account if (!empty($arrayfields['ba.label']['checked'])) { print ''; - $form->select_comptes($search_account, 'search_account', 0, ''); + $form->select_comptes($search_account, 'search_account', 0, '', 1); print ''; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index c1d0f9323a2..17aefec4576 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -3880,7 +3880,7 @@ class Form while ($i < $num) { $obj = $this->db->fetch_object($result); - if ($selected == $obj->rowid || (empty($useempty) && $num === 1 && empty($selected))) + if ($selected == $obj->rowid || ($useempty === 2 && $num === 1 && empty($selected))) { print '