From cc444251e126f9944e9b56288b27616dd2d81049 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Thu, 10 Mar 2005 10:11:03 +0000 Subject: [PATCH] Ajoute les infos de fourn et fichier_cdr sur les communications --- .../telephonie/script/facturation-calcul.php | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/htdocs/telephonie/script/facturation-calcul.php b/htdocs/telephonie/script/facturation-calcul.php index e48a33a1675..fe438c5a643 100644 --- a/htdocs/telephonie/script/facturation-calcul.php +++ b/htdocs/telephonie/script/facturation-calcul.php @@ -74,6 +74,10 @@ if ( $db->query($sql) ) dolibarr_syslog("Communications à traiter ".$row[0]); $db->free(); } +else +{ + $error++; +} /** * @@ -289,6 +293,7 @@ function calcul($client, $db, &$total_cout_achat, &$total_cout_vente, &$total_co $comms = array(); $sql = "SELECT t.idx, t.ligne, t.montant, t.duree, t.num, t.date, t.heure, t.dest"; + $sql .= " , t.fichier, t.fk_fournisseur"; $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_import_cdr as t"; $sql .= " WHERE t.ligne = ".$client; @@ -303,14 +308,16 @@ function calcul($client, $db, &$total_cout_achat, &$total_cout_vente, &$total_co $comm = new CommunicationTelephonique(); - $comm->index = $objp->idx; - $comm->ligne = $objp->ligne; - $comm->date = $objp->date; - $comm->heure = $objp->heure; - $comm->duree = $objp->duree; - $comm->dest = $objp->dest; - $comm->numero = $objp->num; - $comm->montant = $objp->montant; + $comm->index = $objp->idx; + $comm->ligne = $objp->ligne; + $comm->date = $objp->date; + $comm->heure = $objp->heure; + $comm->duree = $objp->duree; + $comm->dest = $objp->dest; + $comm->numero = $objp->num; + $comm->montant = $objp->montant; + $comm->fichier_cdr = $objp->fichier; + $comm->fournisseur = $objp->fk_fournisseur; $comms[$i] = $comm;