/[openfoncier]/trunk/obj/instruction.class.php
ViewVC logotype

Diff of /trunk/obj/instruction.class.php

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

revision 2029 by softime, Wed Jun 19 16:22:46 2013 UTC revision 2030 by softime, Thu Jun 20 11:51:39 2013 UTC
# Line 49  class instruction extends instruction_ge Line 49  class instruction extends instruction_ge
49              "groupeInstruction" => 'getGroupeInstruction',              "groupeInstruction" => 'getGroupeInstruction',
50              "title" => 'getTitle',              "title" => 'getTitle',
51          ),          ),
         "document_arrete" => array(  
             "numArrete" => "getNumArrete",  
             "ReglementaireArrete" => "getReglementaireArrete",  
             "NotificationArrete" => "getNotificationArrete",  
             "dateNotificationArrete" => "getDateNotificationArrete",  
             "controleLegalite" => "getControleLegalite",  
             "dateSignature" => "getDateSignature",  
             "nomSignataire" => "getNomSignataire",  
             "qualiteSignataire" => "getQualiteSignataire",  
             "ap_numRue" => "getAp_numRue",  
             "ap_nomDeLaVoie" => "getAp_nomDeLaVoie",  
             "ap_codePostal" => "getAp_codePostal",  
             "ap_ville" => "getAp_ville",  
             "activite" => "getActivite",  
             "dateControleLegalite" => "getDateControleLegalite",  
             "permanentArrete" => "getPermanentArrete",  
         ),  
52      );      );
53    
54    
# Line 376  class instruction extends instruction_ge Line 359  class instruction extends instruction_ge
359          $form->setType('om_fichier_instruction', 'hidden');          $form->setType('om_fichier_instruction', 'hidden');
360          $form->setType('om_final_instruction', 'hidden');          $form->setType('om_final_instruction', 'hidden');
361          // Cache le document arrêté          // Cache le document arrêté
362          $form->setType('document_arrete', 'hidden');          $form->setType('document_numerise', 'hidden');
363      }      }
364    
365      function setSelect(&$form, $maj,&$db,$debug) {      function setSelect(&$form, $maj,&$db,$debug) {
# Line 1064  class instruction extends instruction_ge Line 1047  class instruction extends instruction_ge
1047          $da = new dossier_autorisation($this->getNumDemandeAutorFromDossier($this->valF['dossier']), $this->db, DEBUG);          $da = new dossier_autorisation($this->getNumDemandeAutorFromDossier($this->valF['dossier']), $this->db, DEBUG);
1048          $da->majDossierAutorisation();          $da->majDossierAutorisation();
1049      }          }    
1050      function triggermodifier($id,&$db,$val,$DEBUG) {  
         // Ajout de l'arrêté dans la GED  
         if ($this->valF['numero_arrete'] != $this->getVal('numero_arrete')  
             AND $this->valF["om_fichier_instruction"] != "") {  
             $file = $this->f->storage->get($this->valF["om_fichier_instruction"]);  
             if(isset($file) and $file != null) {  
                 // Récupération des métadonnées calculées après validation  
                 $spe_metadata = $this->getMetadata("document_arrete");  
                 $pdf_output = $file["file_content"];  
                 //Métadonnées du document  
                 $metadata = array(  
                     'filename' => 'instruction_'.$this->valF[$this->clePrimaire].'.pdf',  
                     'mimetype' => 'application/pdf',  
                     'size' => strlen($pdf_output)  
                 );  
                 $metadata = array_merge($metadata, $spe_metadata);  
                   
                 //Si le document a déjà été finalisé  
                 //on met à jour le document mais pas son uid  
                 if ( $this->getVal("document_arrete") != '' ){  
                     $uid = $this->f->storage->update(  
                         $this->getVal("document_arrete"), $pdf_output, $metadata);  
                 }  
                 //Sinon, on joute le document et on récupère son uid  
                 else {  
                     //Stockage du PDF  
                     $uid = $this->f->storage->create($pdf_output, $metadata);  
                 }  
                 if($uid != OP_FAILURE) {  
                     $this->valF["document_arrete"] = $uid;  
                 }  
             }  
               
         }  
     }  
1051      function triggermodifierapres($id,&$db,$val,$DEBUG) {      function triggermodifierapres($id,&$db,$val,$DEBUG) {
1052          /**          /**
1053           * L'objectif ici est d'effectuer les recalculs de date dans le dossier           * L'objectif ici est d'effectuer les recalculs de date dans le dossier
# Line 2045  class instruction extends instruction_ge Line 1994  class instruction extends instruction_ge
1994                          ON dossier_autorisation_type.groupe = groupe.groupe                          ON dossier_autorisation_type.groupe = groupe.groupe
1995                  WHERE dossier.dossier = '".$dossier."'";                  WHERE dossier.dossier = '".$dossier."'";
1996          $res = $this->db->query($sql);          $res = $this->db->query($sql);
1997          $this->f->addToLog("obj/document_numerise.class.php : db->query(".$sql.")", VERBOSE_MODE);          $this->f->addToLog("getSpecificMetadata() : db->query(".$sql.")", VERBOSE_MODE);
1998          if ( database::isError($res)){          if ( database::isError($res)){
1999              die();              die();
2000          }          }

Legend:
Removed from v.2029  
changed lines
  Added in v.2030

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26