[ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?PHP 2 /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 * 18 * $Id: ratiofourn.php,v 1.2 2005/09/02 11:30:37 rodolphe Exp $ 19 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/ca/ratiofourn.php,v $ 20 * 21 */ 22 require ("./pre.inc.php"); 23 24 /* 25 * Sécurité accés client 26 */ 27 28 if (!$user->rights->telephonie->ca->lire) accessforbidden(); 29 30 llxHeader('','Telephonie - Ratio fournisseur'); 31 32 /* 33 * 34 * 35 * 36 */ 37 print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; 38 39 print '<tr><td width="50%" valign="top">'; 40 41 $page = $_GET["page"]; 42 $offset = $conf->liste_limit * $page ; 43 44 $sql = "SELECT s.nom, af.mois, af.achat, af.vente"; 45 $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_analyse_fournisseur as af"; 46 47 $sql .= " , " .MAIN_DB_PREFIX."telephonie_fournisseur as s"; 48 $sql .= " WHERE s.rowid = af.fk_fournisseur"; 49 $sql .= " ORDER BY mois DESC " . $db->plimit($conf->liste_limit+1, $offset); 50 51 $resql = $db->query($sql); 52 53 if ($resql) 54 { 55 $num = $db->num_rows($resql); 56 $i = 0; 57 58 print_barre_liste("Ratio fournisseur", $page, "ratiofourn.php", $urladd, $sortfield, $sortorder, '', $num); 59 60 print '<table class="noborder" width="100%" cellspacing="0" cellpadding="4">'; 61 print '<tr class="liste_titre"><td>Mois</td><td>Fournisseur</td><td align="right">Achat</td>'; 62 print '<td align="right">Revente</td>'; 63 print "</tr>\n"; 64 $var=True; 65 66 while ($i < min($num,$conf->liste_limit)) 67 { 68 $row = $db->fetch_row($resql); 69 $var=!$var; 70 71 print "<tr $bc[$var]>"; 72 print '<td>'.strftime ("%B %Y",mktime(12,0,0,substr($row[1],-2),1,substr($row[1],0,4)))."</td>\n"; 73 print "<td>".$row[0]."</td>\n"; 74 print '<td align="right">'.price($row[2])." HT</td>\n"; 75 print '<td align="right">'.price($row[3])." HT</td>\n"; 76 print "</tr>\n"; 77 $i++; 78 } 79 print "</table>"; 80 $db->free($resql); 81 } 82 else 83 { 84 print $db->error() . ' ' . $sql; 85 } 86 87 //print '<img src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=telephoniegraph&file=ca/gain_moyen_par_client.png" alt="Gain moyen par client"><br /><br />'; 88 89 print '</td></tr>'; 90 print '</table>'; 91 92 $db->close(); 93 94 llxFooter("<em>Dernière modification $Date: 2005/09/02 11:30:37 $ révision $Revision: 1.2 $</em>"); 95 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |