344 |
// FROM |
// FROM |
345 |
$query_ct_from = " |
$query_ct_from = " |
346 |
".DB_PREFIXE."dossier |
".DB_PREFIXE."dossier |
347 |
|
LEFT JOIN ".DB_PREFIXE."etat |
348 |
|
ON dossier.etat = etat.etat |
349 |
LEFT JOIN ".DB_PREFIXE."lien_dossier_demandeur |
LEFT JOIN ".DB_PREFIXE."lien_dossier_demandeur |
350 |
ON dossier.dossier = lien_dossier_demandeur.dossier AND lien_dossier_demandeur.petitionnaire_principal IS TRUE |
ON dossier.dossier = lien_dossier_demandeur.dossier AND lien_dossier_demandeur.petitionnaire_principal IS TRUE |
351 |
LEFT JOIN ".DB_PREFIXE."demandeur |
LEFT JOIN ".DB_PREFIXE."demandeur |
375 |
AND date_limite_incompletude <= CURRENT_TIMESTAMP + ".$nombre_de_jours." * interval '1 day' |
AND date_limite_incompletude <= CURRENT_TIMESTAMP + ".$nombre_de_jours." * interval '1 day' |
376 |
) |
) |
377 |
) |
) |
378 |
|
AND etat.statut != 'cloture' |
379 |
AND dossier.avis_decision IS NULL |
AND dossier.avis_decision IS NULL |
380 |
AND LOWER(dossier.accord_tacite) = 'oui' |
AND LOWER(dossier.accord_tacite) = 'oui' |
381 |
"; |
"; |