/[dolibarr]/dolibarr/htdocs/telephonie/script/graph-statistiques-ca.php
ViewVC logotype

Diff of /dolibarr/htdocs/telephonie/script/graph-statistiques-ca.php

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

revision 1.7 by rodolphe, Thu Jun 16 15:53:55 2005 UTC revision 1.8 by rodolphe, Mon Aug 8 15:33:26 2005 UTC
# Line 1  Line 1 
1  <?PHP  <?PHP
2  /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>  /* Copyright (C) 2004-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3   *   *
4   * This program is free software; you can redistribute it and/or modify   * 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   * it under the terms of the GNU General Public License as published by
# Line 19  Line 19 
19   * $Source$   * $Source$
20   *   *
21   *   *
22   * Generation des graphiques   * Generation de graphiques
23   *   *
24   *   *
25   *   *
# Line 65  else Line 65  else
65    
66  $img_root = DOL_DATA_ROOT."/graph/telephonie/";  $img_root = DOL_DATA_ROOT."/graph/telephonie/";
67    
   
   
68  /**********************************************************************/  /**********************************************************************/
69  /*  /*
70  /* Stats sur les factures  /* Stats sur les factures
# Line 100  if ($resql) Line 98  if ($resql)
98    $gain_moyen = array();    $gain_moyen = array();
99    
100    $num = $db->num_rows($resql);    $num = $db->num_rows($resql);
101    print "$num lignes de comm a traiter\n";  
102    $i = 0;    $i = 0;
103    
104    while ($i < $num)    while ($i < $num)
# Line 150  $file = $img_root . "/factures/ca_mensue Line 148  $file = $img_root . "/factures/ca_mensue
148  $graph = new GraphBar ($db, $file);  $graph = new GraphBar ($db, $file);
149  $graph->titre = "Chiffre d'affaire par mois en euros HT";  $graph->titre = "Chiffre d'affaire par mois en euros HT";
150  $graph->width = 440;  $graph->width = 440;
 print $graph->titre."\n";  
151  $graph->GraphDraw($file, $cout_vente, $labels);  $graph->GraphDraw($file, $cout_vente, $labels);
152    
153  $file = $img_root . "/factures/facture_moyenne.png";  $file = $img_root . "/factures/facture_moyenne.png";
154  $graph = new GraphBar ($db, $file, $labels);  $graph = new GraphBar ($db, $file, $labels);
155  $graph->titre = "Facture moyenne";  $graph->titre = "Facture moyenne";
 print $graph->titre."\n";  
156  $graph->barcolor = "blue";  $graph->barcolor = "blue";
157  $graph->width = 440;  $graph->width = 440;
158  $graph->GraphDraw($file, $cout_vente_moyen, $labels);  $graph->GraphDraw($file, $cout_vente_moyen, $labels);
# Line 165  $file = $img_root . "/factures/gain_mens Line 161  $file = $img_root . "/factures/gain_mens
161  $graph = new GraphBar ($db, $file);  $graph = new GraphBar ($db, $file);
162  $graph->titre = "Gain par mois en euros HT";  $graph->titre = "Gain par mois en euros HT";
163  $graph->width = 440;  $graph->width = 440;
 print $graph->titre."\n";  
164  $graph->GraphDraw($file, $gain, $labels);  $graph->GraphDraw($file, $gain, $labels);
165    
166  $file = $img_root . "/factures/gain_moyen.png";  $file = $img_root . "/factures/gain_moyen.png";
167  $graph = new GraphBar ($db, $file);  $graph = new GraphBar ($db, $file);
168  $graph->titre = "Gain moyen par facture par mois";  $graph->titre = "Gain moyen par facture par mois";
169  $graph->width = 440;  $graph->width = 440;
 print $graph->titre."\n";  
170  $graph->barcolor = "blue";  $graph->barcolor = "blue";
171  $graph->GraphDraw($file, $gain_moyen, $labels);  $graph->GraphDraw($file, $gain_moyen, $labels);
172    
173  $file = $img_root . "/factures/nb_facture.png";  $file = $img_root . "/factures/nb_facture.png";
174  $graph = new GraphBar ($db, $file);  $graph = new GraphBar ($db, $file);
175  $graph->titre = "Nb de facture mois";  $graph->titre = "Nb de facture mois";
 print $graph->titre."\n";  
176  $graph->width = 440;  $graph->width = 440;
177  $graph->barcolor = "yellow";  $graph->barcolor = "yellow";
178  $graph->GraphDraw($file, $nb_factures, $labels);  $graph->GraphDraw($file, $nb_factures, $labels);
# Line 289  else Line 282  else
282  }  }
283    
284    
   
285  $i = 0;  $i = 0;
286  foreach ($labels as $labl)  foreach ($labels as $labl)
287  {  {
# Line 303  foreach ($labels as $labl) Line 295  foreach ($labels as $labl)
295  $file = $img_root . "/factures/ca_mensuel_preleve.png";  $file = $img_root . "/factures/ca_mensuel_preleve.png";
296  $graph = new GraphBarAccumul ($db, $file);  $graph = new GraphBarAccumul ($db, $file);
297  $graph->titre = "Chiffre d'affaire par méthode de réglement";  $graph->titre = "Chiffre d'affaire par méthode de réglement";
 print $graph->titre."\n";  
298  $graph->width = 440;  $graph->width = 440;
299  $graph->height = 360;  $graph->height = 360;
300  $graph->barcolor = "yellow";  $graph->barcolor = "yellow";
# Line 319  $graph->add_datas($xdatas); Line 310  $graph->add_datas($xdatas);
310    
311  $graph->GraphDraw($file, $labels, $cout_vente);  $graph->GraphDraw($file, $labels, $cout_vente);
312    
   
313  ?>  ?>

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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