/[openfoncier]/trunk/sql/pgsql/consultation.inc.php
ViewVC logotype

Diff of /trunk/sql/pgsql/consultation.inc.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1167 by fmichon, Tue Jan 8 08:38:53 2013 UTC revision 1176 by fmichon, Tue Jan 8 11:42:24 2013 UTC
# Line 11  $case_type_consultation = 'CASE WHEN ser Line 11  $case_type_consultation = 'CASE WHEN ser
11              WHEN service.type_consultation=\'pour_information\'              WHEN service.type_consultation=\'pour_information\'
12              THEN \''._("pour information").'\'              THEN \''._("pour information").'\'
13      END';      END';
14    $case_consultation_lu = "case consultation.lu when 't' then 'Oui' else 'Non' end";
15  // SELECT  // SELECT
16  $champAffiche = array(  $champAffiche = array(
17      'consultation.consultation as "'._("consultation").'"',      'consultation.consultation as "'._("consultation").'"',
# Line 24  $champAffiche = array( Line 25  $champAffiche = array(
25      'avis_consultation.libelle as "'._("avis_consultation").'"',      'avis_consultation.libelle as "'._("avis_consultation").'"',
26      'instructeur.nom as "'._("instructeur").'"',      'instructeur.nom as "'._("instructeur").'"',
27      'division.code as "'._("division").'"',      'division.code as "'._("division").'"',
28      "case consultation.lu when 't' then 'Oui' else 'Non' end as \""._("lu")."\"",      $case_consultation_lu." as \""._("lu")."\"",
29  );  );
30    
31  $table .= "  $table .= "
# Line 57  if ($retourformulaire == 'dossier' Line 58  if ($retourformulaire == 'dossier'
58      OR $retourformulaire == 'dossier_instruction_tous_encours'      OR $retourformulaire == 'dossier_instruction_tous_encours'
59      OR $retourformulaire == 'dossier_instruction_mes_clotures'      OR $retourformulaire == 'dossier_instruction_mes_clotures'
60      OR $retourformulaire == 'dossier_instruction_tous_clotures') {      OR $retourformulaire == 'dossier_instruction_tous_clotures') {
61        //
62        $case_consultation_lu = "case when consultation.avis_consultation is null then ''
63                  else case consultation.lu
64                           when 't' then 'Oui'
65                           else 'Non'
66                       end
67             end";
68      // SELECT      // SELECT
69      $champAffiche = array(      $champAffiche = array(
70          'consultation.consultation as "'._("consultation").'"',          'consultation.consultation as "'._("consultation").'"',
# Line 67  if ($retourformulaire == 'dossier' Line 75  if ($retourformulaire == 'dossier'
75          'service.libelle as "'._("service").'"',          'service.libelle as "'._("service").'"',
76          $case_type_consultation.' as "'._("type_consultation").'"',          $case_type_consultation.' as "'._("type_consultation").'"',
77          'avis_consultation.libelle as "'._("avis_consultation").'"',          'avis_consultation.libelle as "'._("avis_consultation").'"',
78          "case when consultation.avis_consultation is null then ''          $case_consultation_lu." as \""._("lu")."\"",
               else case consultation.lu  
                        when 't' then 'Oui'  
                        else 'Non'  
                    end  
          end as \""._("lu")."\"",  
79      );      );
80      // Filtre dur les donnĂ©es du dossier      // Filtre dur les donnĂ©es du dossier
81      $selection=" WHERE (consultation.dossier ='".$idx."')";      $selection=" WHERE (consultation.dossier ='".$idx."')";
# Line 99  if ($retourformulaire == 'dossier' Line 102  if ($retourformulaire == 'dossier'
102  // On affiche le champ lu en gras  // On affiche le champ lu en gras
103  $options[] = array(  $options[] = array(
104      "type" => "condition",      "type" => "condition",
105      "field" => "case consultation.lu when 't' then 'Oui' else 'Non' end",      "field" => $case_consultation_lu,
106      "case" => array(      "case" => array(
107              "0" => array(              "0" => array(
108                  "values" => array("Non", ),                  "values" => array("Non", ),

Legend:
Removed from v.1167  
changed lines
  Added in v.1176

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26