Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
This commit is contained in:
commit
03e1af0aa3
@ -5612,30 +5612,39 @@ class Form
|
|||||||
* @param int $active Active or not, -1 = all
|
* @param int $active Active or not, -1 = all
|
||||||
* @param int $addempty 1=Add empty entry
|
* @param int $addempty 1=Add empty entry
|
||||||
* @param string $type Type ('direct-debit' or 'bank-transfer')
|
* @param string $type Type ('direct-debit' or 'bank-transfer')
|
||||||
|
* @param int $nooutput 1=Return string, no output
|
||||||
* @return void
|
* @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
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
|
$out = '';
|
||||||
if ($htmlname != "none") {
|
if ($htmlname != "none") {
|
||||||
print '<form method="POST" action="'.$page.'">';
|
$out .= '<form method="POST" action="'.$page.'">';
|
||||||
print '<input type="hidden" name="action" value="setmode">';
|
$out .= '<input type="hidden" name="action" value="setmode">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
$out .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
if ($type) {
|
if ($type) {
|
||||||
print '<input type="hidden" name="type" value="'.dol_escape_htmltag($type).'">';
|
$out .= '<input type="hidden" name="type" value="'.dol_escape_htmltag($type).'">';
|
||||||
}
|
}
|
||||||
print $this->select_types_paiements($selected, $htmlname, $filtertype, 0, $addempty, 0, 0, $active, '', 1);
|
$out .= $this->select_types_paiements($selected, $htmlname, $filtertype, 0, $addempty, 0, 0, $active, '', 1);
|
||||||
print '<input type="submit" class="button smallpaddingimp valignmiddle" value="'.$langs->trans("Modify").'">';
|
$out .= '<input type="submit" class="button smallpaddingimp valignmiddle" value="'.$langs->trans("Modify").'">';
|
||||||
print '</form>';
|
$out .= '</form>';
|
||||||
} else {
|
} else {
|
||||||
if ($selected) {
|
if ($selected) {
|
||||||
$this->load_cache_types_paiements();
|
$this->load_cache_types_paiements();
|
||||||
print $this->cache_types_paiements[$selected]['label'];
|
$out .= $this->cache_types_paiements[$selected]['label'];
|
||||||
} else {
|
} else {
|
||||||
print " ";
|
$out .= " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($nooutput) {
|
||||||
|
return $out;
|
||||||
|
} else {
|
||||||
|
print $out;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -3330,8 +3330,8 @@ if ($action == 'create') {
|
|||||||
print $paymentstatic->getNomUrl(1);
|
print $paymentstatic->getNomUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day').'</td>';
|
print '<td>'.dol_print_date($db->jdate($objp->dp), 'day').'</td>';
|
||||||
$s = $form->form_modes_reglement(null, $objp->paiement_type, 'none').' '.$objp->num_payment;
|
$s = $form->form_modes_reglement(null, $objp->paiement_type, 'none', '', 1, 0, '', 1).' '.$objp->num_payment;
|
||||||
print '<td class="tdoverflow125" title="'.dol_escape_htmltag($s).'">';
|
print '<td class="tdoverflowmax125" title="'.dol_escape_htmltag($s).'">';
|
||||||
print $s;
|
print $s;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (isModEnabled("banque")) {
|
if (isModEnabled("banque")) {
|
||||||
|
|||||||
@ -403,10 +403,10 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit
|
|||||||
print '<tr class="liste_titre_filter">';
|
print '<tr class="liste_titre_filter">';
|
||||||
// Ref
|
// Ref
|
||||||
print '<td class="liste_titre left">';
|
print '<td class="liste_titre left">';
|
||||||
print '<input class="flat" type="text" size="3" name="search_ref" value="'.$db->escape($search_ref).'">';
|
print '<input class="flat width50" type="text" name="search_ref" value="'.$db->escape($search_ref).'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
// Label
|
// Label
|
||||||
print '<td class="liste_titre"><input type="text" class="flat width150" name="search_label" value="'.$db->escape($search_label).'"></td>';
|
print '<td class="liste_titre"><input type="text" class="flat width100" name="search_label" value="'.$db->escape($search_label).'"></td>';
|
||||||
|
|
||||||
// Date start
|
// Date start
|
||||||
print '<td class="liste_titre center">';
|
print '<td class="liste_titre center">';
|
||||||
@ -435,13 +435,13 @@ print '</td>';
|
|||||||
|
|
||||||
// Type
|
// Type
|
||||||
print '<td class="liste_titre left">';
|
print '<td class="liste_titre left">';
|
||||||
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 '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Bank account
|
// Bank account
|
||||||
if (isModEnabled("banque")) {
|
if (isModEnabled("banque")) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
$form->select_comptes($search_account, 'search_account', 0, '', 1);
|
print $form->select_comptes($search_account, 'search_account', 0, '', 1, '', 0, 'maxwidth125', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -546,7 +546,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Label payment
|
// Label payment
|
||||||
print "<td>".dol_trunc($obj->label, 40)."</td>\n";
|
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($obj->label).'">'.dol_escape_htmltag($obj->label)."</td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
@ -564,7 +564,7 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Employee
|
// Employee
|
||||||
print "<td>".$userstatic->getNomUrl(1)."</td>\n";
|
print '<td class="tdoverflowmax150">'.$userstatic->getNomUrl(1)."</td>\n";
|
||||||
if (!$i) {
|
if (!$i) {
|
||||||
$totalarray['nbfield']++;
|
$totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user