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 |
|
|
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) { |
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 |
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 |
} |
} |