diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 4d05a1a825a..21a6d5a63b8 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -1324,7 +1324,7 @@ if ($resql) { // Payment mode if (!empty($arrayfields['p.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1); + print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1, 'list'); print ''; } if (!empty($arrayfields['p.total_ht']['checked'])) { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index acba0190450..db8b3b29edc 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -1588,7 +1588,7 @@ if ($resql) { // Payment mode if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1); + print $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 1, 'list'); print ''; } // Channel diff --git a/htdocs/commande/list_det.php b/htdocs/commande/list_det.php index 884ba9cf390..24e1703eaa6 100644 --- a/htdocs/commande/list_det.php +++ b/htdocs/commande/list_det.php @@ -1052,7 +1052,7 @@ if ($resql) { // Payment mode if (!empty($arrayfields['c.fk_mode_reglement']['checked'])) { print ''; - $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1); + $form->select_types_paiements($search_fk_mode_reglement, 'search_fk_mode_reglement', '', 0, 1, 1, 0, -1, '', 0, 'list'); print ''; } // Channel diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index 36855eb653c..0470a5a1b73 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -488,7 +488,7 @@ if ($arrayfields['datev']['checked']) { // Payment type if ($arrayfields['type']['checked']) { print ''; - print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth100', 1); + print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth100', 1, 'list'); print ''; } diff --git a/htdocs/compta/facture/invoicetemplate_list.php b/htdocs/compta/facture/invoicetemplate_list.php index 561880243d1..cd08f61b869 100644 --- a/htdocs/compta/facture/invoicetemplate_list.php +++ b/htdocs/compta/facture/invoicetemplate_list.php @@ -633,7 +633,7 @@ if (!empty($arrayfields['f.fk_cond_reglement']['checked'])) { if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { // Payment mode print ''; - print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100', 1); + print $form->select_types_paiements($search_payment_mode, 'search_payment_mode', '', 0, 1, 1, 0, 1, 'maxwidth100', 1, 'list'); print ''; } if (!empty($arrayfields['recurring']['checked'])) { diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 31afb45bed6..22fb0fd7e5b 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1452,7 +1452,7 @@ if ($resql) { // Payment mode if (!empty($arrayfields['f.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 0, 1, 'minwidth100 maxwidth100', 1); + print $form->select_types_paiements($search_paymentmode, 'search_paymentmode', '', 0, 1, 1, 0, 1, 'minwidth100 maxwidth100', 1, 'list'); print ''; } // Payment terms diff --git a/htdocs/compta/paiement/list.php b/htdocs/compta/paiement/list.php index 12036bd07bc..006e6ee6088 100644 --- a/htdocs/compta/paiement/list.php +++ b/htdocs/compta/paiement/list.php @@ -416,7 +416,7 @@ if (!empty($arrayfields['s.nom']['checked'])) { // Filter: Payment type if (!empty($arrayfields['c.libelle']['checked'])) { print ''; - print $form->select_types_paiements($search_paymenttype, 'search_paymenttype', '', 2, 1, 1, 1, 1, '', 1); + print $form->select_types_paiements($search_paymenttype, 'search_paymenttype', '', 2, 1, 1, 1, 1, '', 1, 'list'); print ''; } diff --git a/htdocs/compta/sociales/list.php b/htdocs/compta/sociales/list.php index ea415784943..eb5c6ef33f7 100644 --- a/htdocs/compta/sociales/list.php +++ b/htdocs/compta/sociales/list.php @@ -519,7 +519,7 @@ if (!empty($arrayfields['cs.fk_user']['checked'])) { // Filter: Type if (!empty($arrayfields['cs.fk_mode_reglement']['checked'])) { print ''; - print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 0, 1, 'maxwidth150', 1); + print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 0, 1, 'maxwidth150', 1, 'list'); print ''; } diff --git a/htdocs/compta/tva/list.php b/htdocs/compta/tva/list.php index 22ac6310efc..82dcc151e12 100644 --- a/htdocs/compta/tva/list.php +++ b/htdocs/compta/tva/list.php @@ -465,7 +465,7 @@ if (!empty($arrayfields['t.datev']['checked'])) { // Filter: Type if (!empty($arrayfields['t.fk_typepayment']['checked'])) { print ''; - print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 16, 1, '', 1); + print $form->select_types_paiements($search_type, 'search_type', '', 0, 1, 1, 16, 1, '', 1, 'list'); print ''; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 91d4f52881a..f68dff5a879 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4346,9 +4346,10 @@ class Form * @param int $active Active or not, -1 = all * @param string $morecss Add more CSS on select tag * @param int $nooutput 1=Return string, do not send to output + * @param string $mode card or list * @return string|void String for the HTML select component */ - public function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '', $nooutput = 0) + public function select_types_paiements($selected = '', $htmlname = 'paiementtype', $filtertype = '', $format = 0, $empty = 1, $noadmininfo = 0, $maxlength = 0, $active = 1, $morecss = '', $nooutput = 0, $mode = 'card') { // phpcs:enable global $langs, $user, $conf; @@ -4369,7 +4370,7 @@ class Form $this->load_cache_types_paiements(); // Set default value if not already set by caller - if (empty($selected) && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID)) { + if (empty($selected) && $mode == 'card' && !empty($conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID)) { $selected = $conf->global->MAIN_DEFAULT_PAYMENT_TYPE_ID; } diff --git a/htdocs/fourn/paiement/list.php b/htdocs/fourn/paiement/list.php index 61b6ae23df4..bd4b976c833 100644 --- a/htdocs/fourn/paiement/list.php +++ b/htdocs/fourn/paiement/list.php @@ -390,7 +390,7 @@ if (!empty($arrayfields['s.nom']['checked'])) { // Filter: Payment type if (!empty($arrayfields['c.libelle']['checked'])) { print ''; - $form->select_types_paiements($search_payment_type, 'search_payment_type', '', 2, 1, 1); + $form->select_types_paiements($search_payment_type, 'search_payment_type', '', 2, 1, 1, 0, 1, '', 0, 'list'); print ''; } diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 5a908a4d58e..d904aa839d9 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -522,7 +522,7 @@ print ''; // Type print ''; -print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth125', 1); +print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth125', 1, 'list'); print ''; // Bank account