[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/telephonie/stats/commerciaux/ -> commercial.po.class.php (source)

   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: commercial.po.class.php,v 1.1 2005/09/14 11:03:31 rodolphe Exp $
  19   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/stats/commerciaux/commercial.po.class.php,v $
  20   *
  21   */
  22  
  23  require_once (DOL_DOCUMENT_ROOT."/telephonie/stats/graph/bar.class.php");
  24  
  25  class GraphCommercialPO extends GraphBar {
  26  
  27    Function GraphCommercialPO($DB, $file)
  28    {
  29      $this->db = $DB;
  30      $this->file = $file;
  31  
  32      $this->client = 0;
  33      $this->titre = "Prise d'ordre mensuelle";
  34  
  35      $this->barcolor = "green";
  36      $this->showframe = true;
  37    }
  38  
  39    Function GraphMakeGraph($xdatas)
  40    {
  41      $datas = array();
  42      $labels = array();
  43      $i = 0;
  44      foreach($xdatas as $key => $value)
  45        {
  46      if ($i > 1 && ((substr($key, -2) - $labels[$i-1]) > 1) )
  47        {
  48          $datas[$i] = 0;
  49          $labels[$i] = substr("00".($labels[$i-1] + 1), -2);
  50          $i++;
  51        }
  52      $datas[$i] = $value;
  53      $labels[$i] = substr($key, -2);
  54      $i++;
  55        }
  56      
  57      /* Mise en forme de la légende */
  58  
  59      if (sizeof($datas))
  60        {
  61      $this->GraphDraw($this->file, $datas, $labels);
  62        }
  63    }
  64  }   
  65  
  66  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics