diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php
index d4940ccb806..f40932c7faf 100644
--- a/htdocs/fichinter/index.php
+++ b/htdocs/fichinter/index.php
@@ -114,7 +114,8 @@ if ($resql) {
print '
';
print '
';
print '| '.$langs->trans("Statistics").' - '.$langs->trans("Interventions").' |
'."\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) {
$dataseries[] = array($fichinterstatic->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0));
@@ -128,9 +129,6 @@ if ($resql) {
if ($status == Fichinter::STATUS_BILLED) {
$colorseries[$status] = $badgeStatus4;
}
- if ($status == Fichinter::STATUS_CLOSED) {
- $colorseries[$status] = $badgeStatus6;
- }
}
if ($conf->use_javascript_ajax) {
@@ -149,21 +147,15 @@ if ($resql) {
print '';
}
- $bool = false;
foreach ($listofstatus as $status) {
if (!$conf->use_javascript_ajax) {
print '';
print '| '.$fichinterstatic->LibStatut($status, $bool, 0).' | ';
- print ''.(isset($vals[$status.$bool]) ? $vals[$status.$bool] : 0).' ';
- print $fichinterstatic->LibStatut($status, $bool, 3);
+ print ' | '.(isset($vals[$status]) ? $vals[$status] : 0).' ';
+ print $fichinterstatic->LibStatut($status, 3);
print '';
print ' | ';
print "
\n";
- if ($status == 3 && !$bool) {
- $bool = true;
- } else {
- $bool = false;
- }
}
}
//if ($totalinprocess != $total)