/[openfoncier]/trunk/obj/cerfa.class.php
ViewVC logotype

Diff of /trunk/obj/cerfa.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1258 by nhaye, Thu Feb 14 12:13:41 2013 UTC revision 1262 by nhaye, Thu Feb 14 17:54:53 2013 UTC
# Line 28  class cerfa extends cerfa_gen { Line 28  class cerfa extends cerfa_gen {
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    

Legend:
Removed from v.1258  
changed lines
  Added in v.1262

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26