/[dolibarr]/dolibarr/htdocs/telephonie/lignetel.class.php
ViewVC logotype

Diff of /dolibarr/htdocs/telephonie/lignetel.class.php

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

revision 1.21 by rodolphe, Fri Jul 29 09:12:17 2005 UTC revision 1.22 by rodolphe, Tue Aug 2 08:23:37 2005 UTC
# Line 215  class LigneTel { Line 215  class LigneTel {
215    
216              $this->SetRemise($user, $this->remise, 'Remise initiale');              $this->SetRemise($user, $this->remise, 'Remise initiale');
217    
218                $this->DefineClientOption();
219    
220              return 0;              return 0;
221            }            }
222          else          else
# Line 244  class LigneTel { Line 246  class LigneTel {
246        }        }
247    }    }
248    /*    /*
249       *
250       *
251       */
252      function DefineClientOption()
253      {
254    
255        $sql = "SELECT propriete, valeur";
256        $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_societe_options";
257        $sql .= " WHERE type= 'ligne'";
258        $sql .= " AND fk_client_comm = '".$this->client_comm."'";
259    
260        $resql = $this->db->query($sql);
261        
262        if ($resql)
263          {
264            $num = $this->db->num_rows($resql);
265            $i = 0;
266    
267            while ($i < $num)
268              {
269                $obj = $this->db->fetch_object($resql);
270    
271                $sqlu = "UPDATE ".MAIN_DB_PREFIX."telephonie_societe_ligne";
272                $sqlu .= " SET ".$obj->propriete." = '".$obj->valeur."'";
273                $sqlu .= " WHERE rowid = '".$this->id."'";
274    
275                $resqlu = $this->db->query($sqlu);
276                
277                if (!$resqlu)
278                  {
279                    dolibarr_syslog("LigneTel::DefineClientOption Error");
280                    dolibarr_syslog("LigneTel::DefineClientOption $sqlu");
281                  }
282            
283    
284                $i++;
285              }
286          }
287        else
288          {
289            dolibarr_syslog("LigneTel::DefineClientOption Error");
290          }
291      }
292      /*
293     *     *
294     *     *
295     */     */

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22

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