Fix tooltip in report

This commit is contained in:
Laurent Destailleur 2022-12-29 17:06:39 +01:00
parent a7c2d72315
commit 474dd5197f

View File

@ -320,9 +320,9 @@ if ($modecompta == 'CREANCES-DETTES') {
print '<tr class="liste_total">'; print '<tr class="liste_total">';
// Year NP // Year NP
print '<td class="liste_total width200">'; print '<td class="liste_total tdoverflowmax100" title="'.dol_escape_htmltag($cat['code']).'">';
print dol_escape_htmltag($cat['code']); print dol_escape_htmltag($cat['code']);
print '</td><td>'; print '</td><td class="tdoverflowmax150" title="'.dol_escape_htmltag($cat['label']).'">';
print dol_escape_htmltag($cat['label']); print dol_escape_htmltag($cat['label']);
print '</td>'; print '</td>';
@ -399,8 +399,7 @@ if ($modecompta == 'CREANCES-DETTES') {
print "</tr>\n"; print "</tr>\n";
//var_dump($sommes); //var_dump($sommes);
} else // normal category } else { // normal category
{
$code = $cat['code']; // Category code we process $code = $cat['code']; // Category code we process
$totCat = array(); $totCat = array();
@ -478,37 +477,38 @@ if ($modecompta == 'CREANCES-DETTES') {
// Now output columns for row $code ('VTE', 'MAR', ...) // Now output columns for row $code ('VTE', 'MAR', ...)
print "<tr>"; print '<tr class="trforbreak">';
// Column group // Column group
print '<td class="width200">'; print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($cat['code']).'">';
print dol_escape_htmltag($cat['code']); print dol_escape_htmltag($cat['code']);
print '</td>'; print '</td>';
// Label of group // Label of group
print '<td>'; $labeltoshow = dol_escape_htmltag($cat['label']);
print dol_escape_htmltag($cat['label']);
if (count($cpts) > 0 && !empty($cpts[0])) { // Show example of 5 first accounting accounts if (count($cpts) > 0 && !empty($cpts[0])) { // Show example of 5 first accounting accounts
$i = 0; $i = 0;
foreach ($cpts as $cpt) { foreach ($cpts as $cpt) {
if ($i > 5) { if ($i > 5) {
print '...)'; $labeltoshow .= '...)';
break; break;
} }
if ($i > 0) { if ($i > 0) {
print ', '; $labeltoshow .= ', ';
} else { } else {
print ' ('; $labeltoshow .= ' (';
} }
print dol_escape_htmltag($cpt['account_number']); $labeltoshow .= dol_escape_htmltag($cpt['account_number']);
$i++; $i++;
} }
if ($i <= 5) { if ($i <= 5) {
print ')'; $labeltoshow .= ')';
} }
} else { } else {
print ' - <span class="warning">'.$langs->trans("GroupIsEmptyCheckSetup").'</span>'; $labeltoshow .= ' - <span class="warning">'.$langs->trans("GroupIsEmptyCheckSetup").'</span>';
} }
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag(dol_string_nohtmltag($labeltoshow)).'">';
print $labeltoshow;
print '</td>'; print '</td>';
print '<td class="right"><span class="amount">'.price($totCat['NP']).'</span></td>'; print '<td class="right"><span class="amount">'.price($totCat['NP']).'</span></td>';