/[dolibarr]/dolibarr/htdocs/expedition/mods/methode_expedition.modules.php
ViewVC logotype

Diff of /dolibarr/htdocs/expedition/mods/methode_expedition.modules.php

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

revision 1.2 by eldy, Sun Jul 10 15:46:19 2005 UTC revision 1.3 by rodolphe, Sun Jul 31 08:57:35 2005 UTC
# Line 31  Class methode_expedition Line 31  Class methode_expedition
31        $this->description = "ERREUR DANS LA DEFINITION DU MODULE.";        $this->description = "ERREUR DANS LA DEFINITION DU MODULE.";
32      }      }
33    
34      Function Active()
35        {
36          // Mise a jour du statut
37          $sql = "UPDATE ".MAIN_DB_PREFIX."expedition_methode set statut= 1 ";
38          $sql.= " WHERE rowid = ".$this->id;
39          
40          $resql = $this->db->query($sql);
41          
42          if ($resql)
43            {
44              $af = $this->db->affected_rows($resql);
45              
46              if ($af == 0)
47                {
48                  // On créé la méthode dans la base
49                  
50                  $sql = "INSERT INTO ".MAIN_DB_PREFIX."expedition_methode";
51                  $sql .= " (rowid, statut, code, libelle, description)";
52                  $sql .= " VALUES (".$this->id.",1,'$this->code','$this->name','$this->description')";
53    
54                  $resql = $this->db->query($sql);
55    
56                  if (! $resql)
57                    {
58                      dolibarr_syslog("methode_expedition::Active Erreur 2");
59                    }
60                }
61            }      
62          else
63            {
64              dolibarr_syslog("methode_expedition::Active Erreur 1");
65            }
66        }
67    
68    Function write_pdf_file($id)    Function write_pdf_file($id)
69      {      {
70        global $user;        global $user;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26