/[dolibarr]/dolibarr/htdocs/telephonie/ligne/listecommande.php
ViewVC logotype

Diff of /dolibarr/htdocs/telephonie/ligne/listecommande.php

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

revision 1.4 by rodolphe, Wed Mar 23 09:23:00 2005 UTC revision 1.5 by rodolphe, Wed Nov 9 16:10:55 2005 UTC
# Line 47  if ($sortorder == "") { Line 47  if ($sortorder == "") {
47    $sortorder="ASC";    $sortorder="ASC";
48  }  }
49  if ($sortfield == "") {  if ($sortfield == "") {
50    $sortfield="l.date_commande";    $sortfield="l.date_commande_last";
51  }  }
52    
53  /*  /*
# Line 69  $pagenext = $page + 1; Line 69  $pagenext = $page + 1;
69   *   *
70   */   */
71    
72  $sql = "SELECT s.idp as socidp, l.date_commande, s.nom, l.ligne, f.nom as fournisseur, l.statut, l.rowid, l.remise";  $sql = "SELECT s.idp as socidp, l.date_commande_last, s.nom, l.ligne, f.nom as fournisseur, l.statut, l.rowid, l.remise";
73  $sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."telephonie_societe_ligne as l";  $sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
74    $sql .= " ,".MAIN_DB_PREFIX."telephonie_societe_ligne as l";
75  $sql .= " , ".MAIN_DB_PREFIX."telephonie_fournisseur as f";  $sql .= " , ".MAIN_DB_PREFIX."telephonie_fournisseur as f";
76  $sql .= " WHERE l.statut = 2 AND l.fk_soc = s.idp AND l.fk_fournisseur = f.rowid";  $sql .= " WHERE l.statut = 2 AND l.fk_soc = s.idp AND l.fk_fournisseur = f.rowid";
77    
# Line 90  if ($_GET["search_client"]) Line 91  if ($_GET["search_client"])
91    
92  $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);  $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset);
93    
94  $result = $db->query($sql);  $resql = $db->query($sql);
95  if ($result)  if ($resql)
96  {  {
97    $num = $db->num_rows();    $num = $db->num_rows($resql);
98    $i = 0;    $i = 0;
99        
100    print_barre_liste("Lignes", $page, "listecommande.php", "", $sortfield, $sortorder, '', $num);    print_barre_liste("Lignes", $page, "listecommande.php", "", $sortfield, $sortorder, '', $num);
# Line 101  if ($result) Line 102  if ($result)
102    print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';    print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">';
103    print '<tr class="liste_titre">';    print '<tr class="liste_titre">';
104    print_liste_field_titre("Ligne","listecommande.php","l.ligne");    print_liste_field_titre("Ligne","listecommande.php","l.ligne");
   
105    print_liste_field_titre("Client (Agence/Filiale)","listecommande.php","s.nom");    print_liste_field_titre("Client (Agence/Filiale)","listecommande.php","s.nom");
106    
107    print '<td align="center">Statut</td>';    print '<td align="center">Date</td>';
   
   print_liste_field_titre("Remise LMN","listecommande.php","l.remise",'','',' align="center"');  
   
108    print '<td>Fournisseur</td>';    print '<td>Fournisseur</td>';
109    
110    print "</tr>\n";    print "</tr>\n";
# Line 120  if ($result) Line 117  if ($result)
117    
118    print '<td>&nbsp;</td>';    print '<td>&nbsp;</td>';
119    print '<td>&nbsp;</td>';    print '<td>&nbsp;</td>';
   
120    print '</form>';    print '</form>';
121    print '</tr>';    print '</tr>';
122    
# Line 131  if ($result) Line 127  if ($result)
127    
128    while ($i < min($num,$conf->liste_limit))    while ($i < min($num,$conf->liste_limit))
129      {      {
130        $obj = $db->fetch_object();              $obj = $db->fetch_object($resql);
131        $var=!$var;        $var=!$var;
132    
133        print "<tr $bc[$var]><td>";        print "<tr $bc[$var]><td>";
# Line 145  if ($result) Line 141  if ($result)
141    
142        print '<a href="fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne)."</a></td>\n";        print '<a href="fiche.php?id='.$obj->rowid.'">'.dolibarr_print_phone($obj->ligne)."</a></td>\n";
143        print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->socidp.'">'.$obj->nom.'</a></td>';        print '<td><a href="'.DOL_URL_ROOT.'/soc.php?socid='.$obj->socidp.'">'.$obj->nom.'</a></td>';
144        print '<td align="center">'.$obj->date_commande."</td>\n";        print '<td align="center">'.$obj->date_commande_last."</td>\n";
145    
       print '<td align="center">'.$obj->remise." %</td>\n";  
146        print "<td>".$obj->fournisseur."</td>\n";        print "<td>".$obj->fournisseur."</td>\n";
147        print "</tr>\n";        print "</tr>\n";
148        $i++;        $i++;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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