/[dolibarr]/dolibarr/htdocs/telephonie/script/facturation-calcul.php
ViewVC logotype

Diff of /dolibarr/htdocs/telephonie/script/facturation-calcul.php

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

revision 1.14 by rodolphe, Tue Jul 26 14:32:29 2005 UTC revision 1.15 by rodolphe, Fri Jul 29 12:30:40 2005 UTC
# Line 496  function calcul($db, $ligne, $facture_id Line 496  function calcul($db, $ligne, $facture_id
496    $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_import_cdr as t";    $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_import_cdr as t";
497    $sql .= " WHERE t.fk_ligne = ".$ligne->id;    $sql .= " WHERE t.fk_ligne = ".$ligne->id;
498            
499    if ( $db->query($sql) )    $resql = $db->query($sql);
500    
501      if ($resql)
502      {      {
503        $num_sql = $db->num_rows();        $num_sql = $db->num_rows($resql);
504        $i = 0;        $i = 0;
505                
506        while ($i < $num_sql && $error == 0)        while ($i < $num_sql && $error == 0)
507          {          {
508            $objp = $db->fetch_object($i);            $objp = $db->fetch_object($resql);
509    
510            $comm = new CommunicationTelephonique();            $comm = new CommunicationTelephonique();
511    
512            $comm->index       = $objp->idx;            $comm->index       = $objp->idx;
513            $comm->fk_ligne    = $facture_id;            $comm->fk_ligne    = $objp->fk_ligne;
514            $comm->ligne       = $objp->ligne;            $comm->ligne       = $objp->ligne;
515            $comm->date        = $objp->date;            $comm->date        = $objp->date;
516            $comm->heure       = $objp->heure;            $comm->heure       = $objp->heure;
# Line 525  function calcul($db, $ligne, $facture_id Line 527  function calcul($db, $ligne, $facture_id
527            $i++;            $i++;
528          }          }
529    
530        $db->free();        $db->free($resql);
531      }      }
532    else    else
533      {      {

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

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