NEW add totalization on ticket graph (#34204)
* add totalization on ticket graph * Update index.php
This commit is contained in:
parent
d4a1248d9a
commit
97c2d3dc58
1 changed files with 5 additions and 4 deletions
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2025 Charlene Benke <charlene@patas-monkey.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -263,14 +264,14 @@ $stringtoshow .= '</div>';
|
|||
if ($user->hasRight('ticket', 'read')) {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre"><th >'.$langs->trans("Statistics").' '.$endyear.' '.img_picto('', 'filter.png', 'id="idsubimgDOLUSERCOOKIE_ticket_by_status" class="linkobject"').'</th></tr>';
|
||||
print '<tr class="liste_titre"><th colspan=2>'.$langs->trans("Statistics").' '.$endyear.' '.img_picto('', 'filter.png', 'id="idsubimgDOLUSERCOOKIE_ticket_by_status" class="linkobject"').'</th></tr>';
|
||||
|
||||
print '<tr><td class="center">';
|
||||
print '<tr><td class="center" colspan=2>';
|
||||
print $stringtoshow;
|
||||
|
||||
// don't display graph if no series
|
||||
$totalnb = 0;
|
||||
if (!empty($dataseries) && count($dataseries) > 1) {
|
||||
$totalnb = 0;
|
||||
foreach ($dataseries as $key => $value) {
|
||||
$totalnb += $value['data'];
|
||||
}
|
||||
|
|
@ -310,7 +311,7 @@ if ($user->hasRight('ticket', 'read')) {
|
|||
}
|
||||
}
|
||||
print '</td></tr>';
|
||||
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td class="right">'.$totalnb.'</td></tr>';
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue