123,10 → 123,11 |
$requete = 'SELECT '.(($this->distinct) ? 'DISTINCT' : '').' '. |
' cs_id_structure, '. |
' SUM(csap_bota_travail_hebdo_tps) AS personnel_heure_nbre, '. |
' cs_nom, csc_truk_stockage_parametre '. |
' cs_nom, csc_truk_stockage_parametre, csv_mark_visite_avec_motif '. |
'FROM coel_structure '. |
' LEFT JOIN coel_structure_a_personne ON (cs_id_structure = csap_id_structure) '. |
' LEFT JOIN coel_structure_conservation ON (cs_id_structure = csc_id_structure) '. |
' LEFT JOIN coel_structure_valorisation ON (cs_id_structure = csv_id_structure) '. |
( is_null($projet_id) ? '' : "WHERE cs_ce_projet = $projet_id "). |
'GROUP BY cs_id_structure '. |
'ORDER BY '.((!is_null($this->orderby)) ? $this->orderby : 'cs_nom ASC').' '; |
174,6 → 175,7 |
$collection_nbre = $collections_par_structure[$structure['cs_id_structure']]; |
$collection_nbre = empty($collection_nbre) ? 0 : $collection_nbre; |
$personnel_heure_nbre = empty($structure['personnel_heure_nbre']) ? 0 : $structure['personnel_heure_nbre']; |
$visite_avec_motif_science = $structure['csv_mark_visite_avec_motif']; |
|
$structure_affichage = array( |
'nom' => $nom, |
180,7 → 182,8 |
'stockage_params' => $stockage_params, |
'stockage_params_nbre' => $stockage_params_nbre, |
'collection_nbre' => $collection_nbre, |
'personnel_heure_nbre' => $personnel_heure_nbre); |
'personnel_heure_nbre' => $personnel_heure_nbre, |
'visite_avec_motif_science' => $visite_avec_motif_science); |
$structure_affichage = $this->nettoyerTableau($structure_affichage); |
|
$donnees['structures'][$id_structure] = $structure_affichage; |