getParameter('nombre_unite')) {
$serie=$this->getParameter('nombre_unite');
}
// SORT
$tri = " ORDER BY election.date, election.libelle, unite.ordre ";
// SELECT
$displayed_field__election = 'election.libelle as "'.__("election").'"';
$champAffiche = array(
'election_unite.election_unite as "'.__("id").'"',
$displayed_field__election,
'concat(unite.code_unite, \' \', unite.libelle) as "'.__("unité").'"',
'unite.perimetre as "'.__("perimetre").'"',
'election_unite.inscrit as "'.__("inscrit").'"',
'election_unite.votant as "'.__("votant").'"',
'election_unite.emargement as "'.__("emargement").'"',
'election_unite.procuration as "'.__("procuration").'"',
'election_unite.blanc as "'.__("blanc").'"',
'election_unite.nul as "'.__("nul").'"',
'election_unite.exprime as "'.__("exprimé").'"',
"case election_unite.saisie
when 'en attente' then
'en attente'
when 'correcte' then
'arrivée'
else
''
end as
\"".__("saisie")."\"",
"case election_unite.envoi_aff
when
't'
then
'' else ''
end
as \"".__("aff")."\"",
"case election_unite.envoi_web
when
't'
then
''
else
''
end as
\"".__("web")."\"",
"case election_unite.validation
when 'en attente' then
''
when 'validee' then
''
else
''
end as
\"".__("validation")."\"",
);
// Dans le contexte d'une élection
if (in_array($retourformulaire, $foreign_keys_extended["election"])) {
// La colonne élection n'est pas nécessaire
$champAffiche = array_diff($champAffiche, array($displayed_field__election, ));
$champRecherche = array_diff($champRecherche, array($displayed_field__election, ));
}