28 |
} |
} |
29 |
} |
} |
30 |
|
|
31 |
|
function verifier($val, &$db, $DEBUG) { |
32 |
|
parent::verifier($val, $db, $DEBUG); |
33 |
|
// Vérification que les dates de validités de cerfa ne se chevauchent pas |
34 |
|
$sql = "SELECT count(*) FROM ".DB_PREFIXE."cerfa |
35 |
|
WHERE dossier_instruction_type=".$this->valF['dossier_instruction_type']. |
36 |
|
" AND om_validite_fin >= '".$this->valF['om_validite_debut']."'". |
37 |
|
" AND om_validite_debut <= '".$this->valF['om_validite_fin']."'". |
38 |
|
" AND cerfa != '".$this->valF['cerfa']."'"; |
39 |
|
$count = $db->getOne($sql); |
40 |
|
$this->addToLog("db->getone(\"".$sql."\");", VERBOSE_MODE); |
41 |
|
$this->f->isDatabaseError($count); |
42 |
|
if($count>0) { |
43 |
|
$this->correct=false; |
44 |
|
$this->addToMessage(_("Un cerfa pour ce type de dossier d'instruction |
45 |
|
et sur l'interval de dates selectionnees existe deja.")); |
46 |
|
} |
47 |
|
} |
48 |
|
|
49 |
function setSelect(&$form, $maj,&$db,$debug) { |
function setSelect(&$form, $maj,&$db,$debug) { |
50 |
parent::setSelect($form, $maj,$db,$debug); |
parent::setSelect($form, $maj,$db,$debug); |
51 |
|
|