/[dolibarr]/dolibarr/htdocs/telephonie/stats/commerciaux/commerciaux.po.class.php
ViewVC logotype

Diff of /dolibarr/htdocs/telephonie/stats/commerciaux/commerciaux.po.class.php

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

revision 1.1 by rodolphe, Wed Nov 23 22:54:07 2005 UTC revision 1.2 by rodolphe, Wed Nov 23 22:56:54 2005 UTC
# Line 61  class GraphCommerciauxPO  { Line 61  class GraphCommerciauxPO  {
61              $comm_names[$row[0]]= $row[1];//." ".$row[2];              $comm_names[$row[0]]= $row[1];//." ".$row[2];
62            }            }
63        }        }
64            $datetime = time();
65      foreach ($this->commerciaux as $commercial)      foreach ($this->commerciaux as $commercial)
66        {        {
67          $datas = array();          $datas = array();
# Line 69  class GraphCommerciauxPO  { Line 69  class GraphCommerciauxPO  {
69          $sql = "SELECT date_format(datepo, '%m'), sum(montant)";          $sql = "SELECT date_format(datepo, '%m'), sum(montant)";
70          $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat_priseordre as p";          $sql .= " FROM ".MAIN_DB_PREFIX."telephonie_contrat_priseordre as p";
71          $sql .= " WHERE p.fk_commercial = ".$commercial;          $sql .= " WHERE p.fk_commercial = ".$commercial;
72            $sql .= " AND date_format(datepo, '%Y') = '".strftime('%Y',$datetime)."'";
73          $sql .= " GROUP BY date_format(datepo, '%Y%m')";          $sql .= " GROUP BY date_format(datepo, '%Y%m')";
74          $resql = $this->db->query($sql);          $resql = $this->db->query($sql);
75                    

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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