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

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

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

revision 1.2 by rodolphe, Tue Jun 14 14:25:56 2005 UTC revision 1.3 by rodolphe, Fri Sep 2 14:08:02 2005 UTC
# Line 21  Line 21 
21   */   */
22  require("./pre.inc.php");  require("./pre.inc.php");
23    
24    if ($user->distributeur_id)
25    {
26      $_GET["id"] = $user->distributeur_id;
27    }
28    
29  $page = $_GET["page"];  $page = $_GET["page"];
30  $sortorder = $_GET["sortorder"];  $sortorder = $_GET["sortorder"];
# Line 83  if ($_GET["id"]) Line 87  if ($_GET["id"])
87     *     *
88     */     */
89        
90    $sql = "SELECT s.idp, s.nom, p.fk_contrat, p.montant";    $sql = "SELECT s.idp, s.nom, p.fk_contrat, p.montant, p.avance_duree, p.avance_pourcent";
91    $sql .= " , ".$db->pdate("p.datepo") . " as datepo";    $sql .= " , ".$db->pdate("p.datepo") . " as datepo";
92    $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat_priseordre as p";    $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat_priseordre as p";
93    $sql .= " , ".MAIN_DB_PREFIX."telephonie_contrat as c";    $sql .= " , ".MAIN_DB_PREFIX."telephonie_contrat as c";
# Line 110  if ($_GET["id"]) Line 114  if ($_GET["id"])
114                
115        print_liste_field_titre("Contrat","po.php","l.ligne");        print_liste_field_titre("Contrat","po.php","l.ligne");
116        print '<td align="center">Date</td><td align="right">Montant</td>';        print '<td align="center">Date</td><td align="right">Montant</td>';
117          print '<td align="center">Avance Durée</td><td>Avance %</td>';
118        print "</tr>\n";        print "</tr>\n";
119                
120        $var=True;        $var=True;
121                
122        while ($i < min($num,$conf->liste_limit))        while ($i < min($num,$conf->liste_limit))
123          {          {
124            $obj = $db->fetch_object($i);            $obj = $db->fetch_object($resql);
125            $var=!$var;            $var=!$var;
126                        
127            print "<tr $bc[$var]>";            print "<tr $bc[$var]>";
# Line 131  if ($_GET["id"]) Line 136  if ($_GET["id"])
136    
137            print '<td align="right">'.sprintf("%01.2f",$obj->montant)."</td>\n";            print '<td align="right">'.sprintf("%01.2f",$obj->montant)."</td>\n";
138                        
139              print '<td align="right">'.$obj->avance_duree."</td>\n";
140              print '<td align="right">'.$obj->avance_pourcent." %</td>\n";
141    
142            print "</tr>\n";            print "</tr>\n";
143            $i++;            $i++;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

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