diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 1479717b411..041f6902040 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -5612,30 +5612,39 @@ class Form * @param int $active Active or not, -1 = all * @param int $addempty 1=Add empty entry * @param string $type Type ('direct-debit' or 'bank-transfer') + * @param int $nooutput 1=Return string, no output * @return void */ - public function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0, $type = '') + public function form_modes_reglement($page, $selected = '', $htmlname = 'mode_reglement_id', $filtertype = '', $active = 1, $addempty = 0, $type = '', $nooutput = 0) { // phpcs:enable global $langs; + + $out = ''; if ($htmlname != "none") { - print '
'; + $out .= $this->select_types_paiements($selected, $htmlname, $filtertype, 0, $addempty, 0, 0, $active, '', 1); + $out .= ''; + $out .= ''; } else { if ($selected) { $this->load_cache_types_paiements(); - print $this->cache_types_paiements[$selected]['label']; + $out .= $this->cache_types_paiements[$selected]['label']; } else { - print " "; + $out .= " "; } } + + if ($nooutput) { + return $out; + } else { + print $out; + } } /** diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index f00406d63fd..42b5d34f880 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3330,8 +3330,8 @@ if ($action == 'create') { print $paymentstatic->getNomUrl(1); print ''; print '| '; -print ''; +print ''; print ' | '; // Label -print ''; +print ' | '; // Date start print ' | '; @@ -435,13 +435,13 @@ print ' | '; // Type print ''; -print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, '', 1); +print $form->select_types_paiements($search_type_id, 'search_type_id', '', 0, 1, 1, 16, 1, 'maxwidth125', 1); print ' | '; // Bank account if (isModEnabled("banque")) { print ''; - $form->select_comptes($search_account, 'search_account', 0, '', 1); + print $form->select_comptes($search_account, 'search_account', 0, '', 1, '', 0, 'maxwidth125', 1); print ' | '; } @@ -546,7 +546,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } // Label payment - print "".dol_trunc($obj->label, 40)." | \n"; + print ''.dol_escape_htmltag($obj->label)." | \n"; if (!$i) { $totalarray['nbfield']++; } @@ -564,7 +564,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) { } // Employee - print "".$userstatic->getNomUrl(1)." | \n"; + print ''.$userstatic->getNomUrl(1)." | \n"; if (!$i) { $totalarray['nbfield']++; }