[Vtigercrm-commits] [vtiger-commits] r9097 - /vtigercrm/trunk/modules/Potentials/Charts.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Aug 24 01:11:16 EDT 2006


Author: richie
Date: Wed Aug 23 23:11:13 2006
New Revision: 9097

Log:
changes made to fix the dashboard issue  --Minnie

Modified:
    vtigercrm/trunk/modules/Potentials/Charts.php

Modified: vtigercrm/trunk/modules/Potentials/Charts.php
==============================================================================
--- vtigercrm/trunk/modules/Potentials/Charts.php (original)
+++ vtigercrm/trunk/modules/Potentials/Charts.php Wed Aug 23 23:11:13 2006
@@ -127,7 +127,7 @@
 					}
 					if (isset($record->column_fields['amount']))	{
 						// Strip all non numbers from this string.
-						$amount = ereg_replace('[^0-9]', '', $record->column_fields['amount']);
+						$amount = ereg_replace('[^0-9]', '', floor($record->column_fields['amount']));
 						$sum[$month][$sales_stage] = $sum[$month][$sales_stage] + $amount;
 						if (isset($count[$month][$sales_stage])) {
 							$count[$month][$sales_stage]++;
@@ -261,10 +261,10 @@
 			$gbplot->setBackground(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_VERTICAL, 'white', '#E5E5E5')));
 
 			// Setup title
-			//$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total.$app_strings['LBL_THOUSANDS_SYMBOL'];
-				$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total;
-			
-			$title->setText($titleStr);
+			$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total.$app_strings['LBL_THOUSANDS_SYMBOL'];
+				//$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total;
+			
+			$title->setText($titlestr);
 
 			// Create the xaxis labels
 			$array_data =& Image_Graph::factory('Image_Graph_DataPreprocessor_Array', 
@@ -323,7 +323,7 @@
 			$marker->setFontSize(8);
 			$gbplot->setMarker($marker);
 
-			//$subtitle .= $current_module_strings['LBL_OPP_SIZE'].$curr_symbol.$current_module_strings['LBL_OPP_SIZE_VALUE'];
+			$subtitle .= $current_module_strings['LBL_OPP_SIZE'].$curr_symbol.$current_module_strings['LBL_OPP_SIZE_VALUE'];
 			$footer->setText($subtitle);
 			$footer->setAlignment(IMAGE_GRAPH_ALIGN_TOP_RIGHT);
 
@@ -471,7 +471,7 @@
 					}
 					if (isset($record->column_fields['amount']))	{
 						// Strip all non numbers from this string.
-						$amount = ereg_replace('[^0-9]', '', $record->column_fields['amount']);
+						$amount = ereg_replace('[^0-9]', '', floor($record->column_fields['amount']));
 						$sum[$lead_source][$sales_stage] = $sum[$lead_source][$sales_stage] + $amount;
 						if (isset($count[$lead_source][$sales_stage])) {
 							$count[$lead_source][$sales_stage]++;
@@ -602,8 +602,8 @@
 			$gbplot->setBackground(Image_Graph::factory('gradient', array(IMAGE_GRAPH_GRAD_HORIZONTAL, 'white', '#E5E5E5')));
 
 			// Setup title
-			//$titlestr = $current_module_strings['LBL_ALL_OPPORTUNITIES'].$curr_symbol.$total.$app_strings['LBL_THOUSANDS_SYMBOL'];
-			$titlestr = $current_module_strings['LBL_ALL_OPPORTUNITIES'].$curr_symbol.$total;
+			$titlestr = $current_module_strings['LBL_ALL_OPPORTUNITIES'].$curr_symbol.$total.$app_strings['LBL_THOUSANDS_SYMBOL'];
+			//$titlestr = $current_module_strings['LBL_ALL_OPPORTUNITIES'].$curr_symbol.$total;
 			$title->setText($titlestr);
 
 			// Create the xaxis labels
@@ -655,7 +655,7 @@
 			$gbplot->setMarker($marker);
 
 			// Finally setup the title
-			//$subtitle = $current_module_strings['LBL_OPP_SIZE'].$curr_symbol.$current_module_strings['LBL_OPP_SIZE_VALUE']; 
+			$subtitle = $current_module_strings['LBL_OPP_SIZE'].$curr_symbol.$current_module_strings['LBL_OPP_SIZE_VALUE']; 
 			$footer->setText($subtitle);
 			$footer->setAlignment(IMAGE_GRAPH_ALIGN_TOP_RIGHT);
 
@@ -793,7 +793,7 @@
 					}
 					if (isset($record->column_fields['amount']))	{
 						// Strip all non numbers from this string.
-						$amount = ereg_replace('[^0-9]', '', $record->column_fields['amount']);
+						$amount = ereg_replace('[^0-9]', '', floor($record->column_fields['amount']));
 						$sum[$record->column_fields['sales_stage']][$record->column_fields['assigned_user_id']] = $sum[$record->column_fields['sales_stage']][$record->column_fields['assigned_user_id']] + $amount;
 						if (isset($count[$record->column_fields['sales_stage']][$record->column_fields['assigned_user_id']])) {
 							$count[$record->column_fields['sales_stage']][$record->column_fields['assigned_user_id']]++;
@@ -915,8 +915,8 @@
 			$font->setColor($font_color);
 
 			// Setup title
-			//$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total.$app_strings['LBL_THOUSANDS_SYMBOL'];
-			$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total;
+			$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total.$app_strings['LBL_THOUSANDS_SYMBOL'];
+			//$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total;
 			$title->setText($titlestr);
 
 			// Create the xaxis labels
@@ -972,7 +972,7 @@
 
 			// Finally setup the title
 
-			//$subtitle .= $current_module_strings['LBL_OPP_SIZE'].$curr_symbol.$current_module_strings['LBL_OPP_SIZE_VALUE']; 
+			$subtitle .= $current_module_strings['LBL_OPP_SIZE'].$curr_symbol.$current_module_strings['LBL_OPP_SIZE_VALUE']; 
 			$footer->setText($subtitle);
 			$footer->setAlignment(IMAGE_GRAPH_ALIGN_TOP_RIGHT);
 
@@ -1069,7 +1069,7 @@
 					if (!isset($sum[$record->column_fields['leadsource']])) $sum[$record->column_fields['leadsource']] = 0;
 					if (isset($record->column_fields['amount']) && isset($record->column_fields['leadsource']))	{
 						// Strip all non numbers from this string.
-						$amount = ereg_replace('[^0-9]', '', $record->column_fields['amount']);
+						$amount = ereg_replace('[^0-9]', '', floor($record->column_fields['amount']));
 						$sum[$record->column_fields['leadsource']] = $sum[$record->column_fields['leadsource']] + ($amount/1000);
 						if (isset($count[$record->column_fields['leadsource']])) $count[$record->column_fields['leadsource']]++;
 						else $count[$record->column_fields['leadsource']] = 1;
@@ -1174,10 +1174,10 @@
 			$gbplot->setFillStyle($fills);
 
 			// Setup title
-//			$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total.$app_strings['LBL_THOUSANDS_SYMBOL'];
-	$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total;
-
-$title->setText($titlestr);
+			$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total.$app_strings['LBL_THOUSANDS_SYMBOL'];
+			//$titlestr = $current_module_strings['LBL_TOTAL_PIPELINE'].$curr_symbol.$total;
+
+			$title->setText($titlestr);
 
 			// format the data values
 			$valueproc =& Image_Graph::factory('Image_Graph_DataPreprocessor_Formatted', $curr_symbol."%d");
@@ -1198,7 +1198,7 @@
 			$legend_box->setFillColor('#F5F5F5');
 			$legend_box->showShadow();
 
-			//$subtitle = $current_module_strings['LBL_OPP_SIZE'].$curr_symbol.$current_module_strings['LBL_OPP_SIZE_VALUE'];
+			$subtitle = $current_module_strings['LBL_OPP_SIZE'].$curr_symbol.$current_module_strings['LBL_OPP_SIZE_VALUE'];
 			$footer->setText($subtitle);
 			$footer->setAlignment(IMAGE_GRAPH_ALIGN_TOP_LEFT);
 





More information about the vtigercrm-commits mailing list