/[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 10869 by softime, Fri Dec 3 18:46:03 2021 UTC revision 11418 by softime, Mon Feb 7 14:59:54 2022 UTC
# Line 80  class instruction extends instruction_ge Line 80  class instruction extends instruction_ge
80              'annee' => 'getDossierAnnee',              'annee' => 'getDossierAnnee',
81              'division' => 'getDossierDivision',              'division' => 'getDossierDivision',
82              'collectivite' => 'getDossierServiceOrCollectivite',              'collectivite' => 'getDossierServiceOrCollectivite',
             'titre_document' => 'getDocumentTitre'  
83          ),          ),
84          "arrete" => array(          "arrete" => array(
85              "numArrete" => "getNumArrete",              "numArrete" => "getNumArrete",
# Line 97  class instruction extends instruction_ge Line 96  class instruction extends instruction_ge
96              "ap_ville" => "getAp_ville",              "ap_ville" => "getAp_ville",
97              "activite" => "getActivite",              "activite" => "getActivite",
98              "dateControleLegalite" => "getDateControleLegalite",              "dateControleLegalite" => "getDateControleLegalite",
             'titre_document' => 'getDocumentTitre'  
99          )          )
100      );      );
101    
# Line 453  class instruction extends instruction_ge Line 451  class instruction extends instruction_ge
451          );          );
452    
453          //          //
454            $this->class_actions[403] = array(
455                "identifier" => "envoyer_au_controle_de_legalite",
456                "portlet" => array(
457                    "libelle" => __("Envoyer au contrôle de légalité"),
458                    "type" => "action-direct-with-confirmation",
459                    "class" => "envoyer_au_controle_de_legalite-16",
460                ),
461                "view" => "formulaire",
462                "method" => "envoyer_au_controle_de_legalite",
463                "condition" => array(
464                    "can_be_sended_to_cl"
465                ),
466                "permission_suffix" => "envoyer_au_controle_de_legalite",
467            );
468    
469            //
470          $this->class_actions[998] = array(          $this->class_actions[998] = array(
471              "identifier" => "json_data",              "identifier" => "json_data",
472              "view" => "view_json_data",              "view" => "view_json_data",
# Line 584  class instruction extends instruction_ge Line 598  class instruction extends instruction_ge
598    
599    
600              "'' as preview_edition",              "'' as preview_edition",
601                "envoye_cl_platau",
602          );          );
603      }      }
604    
# Line 678  class instruction extends instruction_ge Line 693  class instruction extends instruction_ge
693       * @return boolean       * @return boolean
694       */       */
695      function is_not_sent_for_signature() {      function is_not_sent_for_signature() {
696            // Contrôle si l'utilisateur possède un bypass
697            $bypass = $this->f->isAccredited($this->get_absolute_class_name()."_definaliser_bypass");
698            if ($bypass == true) {
699                return true;
700            }
701    
702          return !$this->is_sent_for_signature();          return !$this->is_sent_for_signature();
703      }      }
704    
# Line 704  class instruction extends instruction_ge Line 725  class instruction extends instruction_ge
725          return false;          return false;
726      }      }
727    
728        function is_sent_to_cl() {
729            // Si l'instruction a une édition
730            // et que l'événement est paramétré pour envoyer le contrôle de légalité
731            // par Plat'AU
732            // et que la date de retour signature est renseignée
733            // et que la date d'envoi au contrôle légalité n'est pas renseignée
734            // et qu'il n'existe pas de task envoi_CL en cours (!= done ou canceled)
735            if ($this->has_an_edition() === true) {
736                $inst_evenement = $this->get_inst_evenement($this->getVal('evenement'));
737                if ($inst_evenement->getVal('envoi_cl_platau') === 't'
738                    || $this->getVal('envoye_cl_platau') === 't') {
739                    //
740                    return true;
741                }
742            }
743            //
744            return false;
745        }
746    
747      /**      /**
748       * CONDITION - is_portail_notification       * CONDITION - is_portail_notification
749       *       *
# Line 970  class instruction extends instruction_ge Line 1010  class instruction extends instruction_ge
1010          }          }
1011    
1012          // Les champs historique_signature et statut_signature ne sont pas saisissable dans tous les cas          // Les champs historique_signature et statut_signature ne sont pas saisissable dans tous les cas
1013          if ($this->can_display_parapheur() === true) {          if ($this->can_display_parapheur() === true && $maj == 3) {
1014              $form->setType('statut_signature', 'selectstatic');              $form->setType('statut_signature', 'selectstatic');
1015              $form->setType('historique_signature', 'jsontotab');              $form->setType('historique_signature', 'jsontotab');
1016              if ($this->getVal('commentaire_signature') == null) {              if ($this->getVal('commentaire_signature') == null) {
# Line 1044  class instruction extends instruction_ge Line 1084  class instruction extends instruction_ge
1084                      $form->setType('btn_refresh', 'httpclickbutton');                      $form->setType('btn_refresh', 'httpclickbutton');
1085                      $form->setType('btn_preview', 'httpclickbutton');                      $form->setType('btn_preview', 'httpclickbutton');
1086                      $form->setType('btn_redaction', 'httpclickbutton');                      $form->setType('btn_redaction', 'httpclickbutton');
1087                      $form->setType('live_preview', 'pdf');                      $form->setType('live_preview', 'previsualiser_pdf');
1088                  }                  }
1089    
1090                  // necessaire pour calcul de date en modification                  // necessaire pour calcul de date en modification
# Line 1067  class instruction extends instruction_ge Line 1107  class instruction extends instruction_ge
1107                      $form->setType('date_envoi_rar', 'date');                      $form->setType('date_envoi_rar', 'date');
1108                      $form->setType('date_retour_rar', 'date');                      $form->setType('date_retour_rar', 'date');
1109                      $form->setType('date_envoi_controle_legalite', 'date');                      $form->setType('date_envoi_controle_legalite', 'date');
1110                        if ($this->is_sent_to_cl() === true) {
1111                            $form->setType("date_envoi_controle_legalite", "datereadonly");
1112                        }
1113                      $form->setType('date_retour_controle_legalite', 'date');                      $form->setType('date_retour_controle_legalite', 'date');
1114                      $form->setType('date_finalisation_courrier', 'date');                      $form->setType('date_finalisation_courrier', 'date');
1115                  }                  }
# Line 1136  class instruction extends instruction_ge Line 1179  class instruction extends instruction_ge
1179              $form->setType('date_envoi_rar', 'date');              $form->setType('date_envoi_rar', 'date');
1180              $form->setType('date_retour_rar', 'date');              $form->setType('date_retour_rar', 'date');
1181              $form->setType('date_envoi_controle_legalite', 'date');              $form->setType('date_envoi_controle_legalite', 'date');
1182                if ($this->is_sent_to_cl() === true) {
1183                    $form->setType("date_envoi_controle_legalite", "datereadonly");
1184                }
1185              $form->setType('date_retour_controle_legalite', 'date');              $form->setType('date_retour_controle_legalite', 'date');
1186              $form->setType('date_finalisation_courrier', 'date');              $form->setType('date_finalisation_courrier', 'date');
1187          }          }
# Line 1144  class instruction extends instruction_ge Line 1190  class instruction extends instruction_ge
1190              foreach ($this->champs as $champ) {              foreach ($this->champs as $champ) {
1191                  $form->setType($champ, 'hidden');                  $form->setType($champ, 'hidden');
1192              }              }
1193              $form->setType('preview_edition', 'pdf');              $form->setType('preview_edition', 'previsualiser');
1194          }          }
1195      }      }
1196    
# Line 1190  class instruction extends instruction_ge Line 1236  class instruction extends instruction_ge
1236          echo json_encode($json_return);          echo json_encode($json_return);
1237      }      }
1238    
1239    
1240        /**
1241         * CONDITION - can_be_sended_to_cl
1242         *
1243         * Vérifie que le contrôle de légalité est disponible
1244         *
1245         * @return boolean
1246         */
1247        function can_be_sended_to_cl() {
1248            // Si l'instruction a une édition
1249            // et que l'événement est paramétré pour envoyer le contrôle de légalité
1250            // par Plat'AU
1251            // et que la date de retour signature est renseignée
1252            // et que la date d'envoi au contrôle légalité n'est pas renseignée
1253            // et qu'il n'existe pas de task envoi_CL en cours (!= done ou canceled)
1254            if ($this->has_an_edition() === true) {
1255                $inst_di = $this->get_inst_dossier($this->getVal('dossier'));
1256                $inst_evenement = $this->get_inst_evenement($this->getVal('evenement'));
1257                if ($inst_evenement->getVal('envoi_cl_platau') === 't'
1258                    && empty($this->getVal('date_retour_signature')) === false
1259                    && empty($this->getVal('date_envoi_controle_legalite')) === true
1260                    && $this->getVal('envoye_cl_platau') === 'f'
1261                    && $this->f->is_type_dossier_platau($inst_di->getVal('dossier_autorisation')) === true
1262                    && $inst_di->getVal('etat_transmission_platau') !== 'jamais_transmissible') {
1263                    //
1264                    return true;
1265                }
1266            }
1267            //
1268            return false;
1269        }
1270    
1271      /**      /**
1272       *       *
1273       * @return string       * @return string
# Line 1197  class instruction extends instruction_ge Line 1275  class instruction extends instruction_ge
1275      function get_var_sql_forminc__sql_signataire_arrete() {      function get_var_sql_forminc__sql_signataire_arrete() {
1276          return "SELECT          return "SELECT
1277              signataire_arrete.signataire_arrete,              signataire_arrete.signataire_arrete,
1278              CONCAT(signataire_arrete.prenom, ' ', signataire_arrete.nom)              CONCAT_WS(' - ', CONCAT_WS(' ', signataire_arrete.prenom, signataire_arrete.nom), signataire_arrete.description)
1279              FROM ".DB_PREFIXE."signataire_arrete              FROM ".DB_PREFIXE."signataire_arrete
1280              WHERE ((signataire_arrete.om_validite_debut IS NULL AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)) OR (signataire_arrete.om_validite_debut <= CURRENT_DATE AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)))              WHERE ((signataire_arrete.om_validite_debut IS NULL AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)) OR (signataire_arrete.om_validite_debut <= CURRENT_DATE AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)))
1281              ORDER BY signataire_arrete.prenom, signataire_arrete.nom";              ORDER BY signataire_arrete.prenom, signataire_arrete.nom";
# Line 1210  class instruction extends instruction_ge Line 1288  class instruction extends instruction_ge
1288      function get_var_sql_forminc__sql_signataire_arrete_by_id() {      function get_var_sql_forminc__sql_signataire_arrete_by_id() {
1289          return "SELECT          return "SELECT
1290              signataire_arrete.signataire_arrete,              signataire_arrete.signataire_arrete,
1291              CONCAT(signataire_arrete.prenom, ' ', signataire_arrete.nom)              CONCAT_WS(' - ', CONCAT_WS(' ', signataire_arrete.prenom, signataire_arrete.nom), signataire_arrete.description)
1292              FROM ".DB_PREFIXE."signataire_arrete              FROM ".DB_PREFIXE."signataire_arrete
1293              WHERE signataire_arrete.signataire_arrete = <idx>";              WHERE signataire_arrete.signataire_arrete = <idx>";
1294      }      }
# Line 1222  class instruction extends instruction_ge Line 1300  class instruction extends instruction_ge
1300      function get_var_sql_forminc__sql_signataire_arrete_by_di() {      function get_var_sql_forminc__sql_signataire_arrete_by_di() {
1301          return "SELECT          return "SELECT
1302              signataire_arrete.signataire_arrete,              signataire_arrete.signataire_arrete,
1303              CONCAT(signataire_arrete.prenom, ' ', signataire_arrete.nom)              CONCAT_WS(' - ', CONCAT_WS(' ', signataire_arrete.prenom, signataire_arrete.nom), signataire_arrete.description)
1304              FROM ".DB_PREFIXE."signataire_arrete              FROM ".DB_PREFIXE."signataire_arrete
1305              LEFT JOIN ".DB_PREFIXE."om_collectivite ON signataire_arrete.om_collectivite = om_collectivite.om_collectivite              LEFT JOIN ".DB_PREFIXE."om_collectivite ON signataire_arrete.om_collectivite = om_collectivite.om_collectivite
1306              WHERE ((signataire_arrete.om_validite_debut IS NULL AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)) OR (signataire_arrete.om_validite_debut <= CURRENT_DATE AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)))              WHERE ((signataire_arrete.om_validite_debut IS NULL AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)) OR (signataire_arrete.om_validite_debut <= CURRENT_DATE AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)))
# Line 1237  class instruction extends instruction_ge Line 1315  class instruction extends instruction_ge
1315      function get_var_sql_forminc__sql_signataire_arrete_defaut() {      function get_var_sql_forminc__sql_signataire_arrete_defaut() {
1316          return "SELECT          return "SELECT
1317              signataire_arrete.signataire_arrete,              signataire_arrete.signataire_arrete,
1318              CONCAT(signataire_arrete.prenom, ' ', signataire_arrete.nom)              CONCAT_WS(' - ', CONCAT_WS(' ', signataire_arrete.prenom, signataire_arrete.nom), signataire_arrete.description)
1319              FROM ".DB_PREFIXE."signataire_arrete              FROM ".DB_PREFIXE."signataire_arrete
1320              WHERE ((signataire_arrete.om_validite_debut IS NULL AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)) OR (signataire_arrete.om_validite_debut <= CURRENT_DATE AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE))) AND signataire_arrete.defaut IS TRUE              WHERE ((signataire_arrete.om_validite_debut IS NULL AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)) OR (signataire_arrete.om_validite_debut <= CURRENT_DATE AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE))) AND signataire_arrete.defaut IS TRUE
1321              ORDER BY signataire_arrete.prenom, signataire_arrete.nom";              ORDER BY signataire_arrete.prenom, signataire_arrete.nom";
# Line 1250  class instruction extends instruction_ge Line 1328  class instruction extends instruction_ge
1328      function get_var_sql_forminc__sql_signataire_arrete_defaut_by_di() {      function get_var_sql_forminc__sql_signataire_arrete_defaut_by_di() {
1329          return "SELECT          return "SELECT
1330              signataire_arrete.signataire_arrete,              signataire_arrete.signataire_arrete,
1331              CONCAT(signataire_arrete.prenom, ' ', signataire_arrete.nom)              CONCAT_WS(' - ', CONCAT_WS(' ', signataire_arrete.prenom, signataire_arrete.nom), signataire_arrete.description)
1332              FROM ".DB_PREFIXE."signataire_arrete              FROM ".DB_PREFIXE."signataire_arrete
1333              LEFT JOIN ".DB_PREFIXE."om_collectivite ON signataire_arrete.om_collectivite = om_collectivite.om_collectivite              LEFT JOIN ".DB_PREFIXE."om_collectivite ON signataire_arrete.om_collectivite = om_collectivite.om_collectivite
1334              WHERE ((signataire_arrete.om_validite_debut IS NULL AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)) OR (signataire_arrete.om_validite_debut <= CURRENT_DATE AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE))) AND signataire_arrete.defaut IS TRUE              WHERE ((signataire_arrete.om_validite_debut IS NULL AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE)) OR (signataire_arrete.om_validite_debut <= CURRENT_DATE AND (signataire_arrete.om_validite_fin IS NULL OR signataire_arrete.om_validite_fin > CURRENT_DATE))) AND signataire_arrete.defaut IS TRUE
# Line 1446  class instruction extends instruction_ge Line 1524  class instruction extends instruction_ge
1524    
1525          if ($maj == 401) {          if ($maj == 401) {
1526              $file = $this->f->storage->get($this->getVal('om_fichier_instruction'));              $file = $this->f->storage->get($this->getVal('om_fichier_instruction'));
1527              $base64 = base64_encode($file['file_content']);              $form->setSelect('preview_edition', array(
1528              $form->setSelect('preview_edition', array('base64' => $base64));                  'base64' => base64_encode($file['file_content']),
1529                    'mimetype' => $file['metadata']['mimetype'],
1530                    'label' => 'instruction_'.$this->getVal($this->clePrimaire),
1531                    'href' => sprintf(
1532                        '../app/index.php?module=form&snippet=file&obj=instruction&champ=om_fichier_instruction&id=%1$s',
1533                        $this->getVal($this->clePrimaire)
1534                    )
1535                ));
1536          }          }
1537      }      }
1538    
1539      function cleSecondaire($id, &$dnu1 = null, $val = array(), $dnu2 = null) {      function cleSecondaire($id, &$dnu1 = null, $val = array(), $dnu2 = null) {
1540          //          //
1541          parent::cleSecondaire($id, $dnu1, $val);          // Vérifie uniquementla cle secondaire : demande
1542            $this->rechercheTable($this->f->db, "demande", "instruction_recepisse", $id);
1543                    
1544          $id = $this->getVal($this->clePrimaire);          $id = $this->getVal($this->clePrimaire);
1545    
# Line 2636  class instruction extends instruction_ge Line 2722  class instruction extends instruction_ge
2722                  "idx" => $this->valF['dossier'],                  "idx" => $this->valF['dossier'],
2723              ));              ));
2724              $valF['instruction'] = $id;              $valF['instruction'] = $id;
2725                $valF['crud'] = 'create';
2726              $update_by_instruction = $inst_dossier->update_by_instruction($valF);              $update_by_instruction = $inst_dossier->update_by_instruction($valF);
2727              if ($update_by_instruction === false) {              if ($update_by_instruction === false) {
2728                  $this->cleanMessage();                  $this->cleanMessage();
# Line 2861  class instruction extends instruction_ge Line 2948  class instruction extends instruction_ge
2948                  // Ajout de la notif et récupération de son id                  // Ajout de la notif et récupération de son id
2949                  $idNotif = $this->ajouter_notification(                  $idNotif = $this->ajouter_notification(
2950                      $this->valF[$this->clePrimaire],                      $this->valF[$this->clePrimaire],
                     true,  
2951                      $this->f->get_connected_user_login_name(),                      $this->f->get_connected_user_login_name(),
2952                      $demandeur                      $demandeur,
2953                        $collectivite_di,
2954                        true
2955                  );                  );
2956                  if ($idNotif === false) {                  if ($idNotif === false) {
                     $this->addToMessage(  
                         __("Erreur lors de la génération de la notification au(x) pétitionnaire(s).")  
                     );  
2957                      return false;                      return false;
2958                  }                  }
2959                  // Création de la tache en lui donnant l'id de la notification                  // Création de la tache en lui donnant l'id de la notification
# Line 2961  class instruction extends instruction_ge Line 3046  class instruction extends instruction_ge
3046          $message = '';          $message = '';
3047          // Récupération des informations concernant le demandeur          // Récupération des informations concernant le demandeur
3048          $dossier = $this->getVal('dossier');          $dossier = $this->getVal('dossier');
3049            $collectivite_di = $this->get_dossier_instruction_om_collectivite($dossier);
3050          $demandeur = $this->get_demandeurs_notifiable(          $demandeur = $this->get_demandeurs_notifiable(
3051              $dossier,              $dossier,
3052              true              true
# Line 2970  class instruction extends instruction_ge Line 3056  class instruction extends instruction_ge
3056              // Ajout de la notif et récupération de son id              // Ajout de la notif et récupération de son id
3057              $idNotification = $this->ajouter_notification(              $idNotification = $this->ajouter_notification(
3058                  $this->getVal($this->clePrimaire),                  $this->getVal($this->clePrimaire),
                 true,  
3059                  $this->f->get_connected_user_login_name(),                  $this->f->get_connected_user_login_name(),
3060                  $destinataire[0]                  $destinataire[0],
3061                    $collectivite_di,
3062                    true
3063              );              );
3064              if ($idNotification === false) {              if ($idNotification === false) {
                 $this->addToMessage(  
                     __("Erreur lors de la génération de la notification au(x) pétitionnaire(s).")  
                 );  
3065                  return $this->end_treatment(__METHOD__, false);                  return $this->end_treatment(__METHOD__, false);
3066              }              }
3067              // Création de la tâche en lui donnant l'id de la notification              // Création de la tâche en lui donnant l'id de la notification
# Line 3008  class instruction extends instruction_ge Line 3092  class instruction extends instruction_ge
3092              //              //
3093              $type = 'notification_instruction';              $type = 'notification_instruction';
3094              // Vérifie si l'instruction est un récépissé              // Vérifie si l'instruction est un récépissé
3095              $instruction_id = $this->getVal('instruction') !== null ? $this->getVal('instruction') : $this->valF['instruction'];              $trace = debug_backtrace();
3096              $dossier_id = $this->getVal('dossier') !== null && $this->getVal('dossier') !== '' ?              foreach ($trace as $key => $value) {
3097                  $this->getVal('dossier') :                  if (isset($trace[$key]['class']) === true
3098                  $this->valF['dossier'];                      && empty($trace[$key]['class']) === false) {
3099              $inst_dossier = $this->f->get_inst__om_dbform(array(                      //
3100                  "obj" => "dossier_instruction",                      if (strtolower($trace[$key]['class']) === 'demande') {
3101                  "idx" => $dossier_id,                          $type = 'notification_recepisse';
3102              ));                      }
3103              $recepisse = $inst_dossier->get_demande_instruction_recepisse();                  }
             if ($instruction_id === $recepisse  
                 || $recepisse === ''  
                 || $recepisse === null) {  
                 //  
                 $type = 'notification_recepisse';  
3104              }              }
3105              // Vérifie si l'instruction est une décision              // Vérifie si l'instruction est une décision
3106              if ($type !== 'notification_recepisse') {              if ($type !== 'notification_recepisse') {
# Line 3051  class instruction extends instruction_ge Line 3130  class instruction extends instruction_ge
3130          return true;          return true;
3131      }      }
3132    
3133        /**
3134         * A partir des informations passée en argument ajoute un nouvel élément
3135         * dans la table instruction_notification.
3136         * Avant l'ajout vérifie en utilisant l'id de la collectivité passée en
3137         * paramètre si le paramétrage attendus est ok.
3138         * Ajoute également un nouvel élement dans instruction_notification_document
3139         * si l'instruction possède une lettretype.
3140         * Si un identifiant d'une instruction annexe est donnée ajoute un deuxième
3141         * élement dans la table instruction_notification_document qui correspondra
3142         * à l'annexe de la notification.
3143         *
3144         * @param integer identifiant de l'instruction notifiée
3145         * @param string information concernant l'emetteur
3146         * @param array tableau contenant 2 entrées
3147         *  - destinatire : nom, prenom ou raison sociale, dénomination et courriel
3148         *  - courriel : adresse mail de la personne à notifier
3149         * @param integer identifiant de la collectivité permettant de récupèrer les
3150         * paramètres à valider
3151         * @param boolean indique si la notification est automatique ou manuelle
3152         * @param integer identifiant d'une instruction dont l'édition sera annexé
3153         * à la notification
3154         *
3155         * @return integer|boolean identifiant de la notification créée si le traitement
3156         * a réussie, false sinon.
3157         */
3158      protected function ajouter_notification(      protected function ajouter_notification(
3159          $idInstruction,          $idInstruction,
         $demandeAuto = false,  
3160          $emetteur,          $emetteur,
3161          $destinataire,          $destinataire,
3162            $collectiviteId,
3163            $demandeAuto = false,
3164          $idInstrDocAnnexe = null          $idInstrDocAnnexe = null
3165      ) {      ) {
3166            // Vérification que les paramètres nécessaires à l'envoi de la notification existe avant
3167            // de créer la notification
3168            if (! $this->is_parametrage_notification_correct($collectiviteId)) {
3169                $this->addToMessage(__("Erreur de paramétrage. L'url d'accès au(x) document(s) notifié(s) n'est pas paramétrée."));
3170                return false;
3171            }
3172          // Préparation de la notification          // Préparation de la notification
3173          $inst_notif = $this->f->get_inst__om_dbform(array(          $inst_notif = $this->f->get_inst__om_dbform(array(
3174              "obj" => "instruction_notification",              "obj" => "instruction_notification",
# Line 3079  class instruction extends instruction_ge Line 3190  class instruction extends instruction_ge
3190          // Création de la notification          // Création de la notification
3191          $add_notif = $inst_notif->ajouter($notif_val);          $add_notif = $inst_notif->ajouter($notif_val);
3192          if ($add_notif === false) {          if ($add_notif === false) {
3193                $this->addToMessage(__("Erreur lors de la génération de la notification au(x) pétitionnaire(s)."));
3194              return false;              return false;
3195          }          }
3196    
# Line 3089  class instruction extends instruction_ge Line 3201  class instruction extends instruction_ge
3201                  $inst_notif->getVal($inst_notif->clePrimaire)                  $inst_notif->getVal($inst_notif->clePrimaire)
3202              );              );
3203              if ($add_notif_doc === false) {              if ($add_notif_doc === false) {
3204                    $this->addToMessage(__("Erreur lors de la génération de la notification du document."));
3205                  return false;                  return false;
3206              }              }
3207          }          }
# Line 3100  class instruction extends instruction_ge Line 3213  class instruction extends instruction_ge
3213                  true                  true
3214              );              );
3215              if ($add_notif_annexe === false) {              if ($add_notif_annexe === false) {
3216                    $this->addToMessage(__("Erreur lors de la génération de la notification de l'annexe."));
3217                  return false;                  return false;
3218              }              }
3219          }          }
# Line 3109  class instruction extends instruction_ge Line 3223  class instruction extends instruction_ge
3223      }      }
3224    
3225      /**      /**
3226         * Vérifie si le paramétrage de la notification des demandeurs est correct.
3227         *
3228         * @param integer identifiant de la collectivité
3229         * @return boolean
3230         */
3231        protected function is_parametrage_notification_correct($collectiviteId) {
3232            $categorie = $this->f->get_param_option_notification($collectiviteId);
3233            $urlAccesNotif = $this->f->get_parametre_notification_url_acces($collectiviteId);
3234            if ($categorie == 'mail' && $urlAccesNotif == null) {
3235                return false;
3236            }
3237            return true;
3238        }
3239    
3240        /**
3241       * Ajoute un élément dans la table instruction_notification_document.       * Ajoute un élément dans la table instruction_notification_document.
3242       *       *
3243       * @param integer $idInstruction : id de l'instruction à laquelle est rattaché le document       * @param integer $idInstruction : id de l'instruction à laquelle est rattaché le document
# Line 3266  class instruction extends instruction_ge Line 3395  class instruction extends instruction_ge
3395                  "idx" => $this->valF['dossier'],                  "idx" => $this->valF['dossier'],
3396              ));              ));
3397              $valF['instruction'] = $id;              $valF['instruction'] = $id;
3398                $valF['crud'] = 'update';
3399              $update_by_instruction = $inst_dossier->update_by_instruction($valF);              $update_by_instruction = $inst_dossier->update_by_instruction($valF);
3400              if ($update_by_instruction === false) {              if ($update_by_instruction === false) {
3401                  $this->cleanMessage();                  $this->cleanMessage();
# Line 3494  class instruction extends instruction_ge Line 3624  class instruction extends instruction_ge
3624                      // Ajout de la notif et récupération de son id                      // Ajout de la notif et récupération de son id
3625                      $idNotif = $this->ajouter_notification(                      $idNotif = $this->ajouter_notification(
3626                          $this->valF[$this->clePrimaire],                          $this->valF[$this->clePrimaire],
                         true,  
3627                          $this->f->get_connected_user_login_name(),                          $this->f->get_connected_user_login_name(),
3628                          $demandeur                          $demandeur,
3629                            $collectivite_di,
3630                            true
3631                      );                      );
3632                      if ($idNotif === false) {                      if ($idNotif === false) {
                         $this->addToMessage(  
                             __("Erreur lors de la génération de la notification au(x) pétitionnaire(s).")  
                         );  
3633                          return false;                          return false;
3634                      }                      }
3635                      // Création de la tache en lui donnant l'id de la notification                      // Création de la tache en lui donnant l'id de la notification
# Line 3636  class instruction extends instruction_ge Line 3764  class instruction extends instruction_ge
3764    
3765          // On met à jour le dossier          // On met à jour le dossier
3766          $valF['instruction'] = $id;          $valF['instruction'] = $id;
3767            $valF['crud'] = 'delete';
3768          $update_by_instruction = $inst_di->update_by_instruction($valF);          $update_by_instruction = $inst_di->update_by_instruction($valF);
3769          if ($update_by_instruction === false) {          if ($update_by_instruction === false) {
3770              $this->cleanMessage();              $this->cleanMessage();
# Line 5186  class instruction extends instruction_ge Line 5315  class instruction extends instruction_ge
5315                      // Ajout de la notif et récupération de son id                      // Ajout de la notif et récupération de son id
5316                      $idNotif = $this->ajouter_notification(                      $idNotif = $this->ajouter_notification(
5317                          $this->getVal($this->clePrimaire),                          $this->getVal($this->clePrimaire),
                         true,  
5318                          $this->f->get_connected_user_login_name(),                          $this->f->get_connected_user_login_name(),
5319                          $demandeur                          $demandeur,
5320                            $collectivite_di,
5321                            true
5322                      );                      );
5323                      if ($idNotif === false) {                      if ($idNotif === false) {
                         $this->addToMessage(  
                             __("Erreur lors de la génération de la notification au(x) pétitionnaire(s).")  
                         );  
5324                          // Termine le traitement                          // Termine le traitement
5325                          return $this->end_treatment(__METHOD__, false);                          return $this->end_treatment(__METHOD__, false);
5326                      }                      }
# Line 6321  class instruction extends instruction_ge Line 6448  class instruction extends instruction_ge
6448    
6449                  if($res->numrows() == 1) {                  if($res->numrows() == 1) {
6450                      $liste_champs = explode(";", $type_mise_a_jour);                      $liste_champs = explode(";", $type_mise_a_jour);
6451                        $row =& $res->fetchRow(DB_FETCHMODE_ASSOC);
6452                        $instr = $this->f->get_inst__om_dbform(array(
6453                            "obj" => "instruction",
6454                            "idx" => $row['instruction'],
6455                        ));
6456                      // Mise à jour des dates après l'écran de verification                      // Mise à jour des dates après l'écran de verification
6457                      if($this->f->get_submitted_post_value('is_valid') !== null and $this->f->get_submitted_post_value('is_valid') == "true") {                      if($this->f->get_submitted_post_value('is_valid') !== null and $this->f->get_submitted_post_value('is_valid') == "true") {
                         $row =& $res->fetchRow(DB_FETCHMODE_ASSOC);  
                         $instr = $this->f->get_inst__om_dbform(array(  
                             "obj" => "instruction",  
                             "idx" => $row['instruction'],  
                         ));  
6458                          $valF = array();                          $valF = array();
6459                          foreach($instr->champs as $id => $champ) {                          foreach($instr->champs as $id => $champ) {
6460                              $valF[$champ] = $instr->val[$id];                              $valF[$champ] = $instr->val[$id];
# Line 6432  class instruction extends instruction_ge Line 6559  class instruction extends instruction_ge
6559    
6560                          // Vérification de la non modification des dates de suivi                          // Vérification de la non modification des dates de suivi
6561                          foreach(explode(";", $type_mise_a_jour) as $champ) {                          foreach(explode(";", $type_mise_a_jour) as $champ) {
6562                                if ($champ === 'date_envoi_controle_legalite') {
6563                                    if ($instr->is_sent_to_cl() === true) {
6564                                        $error = __("Les dates de suivis ne peuvent etre modifiees");
6565                                        $date_error = true;
6566                                        break;
6567                                    }
6568                                }
6569                              if($infos[$champ] != "" AND $infos[$champ] != $date) {                              if($infos[$champ] != "" AND $infos[$champ] != $date) {
6570                                  $error = _("Les dates de suivis ne peuvent etre modifiees");                                  $error = _("Les dates de suivis ne peuvent etre modifiees");
6571                                  $date_error = true;                                  $date_error = true;
6572                                    break;
6573                              }                              }
6574                          }                          }
6575                      }                      }
# Line 7554  class instruction extends instruction_ge Line 7689  class instruction extends instruction_ge
7689    
7690          // Initialisation des métadonnées          // Initialisation des métadonnées
7691          $metadonnee_dossier = $file['metadata'];          $metadonnee_dossier = $file['metadata'];
7692            // récupération de l'extension du fichier
7693            $extension = substr($metadonnee_dossier['filename'], strrpos($metadonnee_dossier['filename'], '.'));
7694            // Modification du libellé du document transmis au parapheur
7695            // pour le mettre sous la forme : instruction_xxx_libelle_lettretype.extension
7696            $metadonnee_dossier['filename'] = $this->getDocumentLibelle().$extension;
7697            $metadonnee_dossier['titre_document'] = $this->getDocumentTitre();
7698    
7699          $metadonnee_dossier['url_di'] = sprintf(          $metadonnee_dossier['url_di'] = sprintf(
7700              '%sapp/index.php?module=form&direct_link=true&obj=dossier_instruction&action=3&direct_field=dossier&direct_form=instruction&direct_action=3&direct_idx=%s',              '%sapp/index.php?module=form&direct_link=true&obj=dossier_instruction&action=3&direct_field=dossier&direct_form=instruction&direct_action=3&direct_idx=%s',
7701              PATH_BASE_URL,              $this->f->get_param_base_path_metadata_url_di() !== null ? $this->f->get_param_base_path_metadata_url_di() : PATH_BASE_URL,
7702              $this->getVal($this->clePrimaire)              $this->getVal($this->clePrimaire)
7703          );          );
7704    
# Line 7619  class instruction extends instruction_ge Line 7760  class instruction extends instruction_ge
7760          // Message          // Message
7761          $this->addToMessage(__("Le document a été envoyé pour signature dans le parapheur."));          $this->addToMessage(__("Le document a été envoyé pour signature dans le parapheur."));
7762          if (array_key_exists('signature_page_url', $result) === true) {          if (array_key_exists('signature_page_url', $result) === true) {
             $link_text = $result['signature_page_url'];  
             if (strlen($link_text) > 300) {  
                 $link_text = substr($link_text, 0, 300).'…';  
             }  
7763              $this->addToMessage(sprintf(              $this->addToMessage(sprintf(
7764                  __("Lien vers la page de signature : %s"),                  '<br> > <a href="%1$s" title="%2$s" target="_blank">%2$s</a>',
7765                  '<a href="'.$result['signature_page_url'].'" title="'.__("Signer le document").'" target="_blank">'.$link_text.'</a>'                  $result['signature_page_url'],
7766                    __("Signez directement le document")
7767              ));              ));
7768          }          }
7769    
# Line 7871  class instruction extends instruction_ge Line 8009  class instruction extends instruction_ge
8009      }      }
8010    
8011      /**      /**
8012         * TREATMENT - envoyer_au_controle_de_legalite
8013         *
8014         * Ajoute la tâche envoi_CL.
8015         * C'est le traitement de la tâche qui mettra à jour la date d'envoi au contrôle de légalité.
8016         *
8017         * @return [type] [description]
8018         */
8019        function envoyer_au_controle_de_legalite() {
8020            $this->begin_treatment(__METHOD__);
8021            $this->correct = true;
8022    
8023            //
8024            if ($this->can_be_sended_to_cl() === true) {
8025                // Création de la task 'envoi_CL'
8026                $inst_task = $this->f->get_inst__om_dbform(array(
8027                    "obj" => "task",
8028                    "idx" => 0,
8029                ));
8030                $task_val = array(
8031                    'type' => 'envoi_CL',
8032                    'object_id' => $this->getVal('instruction'),
8033                    'dossier' => $this->getVal('dossier'),
8034                );
8035                // Change l'état de la tâche de notification en fonction de l'état de
8036                // transmission du dossier d'instruction
8037                $inst_di = $this->get_inst_dossier($this->getVal('dossier'));
8038                if ($this->f->is_option_mode_service_consulte_enabled() === false
8039                    && ($inst_di->getVal('etat_transmission_platau') == 'non_transmissible'
8040                    || $inst_di->getVal('etat_transmission_platau') == 'transmis_mais_non_transmissible')) {
8041                    //
8042                    $task_val['state'] = $inst_task::STATUS_DRAFT;
8043                }
8044                $add_task = $inst_task->add_task(array('val' => $task_val));
8045                if ($add_task === false) {
8046                    $this->addToMessage(sprintf('%s %s',
8047                        __("Une erreur s'est produite lors de la création tâche."),
8048                        __("Veuillez contacter votre administrateur.")
8049                    ));
8050                    $this->correct = false;
8051                    return $this->end_treatment(__METHOD__, false);
8052                }
8053                // Mise à jour du champs 'envoye_cl_platau'
8054                $instr_val = array(
8055                    'envoye_cl_platau' => 't',
8056                );
8057                $res = $this->f->db->autoExecute(
8058                    DB_PREFIXE.$this->table,
8059                    $instr_val,
8060                    DB_AUTOQUERY_UPDATE,
8061                    $this->getCle($this->getVal($this->clePrimaire))
8062                );
8063                $this->addToLog(__METHOD__."(): db->autoexecute(\"".DB_PREFIXE.'.'.$this->table."\", ".print_r($instr_val, true).", DB_AUTOQUERY_UPDATE, \"".$this->getCle($this->clePrimaire)."\");", DEBUG_MODE);
8064                if ($this->f->isDatabaseError($res, true) === true) {
8065                    $this->addToMessage(sprintf('%s %s',
8066                        __("Une erreur s'est produite lors de la mise à jour de l'instruction."),
8067                        __("Veuillez contacter votre administrateur.")
8068                    ));
8069                    $this->correct = false;
8070                    return $this->end_treatment(__METHOD__, false);
8071                }
8072                // Message de validation à l'utilisateur
8073                $this->addToMessage(__('Votre demande de transfert au contrôle de légalité à bien été prise en compte.'));
8074                $this->addToMessage(__("La date d'envoi au contrôle de légalité sera mise à jour ultérieurement."));
8075            }
8076            //
8077            return $this->end_treatment(__METHOD__, true);
8078        }
8079    
8080    
8081        /**
8082       * Retourne le lien de retour (VIEW formulaire et VIEW sousformulaire).       * Retourne le lien de retour (VIEW formulaire et VIEW sousformulaire).
8083       *       *
8084       * @param string $view Appel dans le contexte de la vue 'formulaire' ou de       * @param string $view Appel dans le contexte de la vue 'formulaire' ou de
# Line 7937  class instruction extends instruction_ge Line 8145  class instruction extends instruction_ge
8145          return $val;          return $val;
8146      }      }
8147    
8148        public function get_related_instructions_next($next_type = 'retour_signature', $instruction = null) {
8149            if (in_array($next_type, array('retour_signature', 'retour_ar', 'suivant_tacite', )) === false) {
8150                return false;
8151            }
8152            $result = array();
8153            $evenements = array();
8154            if ($instruction === null) {
8155                $instruction = $this->getVal($this->clePrimaire);
8156                $evenement = $this->getVal('evenement');
8157                $dossier = $this->getVal('dossier');
8158            } else {
8159                $inst = $this->f->get_inst__om_dbform(array(
8160                    "obj" => "instruction",
8161                    "idx" => $instruction,
8162                ));
8163                $evenement = $inst->getVal('evenement');
8164                $dossier = $inst->getVal('dossier');
8165            }
8166            //
8167            $query = sprintf('
8168                SELECT evenement_%3$s
8169                FROM %1$sevenement
8170                WHERE evenement = %2$s
8171                ',
8172                DB_PREFIXE,
8173                $evenement,
8174                $next_type
8175            );
8176            $res = $this->f->get_one_result_from_db_query($query, true);
8177            if ($res['code'] === 'KO') {
8178                return false;
8179            }
8180            $ev_next = $res['result'];
8181            //
8182            $query = sprintf('
8183                SELECT MAX(instruction.instruction) as instruction
8184                FROM %1$sinstruction
8185                WHERE dossier = \'%3$s\'
8186                    AND evenement = %2$s
8187                ',
8188                DB_PREFIXE,
8189                $ev_next,
8190                $dossier
8191            );
8192            $res = $this->f->get_one_result_from_db_query($query, true);
8193            if ($res['code'] === 'KO') {
8194                return false;
8195            }
8196            //
8197            return $res['result'];
8198        }
8199    
8200      public function get_related_instructions($instruction = null) {      public function get_related_instructions($instruction = null) {
8201          $result = array();          $result = array();
8202          $evenements = array();          $evenements = array();
# Line 8190  class instruction extends instruction_ge Line 8450  class instruction extends instruction_ge
8450          $res = $this->f->db->getOne($query);          $res = $this->f->db->getOne($query);
8451          $this->addToLog(__METHOD__.": db->getOne(\"".$query."\");", VERBOSE_MODE);          $this->addToLog(__METHOD__.": db->getOne(\"".$query."\");", VERBOSE_MODE);
8452          $this->f->isDatabaseError($res);          $this->f->isDatabaseError($res);
   
8453          return $res;          return $res;
8454      }      }
8455    
# Line 8280  class instruction extends instruction_ge Line 8539  class instruction extends instruction_ge
8539          }          }
8540      }      }
8541    
8542        /**
8543         * Récupère le titre du document envoyé au parapheur
8544         */
8545      protected function getDocumentTitre($champ = null) {      protected function getDocumentTitre($champ = null) {
8546          $title = $this->getTitle();          $title = $this->getTitle();
8547          $dossier = $this->getDossier();          $dossier = $this->getDossier();
# Line 8287  class instruction extends instruction_ge Line 8549  class instruction extends instruction_ge
8549      }      }
8550    
8551      /**      /**
8552         * Compose le nom du document à transmettre au parapheur.
8553         * Le nom ets composé de cette manière :
8554         * instruction_xxx_libelle_de_la_lettre_type_associee
8555         * ou xxx correspond au numéro de l'instruction
8556         */
8557        protected function getDocumentLibelle() {
8558            // Récupère le champ instruction
8559            $instruction = $this->getVal("instruction");
8560    
8561            // Requête sql servant à récupérer le titre du document
8562            // TO_CHAR() introduit un espace avant l'affichage du nombre
8563            // comme les espaces sont remplacé par des '_' dans le retour de la fonction
8564            // il n'est pas nécessaire de mettre un '_' après le mot instruction.
8565            $sql = sprintf(
8566                'SELECT
8567                    CONCAT(
8568                        \'instruction\',
8569                        TO_CHAR(instruction.instruction, \'000\'),
8570                        \'_\',
8571                        LOWER(om_lettretype.libelle)
8572                    ) as nom_fichier
8573                FROM
8574                    %1$sinstruction
8575                    LEFT JOIN %1$som_lettretype ON om_lettretype.id = instruction.lettretype
8576                WHERE
8577                    instruction = %2$s',
8578                DB_PREFIXE,
8579                $instruction
8580            );
8581            $documentLibelle = $this->f->db->getOne($sql);
8582            $this->addToLog("getDocumentTitre(): db->getOne(\"".$sql."\");", VERBOSE_MODE);
8583            if (database::isError($documentLibelle)) {
8584                die();
8585            }
8586    
8587            // Transforamtion des ' ' en '_', des accents en lettres sans accents et des
8588            // caractères spéciaux en '_'
8589            // La méthode normalize_string est utilisé pour gérer les accents
8590            $documentLibelle = $this->f->normalize_string($documentLibelle);
8591            // TODO : comparer cette liste et celle de la méthode normalize_string
8592            // pour éviter les doublons + vérifier qu'il n'y a pas de doublons dans cette
8593            // liste
8594            $invalid = array('Œ'=>'oe', 'œ'=>'oe', 'Ÿ'=>'y', 'ü'=>'u',
8595                '¢' => '_', 'ß' => '_', '¥' => '_', '£' => '_', '™' => '_', '©' => '_',
8596                '®' => '_', 'ª' => '_', '×' => '_', '÷' => '_', '±' => '_', '²' => '_',
8597                '³' => '_', '¼' => '_', '½' => '_', '¾' => '_', 'µ' => '_', '¿' => '_',
8598                '¶' => '_', '·' => '_', '¸' => '_', 'º' => '_', '°' => '_', '¯' => '_',
8599                '§' => '_', '…' => '_', '¤' => '_', '¦' => '_', '≠' => '_', '¬' => '_',
8600                'ˆ' => '_', '¨' => '_', '‰' => '_', '¤' => '_', '€' => '_', '$' => '_',
8601                '«' => '_', '»' => '_', '‹' => '_', '›' => '_', 'ƒ' => '_', '¥' => '_',
8602                '‘‘' => '_', '‚' => '_', '!' => '_', '¡' => '_', '¢' => '_', '£' => '_',
8603                '?' => '_', '[' => '_', ']' => '_', '´' => '_', '`' => '_', '^' => '_',
8604                '~' => '_', '˜' => '_', '#' => '_', '*' => '_', '.' => '_', ':' => '_',
8605                ';' => '_', '•' => '_', '¯' => '_', '‾' => '_', '–' => '_', '–' => '_',
8606                '—' => '_', '_' => '_', '|' => '_', '¦‌' => '_', '‡' => '_', '§' => '_',
8607                '¶' => '_', '©' => '_', '®' => '_', '™' => '_', '&' => '_', '@' => '_',
8608                '/' => '_', '\\' => '_', '◊' => '_', '♠' => '_', '♣' => '_', '♥' => '_',
8609                '♦' => '_', '←' => '_', '↑' => '_', '→' => '_', '↓' => '_', '↔' => '_',
8610                '°' => '_', 'µ' => '_', '<' => '_', '>' => '_', '≤' => '_', '≥' => '_',
8611                '=' => '_', '≈' => '_', '≠' => '_', '≡' => '_', '±' => '_', '−' => '_',
8612                '+' => '_', '×' => '_', '÷' => '_', '⁄' => '_', '%' => '_', '‰' => '_',
8613                '¼' => '_', '½' => '_', '¾' => '_', '¹' => '_', '²' => '_', '³' => '_',
8614                '' => '_', 'º' => '_', 'ª' => '_', 'ƒ' => '_', '′' => '_', '″' => '_',
8615                '∂' => '_', '∏' => '_', '∑' => '_', '√' => '_', '∞' => '_', '¬' => '_',
8616                '∩' => '_', '∫' => '_', 'α' => '_', 'Α' => '_', 'β' => '_', 'Β' => '_',
8617                'γ' => '_', 'Γ' => '_', 'δ' => '_', 'Δ' => '_', 'ε' => '_', 'Ε' => '_',
8618                'ζ' => '_', 'Ζ' => '_', 'η' => '_', 'Η' => '_', 'θ' => '_', 'Θ' => '_',
8619                'ι' => '_', 'Ι' => '_', 'κ' => '_', 'Κ' => '_', 'λ' => '_', 'Λ' => '_',
8620                'μ' => '_', 'Μ' => '_', 'ν' => '_', 'Ν' => '_', 'ξ' => '_', 'Ξ' => '_',
8621                'ο' => '_', 'Ο' => '_', 'π' => '_', 'Π' => '_', 'ρ' => '_', 'Ρ' => '_',
8622                'σ' => '_', 'ς' => '_', 'Σ' => '_', 'τ' => '_', 'Τ' => '_', 'υ' => '_',
8623                'Υ' => '_', 'φ' => '_', 'Φ' => '_', 'χ' => '_', 'Χ' => '_', 'ψ' => '_',
8624                'Ψ' => '_', 'ω' => '_', 'Ω' => '_', ',' => '_', ' ' => '_'
8625            );
8626    
8627            return str_replace(array_keys($invalid), array_values($invalid), $documentLibelle);
8628        }
8629    
8630        /**
8631       * Surcharge permettant de ne pas afficher le fil d'Ariane dans       * Surcharge permettant de ne pas afficher le fil d'Ariane dans
8632       * l'overlay de notification des demandeurs.       * l'overlay de notification des demandeurs.
8633       */       */

Legend:
Removed from v.10869  
changed lines
  Added in v.11418

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26