From b225effc1846de91199d8ba003e1601e902ab24a Mon Sep 17 00:00:00 2001
From: Rodolphe Quiedeville <rodolphe@quiedeville.org>
Date: Wed, 16 Mar 2005 15:31:44 +0000
Subject: [PATCH] =?UTF-8?q?Ajout=20la=20possibilit=E9=20de=20ne=20grapher?=
 =?UTF-8?q?=20qu'un=20seul=20contrat?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../stats/ProcessGraphContrats.class.php           | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/htdocs/telephonie/stats/ProcessGraphContrats.class.php b/htdocs/telephonie/stats/ProcessGraphContrats.class.php
index 583c631785f..acdf96cbf41 100644
--- a/htdocs/telephonie/stats/ProcessGraphContrats.class.php
+++ b/htdocs/telephonie/stats/ProcessGraphContrats.class.php
@@ -55,10 +55,18 @@ class ProcessGraphContrats
     $this->db = new DoliDb('','','','','',1);
   }
   
-  function go()
+  function go($contrat_id = 0)
   {
-    $min = $this->ident * $this->cpc;
-    $max = ($this->ident + 1 ) * $this->cpc;
+    if ($contrat_id = 0)
+      {
+	$min = $this->ident * $this->cpc;
+	$max = ($this->ident + 1 ) * $this->cpc;
+      }
+    else
+      {
+	$min = $contrat_id;
+	$max = $contrat_id;
+      }
 
     dolibarr_syslog("Deb contrat ".$this->ident . " ($min - $max)");
     $error = 0;
-- 
GitLab