From 463cc122eb508ef9a224c121b78ced5bf6bc4ab1 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 9 Nov 2005 16:10:55 +0000 Subject: [PATCH] Nouvelle presnetation --- htdocs/telephonie/ligne/listecommande.php | 25 +++++++++-------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/htdocs/telephonie/ligne/listecommande.php b/htdocs/telephonie/ligne/listecommande.php index 403c63e4697..eba472227c2 100644 --- a/htdocs/telephonie/ligne/listecommande.php +++ b/htdocs/telephonie/ligne/listecommande.php @@ -47,7 +47,7 @@ if ($sortorder == "") { $sortorder="ASC"; } if ($sortfield == "") { - $sortfield="l.date_commande"; + $sortfield="l.date_commande_last"; } /* @@ -69,8 +69,9 @@ $pagenext = $page + 1; * */ -$sql = "SELECT s.idp as socidp, l.date_commande, s.nom, l.ligne, f.nom as fournisseur, l.statut, l.rowid, l.remise"; -$sql .= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."telephonie_societe_ligne as l"; +$sql = "SELECT s.idp as socidp, l.date_commande_last, s.nom, l.ligne, f.nom as fournisseur, l.statut, l.rowid, l.remise"; +$sql .= " FROM ".MAIN_DB_PREFIX."societe as s"; +$sql .= " ,".MAIN_DB_PREFIX."telephonie_societe_ligne as l"; $sql .= " , ".MAIN_DB_PREFIX."telephonie_fournisseur as f"; $sql .= " WHERE l.statut = 2 AND l.fk_soc = s.idp AND l.fk_fournisseur = f.rowid"; @@ -90,10 +91,10 @@ if ($_GET["search_client"]) $sql .= " ORDER BY $sortfield $sortorder " . $db->plimit($conf->liste_limit+1, $offset); -$result = $db->query($sql); -if ($result) +$resql = $db->query($sql); +if ($resql) { - $num = $db->num_rows(); + $num = $db->num_rows($resql); $i = 0; print_barre_liste("Lignes", $page, "listecommande.php", "", $sortfield, $sortorder, '', $num); @@ -101,13 +102,9 @@ if ($result) print ''; print ''; print_liste_field_titre("Ligne","listecommande.php","l.ligne"); - print_liste_field_titre("Client (Agence/Filiale)","listecommande.php","s.nom"); - print ''; - - print_liste_field_titre("Remise LMN","listecommande.php","l.remise",'','',' align="center"'); - + print ''; print ''; print "\n"; @@ -120,7 +117,6 @@ if ($result) print ''; print ''; - print ''; print ''; @@ -131,7 +127,7 @@ if ($result) while ($i < min($num,$conf->liste_limit)) { - $obj = $db->fetch_object(); + $obj = $db->fetch_object($resql); $var=!$var; print "\n"; print ''; - print '\n"; + print '\n"; - print '\n"; print "\n"; print "\n"; $i++;
StatutDateFournisseur
  
"; @@ -145,9 +141,8 @@ if ($result) print ''.dolibarr_print_phone($obj->ligne)."'.$obj->nom.''.$obj->date_commande."'.$obj->date_commande_last."'.$obj->remise." %".$obj->fournisseur."