/[openfoncier]/branches/3.14.x/obj/instruction.class.php
ViewVC logotype

Diff of /branches/3.14.x/obj/instruction.class.php

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

revision 1656 by nhaye, Thu Apr 11 13:32:55 2013 UTC revision 1657 by nhaye, Fri Apr 12 09:04:55 2013 UTC
# Line 114  class instruction extends instruction_ge Line 114  class instruction extends instruction_ge
114          $dossier_autorisation = $this->db->getOne($sql);          $dossier_autorisation = $this->db->getOne($sql);
115          $this->addToLog("getDossierAutorisationFromDossier(): db->getone(\"".$sql."\")", VERBOSE_MODE);          $this->addToLog("getDossierAutorisationFromDossier(): db->getone(\"".$sql."\")", VERBOSE_MODE);
116          database::isError($dossier_autorisation);          database::isError($dossier_autorisation);
         print_r($dossier_autorisation);  
117          //          //
118          return $dossier_autorisation;          return $dossier_autorisation;
119      }      }
# Line 855  class instruction extends instruction_ge Line 854  class instruction extends instruction_ge
854              die($res->getMessage());              die($res->getMessage());
855          }          }
856          while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) {          while ($row=& $res->fetchRow(DB_FETCHMODE_ASSOC)) {
857              // Ajout d'un événement d'instruction              // Si la date de retour signature est éditée on vérifie si il existe un événement automatique
   
858              if ($this->getVal('date_retour_signature') == "" AND $this->valF['date_retour_signature'] != "") {              if ($this->getVal('date_retour_signature') == "" AND $this->valF['date_retour_signature'] != "") {
859                  $new_instruction = new instruction("]", $db, $DEBUG);                  $new_instruction = new instruction("]", $db, $DEBUG);
860                    // Création d'un tableau avec la liste des champs de l'instruction
861                  foreach($new_instruction->champs as $champ) {                  foreach($new_instruction->champs as $champ) {
862                      $valNewInstr[$champ] = "";                      $valNewInstr[$champ] = "";
863                  }                  }
864                    // Définition des valeurs de la nouvelle instruction
865                  $valNewInstr["evenement"] = $row['evenement_retour_signature'];                  $valNewInstr["evenement"] = $row['evenement_retour_signature'];
866                  $valNewInstr["destinataire"] = $this->valF['destinataire'];                  $valNewInstr["destinataire"] = $this->valF['destinataire'];
867                  $valNewInstr["dossier"] = $this->valF['dossier'];                  $valNewInstr["dossier"] = $this->valF['dossier'];
868                  $valNewInstr["date_evenement"] = date("d/m/Y");                  $valNewInstr["date_evenement"] = date("d/m/Y");
869                    $new_instruction->ajouter($valNewInstr,$db, $DEBUG);
870                }
871                // Si la date de retour AR est éditée on vérifie si il existe un événement automatique
872                if ($this->getVal('date_retour_rar') == "" AND $this->valF['date_retour_rar'] != "") {
873                    $new_instruction = new instruction("]", $db, $DEBUG);
874                    // Création d'un tableau avec la liste des champs de l'instruction
875                    foreach($new_instruction->champs as $champ) {
876                        $valNewInstr[$champ] = "";
877                    }
878                    // Définition des valeurs de la nouvelle instruction
879                    $valNewInstr["evenement"] = $row['evenement_retour_ar'];
880                    $valNewInstr["destinataire"] = $this->valF['destinataire'];
881                    $valNewInstr["dossier"] = $this->valF['dossier'];
882                    $valNewInstr["date_evenement"] = date("d/m/Y");
883                  $new_instruction->ajouter($valNewInstr,$db, $DEBUG);                  $new_instruction->ajouter($valNewInstr,$db, $DEBUG);
884              }              }
885          }          }

Legend:
Removed from v.1656  
changed lines
  Added in v.1657

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26