/[dolibarr]/dolibarr/htdocs/contrat/contrat.class.php
ViewVC logotype

Diff of /dolibarr/htdocs/contrat/contrat.class.php

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

revision 1.49 by eldy, Sat Sep 17 17:43:54 2005 UTC revision 1.50 by eldy, Sat Sep 24 01:10:17 2005 UTC
# Line 939  class Contrat Line 939  class Contrat
939    
940          if ($fk_socpeople <= 0) return -1;          if ($fk_socpeople <= 0) return -1;
941    
942          // \todo si type_contact = texte, aller chercher code dans table llx_c_type_contact          // Si type_contact = texte, aller chercher code dans table llx_c_type_contact
943          if ($type_contact == 'SALESREPSIGN') $type_contact=11;          if ($type_contact == 'SALESREPSIGN' || $type_contact == 'SALESREPFOLL')
944          if ($type_contact == 'SALESREPFOLL') $type_contact=12;          {
945                $sql.="SELECT rowid from ".MAIN_DB_PREFIX."c_type_contact";
946                $sql.=" WHERE element='contrat' AND source='internal'";
947                $sql.=" AND code='".$type_contact."'";
948                if ( $this->db->query($sql) )
949                {
950                    $obj = $this->db->fetch_object($resql);  
951                    if ($obj) $type_contact=$obj->rowid;
952                }
953                else
954                {
955                    dolibarr_print_error($this->db);
956                    $this->error=$this->db->error()." - $sql";
957                    return -2;  
958                }
959            }
960            
961            // Verifie type_contact
962            if (! $type_contact)
963            {
964                $this->error="Valeur pour type_contact incorrect";
965                return -3;  
966            }
967                    
968          $datecreate = time();          $datecreate = time();
969                    

Legend:
Removed from v.1.49  
changed lines
  Added in v.1.50

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