[Vtigercrm-commits] [vtiger-commits] r7062 - /vtigercrm/trunk/modules/Dashboard/Entity_charts.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Jun 14 03:08:37 EDT 2006


Author: saraj
Date: Wed Jun 14 01:08:32 2006
New Revision: 7062

Log:
changes made to include extra graphs

Modified:
    vtigercrm/trunk/modules/Dashboard/Entity_charts.php

Modified: vtigercrm/trunk/modules/Dashboard/Entity_charts.php
==============================================================================
--- vtigercrm/trunk/modules/Dashboard/Entity_charts.php (original)
+++ vtigercrm/trunk/modules/Dashboard/Entity_charts.php Wed Jun 14 01:08:32 2006
@@ -202,11 +202,35 @@
 				}
 				if($graph_for =="product_id")
 				{
-					$query = "SELECT productname FROM vtiger_products WHERE productid=".$name;
+					$query = "SELECT productname FROM vtiger_products WHERE productid='".$name."'";
 					$result = $adb->query($query);
 					$name_val = $adb->query_result($result,0,"productname");
 					if($name_val!="")
-					$name=$name_val;
+						$name=$name_val;
+				}
+				if($graph_for =="purchaseorderid")
+				{
+					$query = "SELECT subject FROM purchaseorder WHERE purchaseorderid='".$name."'";
+					$result = $adb->query($query);
+					$name_val = $adb->query_result($result,0,"subject");
+					if($name_val!="")
+						$name=$name_val;
+				}
+				if($graph_for =="quoteid")
+				{
+					$query = "SELECT subject FROM quotes WHERE quoteid='".$name."'";
+					$result = $adb->query($query);
+					$name_val = $adb->query_result($result,0,"subject");
+					if($name_val!="")
+						$name=$name_val;
+				}
+				if($graph_for =="invoiceid")
+				{
+					$query = "SELECT subject FROM invoice WHERE invoiceid='".$name."'";
+					$result = $adb->query($query);
+					$name_val = $adb->query_result($result,0,"subject");
+					if($name_val!="")
+						$name=$name_val;
 				}
 				//Passing name to graph
 				if($mod_name_val!="") $mod_name_val.=",$name";





More information about the vtigercrm-commits mailing list