/[dolibarr]/dolibarr/htdocs/telephonie/distributeurs/commissions.php
ViewVC logotype

Diff of /dolibarr/htdocs/telephonie/distributeurs/commissions.php

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

revision 1.10 by rodolphe, Tue Sep 13 13:28:25 2005 UTC revision 1.11 by rodolphe, Tue Sep 13 13:36:53 2005 UTC
# Line 50  if ($_GET["id"]) Line 50  if ($_GET["id"])
50    $h++;    $h++;
51    
52    $head[$h][0] = DOL_URL_ROOT.'/telephonie/distributeurs/commissions.php?id='.$distri->id;    $head[$h][0] = DOL_URL_ROOT.'/telephonie/distributeurs/commissions.php?id='.$distri->id;
53    $head[$h][1] = "Commissions";    $head[$h][1] = "Rémunérations";
54    $hselected = $h;    $hselected = $h;
55    $h++;    $h++;
56    
# Line 113  if ($_GET["id"]) Line 113  if ($_GET["id"])
113    $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_commission as c";      $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_commission as c";  
114    $sql .= " WHERE c.fk_distributeur = ".$_GET["id"];    $sql .= " WHERE c.fk_distributeur = ".$_GET["id"];
115    $sql .= " ORDER BY c.date DESC";    $sql .= " ORDER BY c.date DESC";
   
116    $resql = $db->query($sql);    $resql = $db->query($sql);
117        
118    if ($resql)    if ($resql)
# Line 121  if ($_GET["id"]) Line 120  if ($_GET["id"])
120        $num = $db->num_rows($resql);        $num = $db->num_rows($resql);
121        $i = 0;        $i = 0;
122                
123        while ($i < $num)        while ($row = $db->fetch_row($resql))
124          {          {
           $row = $db->fetch_row($resql);          
125            $commissions[$row[0]] = $row[1];                    $commissions[$row[0]] = $row[1];        
126            $comm_total += $row[1];            $comm_total += $row[1];
           $i++;  
127          }          }
128        $db->free($resql);        $db->free($resql);
129      }      }
# Line 135  if ($_GET["id"]) Line 132  if ($_GET["id"])
132        print $db->error() . ' ' . $sql;        print $db->error() . ' ' . $sql;
133      }      }
134    
   
   
135    print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';    print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
   
136    print '<tr><td width="50%" valign="top">';    print '<tr><td width="50%" valign="top">';
137          
     
138    print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';    print '<table class="border" width="100%" cellspacing="0" cellpadding="4">';
139    print '<tr class="liste_titre">';    print '<tr class="liste_titre">';
140    print '<td>Date</td><td align="right">Versé</td><td align="right">Consos</td><td align="right">Solde</td></tr>';    print '<td>Date</td><td align="right">Rémunération</td>';
141      print '</tr>';
142    $var=1;    $var=1;
143    print '<tr class="liste_titre">';    print '<tr class="liste_titre">';
144    print '<td>Total</td><td align="right">'.price($comm_total).' HT</td><td align="right">'.price($conso_total).' HT</td><td align="right">'.price($conso_total - $comm_total).' HT</td></tr>';    print '<td>Total</td><td align="right">'.price($comm_total).' HT</td></tr>';
145    
146    $sql = "SELECT c.date, c.montant";    $sql = "SELECT c.date, c.montant";
147    $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_commission as c";    $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_commission as c";
# Line 173  if ($_GET["id"]) Line 167  if ($_GET["id"])
167                        
168            print '<td>'.substr($row[0], -2).'/'.substr($row[0],0,4).'</td>';            print '<td>'.substr($row[0], -2).'/'.substr($row[0],0,4).'</td>';
169            print '<td align="right">'.price($row[1]).' HT</td>';            print '<td align="right">'.price($row[1]).' HT</td>';
170              /*
171            print '<td align="right">'.price($consos[$row[0]]).' HT</td>';            print '<td align="right">'.price($consos[$row[0]]).' HT</td>';
172            print '<td align="right">'.price($consos[$row[0]] - $row[1]).' HT</td>';            print '<td align="right">'.price($consos[$row[0]] - $row[1]).' HT</td>';
173              */
174                        
175            $i++;            $i++;
176          }          }

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

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