$year-5 ; $y--) { $years[$y]['created'] = 8; $years[$y]['validated'] = 8; $years[$y]['archived'] = 8; } $suivis = []; $prets = []; $suivis['tot'] = 100; $suivis['avg'] = 10; for ($y=$current_year ; $y>=$year_min ; $y--) $suivis[$y] = 8; $prets = $suivis; */ // Parameters passed by controller $current_year = $current_year; $year_min = $year_min; $nbyears = $nbyears; $avg = $avg; $tot = $tot; //$tot2 = $tot2; $years = $years; //debug($suivis); function echoAsPctAndBold($nbelem, $total=null, $is_bold=false) { if ($is_bold) echo ''; //if ($total !== null && $total>0) { if ($total !== null) { // Eviter division par zero if ($nbelem==0) $total=1; $pct = round( ($nbelem / $total) * 100 , 1 ); $nbelem = "$pct% ($nbelem)"; //$nbelem = "$nbelem ($pct%)"; //$nbelem = "$pct%"; } echo $nbelem; if ($is_bold) echo ''; } // LIGNE VIDE DE SÉPARATION function displayEmptyLine() { echo "
Prendre en compte les | Form->create('Statistiques', [ 'type' => 'get', ]); //echo ''; echo $this->Form->control('nbyears', [ 'id' => 'nby', //'class' => 'search-input', 'label' => '', //'type' => 'text', 'default' => $nbyears ]); /* echo $this->Form->submit('Chercher', [ 'name' => 'MaterielSAll', 'id' => 'MaterielSAll', 'style' => 'margin: 0px;' ]); */ echo $this->Form->end(); ?> | dernières années (=$current_year.'-'.$year_min?>) |
Matériels acquis | Répartition par statut | Suivis et Emprunts | ||||||
---|---|---|---|---|---|---|---|---|
Evol. \ N-1 | Evol. \ moyenne | Total | Validés | A archiver | Archivés | Matériels suivis | Matériels prêtés |