Ok better

This commit is contained in:
Florian HENRY 2022-06-23 10:20:26 +02:00
parent c702d8a4ac
commit d409a534d7

View File

@ -114,7 +114,8 @@ if ($resql) {
print '<div class="div-table-responsive-no-min">'; print '<div class="div-table-responsive-no-min">';
print '<table class="noborder nohover centpercent">'; print '<table class="noborder nohover centpercent">';
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Interventions").'</th></tr>'."\n"; print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Interventions").'</th></tr>'."\n";
$listofstatus = array(Fichinter::STATUS_DRAFT, Fichinter::STATUS_VALIDATED, Fichinter::STATUS_BILLED, Fichinter::STATUS_CLOSED); $listofstatus = array(Fichinter::STATUS_DRAFT, Fichinter::STATUS_VALIDATED);
if (!empty($conf->global->FICHINTER_CLASSIFY_BILLED)) $listofstatus[] = Fichinter::STATUS_BILLED;
foreach ($listofstatus as $status) { foreach ($listofstatus as $status) {
$dataseries[] = array($fichinterstatic->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0)); $dataseries[] = array($fichinterstatic->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0));
@ -128,9 +129,6 @@ if ($resql) {
if ($status == Fichinter::STATUS_BILLED) { if ($status == Fichinter::STATUS_BILLED) {
$colorseries[$status] = $badgeStatus4; $colorseries[$status] = $badgeStatus4;
} }
if ($status == Fichinter::STATUS_CLOSED) {
$colorseries[$status] = $badgeStatus6;
}
} }
if ($conf->use_javascript_ajax) { if ($conf->use_javascript_ajax) {
@ -149,21 +147,15 @@ if ($resql) {
print '</td></tr>'; print '</td></tr>';
} }
$bool = false;
foreach ($listofstatus as $status) { foreach ($listofstatus as $status) {
if (!$conf->use_javascript_ajax) { if (!$conf->use_javascript_ajax) {
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$fichinterstatic->LibStatut($status, $bool, 0).'</td>'; print '<td>'.$fichinterstatic->LibStatut($status, $bool, 0).'</td>';
print '<td class="right"><a href="list.php?search_status='.$status.'">'.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' '; print '<td class="right"><a href="list.php?search_status='.$status.'">'.(isset($vals[$status]) ? $vals[$status] : 0).' ';
print $fichinterstatic->LibStatut($status, $bool, 3); print $fichinterstatic->LibStatut($status, 3);
print '</a>'; print '</a>';
print '</td>'; print '</td>';
print "</tr>\n"; print "</tr>\n";
if ($status == 3 && !$bool) {
$bool = true;
} else {
$bool = false;
}
} }
} }
//if ($totalinprocess != $total) //if ($totalinprocess != $total)