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

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

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

revision 3 by fraynaud, Thu Feb 10 20:46:18 2011 UTC revision 38 by fraynaud, Thu Jul 21 14:47:33 2011 UTC
# Line 5  require_once ("../gen/obj/travaux.class. Line 5  require_once ("../gen/obj/travaux.class.
5    
6  class travaux extends travaux_gen {  class travaux extends travaux_gen {
7    
8  function travaux($id,&$db,$debug) {          function travaux($id,&$db,$debug) {
9          $this->constructeur($id,$db,$debug);                  $this->constructeur($id,$db,$debug);
10  }// fin constructeur          }// fin constructeur
11            
12            function setType(&$form,$maj) {
13                    parent::setType($form,$maj);
14                    if ($maj < 2) { //ajouter et modifier
15                            $form->setType('solde', 'select');
16                    }
17            }
18            
19    
20  }// fin classe          function setTaille(&$form,$maj) {
21                    parent::setTaille($form,$maj);
22                    $form->setTaille('codelascot',1);
23            }
24    
25            function setMax(&$form,$maj) {
26                    parent::setMax($form,$maj);
27                    $form->setMax('codelascot',1);
28            }
29            
30            function setSelect(&$form, $maj,&$db,$debug) {
31                    parent::setSelect($form, $maj,&$db,$debug);    
32                    // solde
33                    $contenu=array();
34                    $contenu[0]=array('Non','Oui');
35                    $contenu[1]=array(_('Non'),_('Oui'));
36                    $form->setSelect("solde",$contenu);
37            }
38            
39            
40            function clesecondaire($id,$db,$val,$debug){
41                    parent::cleSecondaire($id,&$db,$val,$debug);
42                    // controle de cle secondaire particulier
43                    $sql = "select * from regle where id =".$id." and controle='travaux'";
44                    $res = $db->query($sql);
45                    if($debug==1) echo $sql;
46                    if (database::isError($res))
47                       die($res->getMessage(). " => Echec  ".$sql);
48                    else{
49                        $nbligne=$res->numrows();
50                        $this->msg = $this->msg."<br>"._('il_y_a')." ".$nbligne.
51                        " "._('enregistrement').' '._('table')." \"regle\" ".
52                        _('travaux')." [".
53                        $id."]<br>";
54                        if ($nbligne>0)
55                           $this->correct=false;
56                    }
57            }
58    } // fin class
59  ?>  ?>

Legend:
Removed from v.3  
changed lines
  Added in v.38

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26