diff --git a/htdocs/telephonie/client/ca.php b/htdocs/telephonie/client/ca.php
index 519c6e75e82..dac21e568be 100644
--- a/htdocs/telephonie/client/ca.php
+++ b/htdocs/telephonie/client/ca.php
@@ -91,28 +91,31 @@ if ($_GET["id"])
print '
';
- $img_root = DOL_DATA_ROOT."/graph/telephonie/";
- $file = "client/".substr($soc->id,0,1)."/".$soc->id."/graphca.png";
+ $mesg_no_graph = 'Nous avons pas assez de données à ce jour pour générer ce graphique.';
- if (file_exists($img_root . $file))
+ $img_root = DOL_DATA_ROOT."/graph/".substr($soc->id,-1)."/telephonie/client/";
+
+ $file = $img_root.$soc->id."/graphca.png";
+
+ if (file_exists($file))
{
print ' ';
}
else
{
- print 'Nous avons pas assez de données à ce jour pour générer ce graphique.';
+ print $mesg_no_graph;
}
print ' | ';
- $file = "client/".substr($soc->id,0,1)."/".$soc->id."/graphgain.png";
- if (file_exists($img_root . $file))
+ $file = $img_root.$soc->id."/graphgain.png";
+ if (file_exists($file))
{
print ' ';
}
else
{
- print 'Nous avons pas assez de données à ce jour pour générer ce graphique.';
+ print $mesg_no_graph;
}
print ' |
';
@@ -123,26 +126,28 @@ if ($_GET["id"])
print '';
- $file = "client/".substr($soc->id,0,1)."/".$soc->id."/graphappelsdureemoyenne.png";
- if (file_exists($img_root . $file))
+ $file = $img_root.$soc->id."/graphappelsdureemoyenne.png";
+
+ if (file_exists($file))
{
print ' ';
}
else
{
- print 'Nous avons pas assez de données à ce jour pour générer ce graphique.';
+ print $mesg_no_graph;
}
print ' | ';
- $file = "client/".substr($soc->id,0,1)."/".$soc->id."/nb-comm-mensuel.png";
- if (file_exists($img_root . $file))
+ $file = $img_root.$soc->id."/nb-comm-mensuel.png";
+
+ if (file_exists($file))
{
print ' ';
}
else
{
- print 'Nous avons pas assez de données à ce jour pour générer ce graphique.';
+ print $mesg_no_graph;
}
print ' |
';
diff --git a/htdocs/telephonie/script/graph-statistiques-clients.php b/htdocs/telephonie/script/graph-statistiques-clients.php
index 4a653a11f72..d5f6b478928 100644
--- a/htdocs/telephonie/script/graph-statistiques-clients.php
+++ b/htdocs/telephonie/script/graph-statistiques-clients.php
@@ -139,12 +139,14 @@ class Process
{
//print ".";
- $file = $img_root . "client/".substr($client,0,1)."/".$client."/graphca.png";
+ $img_root = DOL_DATA_ROOT."/graph/".substr($client,-1)."/telephonie/client/";
+
+ $file = $img_root . $client."/graphca.png";
$graphca = new GraphCa($this->db, $file);
$graphca->client = $client;
$graphca->GraphDraw();
- $file = $img_root . "client/".substr($client,0,1)."/".$client."/graphgain.png";
+ $file = $img_root . $client."/graphgain.png";
$graphgain = new GraphGain ($this->db, $file);
$graphgain->client = $client;
@@ -164,14 +166,14 @@ class Process
$this->db->query($sql);
- $file = $img_root . "client/".substr($client,0,1)."/".$client."/graphappelsdureemoyenne.png";
+ $file = $img_root . $client."/graphappelsdureemoyenne.png";
$graphgain = new GraphAppelsDureeMoyenne ($this->db, $file);
$graphgain->client = $client;
$graphgain->show_console = 0 ;
$graphgain->GraphDraw();
- $file = $img_root . "client/".substr($client,0,1)."/".$client."/nb-comm-mensuel.png";
+ $file = $img_root . $client."/nb-comm-mensuel.png";
$graphx = new GraphCommNbMensuel ($this->db, $file);
$graphx->client = $client;
@@ -180,6 +182,7 @@ class Process
}
}
+
dolibarr_syslog("Fin client ".$this->ident);
}