187 |
$this->valF['dossier_autorisation'] = $dossier_autorisation->valF['dossier_autorisation']; |
$this->valF['dossier_autorisation'] = $dossier_autorisation->valF['dossier_autorisation']; |
188 |
} |
} |
189 |
|
|
190 |
|
function getCodeDemandeType($demande_type){ |
191 |
|
|
192 |
|
$sql = "SELECT |
193 |
|
code |
194 |
|
FROM |
195 |
|
".DB_PREFIXE."demande_type |
196 |
|
WHERE |
197 |
|
demande_type = ".$demande_type; |
198 |
|
$codeDemandeType = $this->db->getOne($sql); |
199 |
|
$this->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
200 |
|
|
201 |
|
return $codeDemandeType; |
202 |
|
} |
203 |
|
|
204 |
/** |
/** |
205 |
* Méthode permettant d'ajouter un dossier d'instruction |
* Méthode permettant d'ajouter un dossier d'instruction |
206 |
*/ |
*/ |
236 |
$valInstr['description']=""; |
$valInstr['description']=""; |
237 |
$valInstr['dossier_autorisation']=$this->valF['dossier_autorisation']; |
$valInstr['dossier_autorisation']=$this->valF['dossier_autorisation']; |
238 |
|
|
239 |
|
/* |
240 |
|
* Gestion de la qualification |
241 |
|
* */ |
242 |
|
//Récupérer le code du type de la demande |
243 |
|
$codeDemandeType = $this->getCodeDemandeType($val['demande_type']); |
244 |
|
|
245 |
|
//Marque le dossier comme à qualifier selon le type de dossier d'instruction |
246 |
|
if ( strcasecmp($codeDemandeType, "DI") == 0 || |
247 |
|
strcasecmp($codeDemandeType, "DT") == 0 || |
248 |
|
strcasecmp($codeDemandeType, "DM") == 0 || |
249 |
|
strcasecmp($codeDemandeType, "DP") == 0 || |
250 |
|
strcasecmp($codeDemandeType, "DTP") == 0 || |
251 |
|
strcasecmp($codeDemandeType, "DACT") == 0 || |
252 |
|
strcasecmp($codeDemandeType, "DOC") == 0 ){ |
253 |
|
|
254 |
|
$valInstr['a_qualifier'] = TRUE; |
255 |
|
} |
256 |
|
|
257 |
// Récupération du cerfa pour le type d'instruction sélectionnée et valide |
// Récupération du cerfa pour le type d'instruction sélectionnée et valide |
258 |
$sql = "SELECT cerfa FROM ".DB_PREFIXE."cerfa |
$sql = "SELECT |
259 |
WHERE now()<=om_validite_fin |
dossier_instruction_type.cerfa |
260 |
AND now()>=om_validite_debut |
FROM |
261 |
AND dossier_instruction_type=".$dossier_instruction_type; |
".DB_PREFIXE."dossier_instruction_type |
262 |
|
JOIN |
263 |
|
".DB_PREFIXE."cerfa |
264 |
|
ON |
265 |
|
dossier_instruction_type.cerfa = cerfa.cerfa |
266 |
|
WHERE |
267 |
|
now()<=om_validite_fin |
268 |
|
AND now()>=om_validite_debut |
269 |
|
AND dossier_instruction_type=".$dossier_instruction_type; |
270 |
$valInstr['cerfa'] = $db->getOne($sql); |
$valInstr['cerfa'] = $db->getOne($sql); |
271 |
$this->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
$this->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
272 |
|
|