[Vtigercrm-commits] [vtiger-commits] r9929 - /vtigercrm/branches/5.0.3/modules/Reports/ReportRun.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Nov 30 05:58:22 EST 2006
Author: richie
Date: Thu Nov 30 03:58:16 2006
New Revision: 9929
Log:
Status missing in activity report - fixed
Modified:
vtigercrm/branches/5.0.3/modules/Reports/ReportRun.php
Modified: vtigercrm/branches/5.0.3/modules/Reports/ReportRun.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Reports/ReportRun.php (original)
+++ vtigercrm/branches/5.0.3/modules/Reports/ReportRun.php Thu Nov 30 03:58:16 2006
@@ -86,7 +86,7 @@
$querycolumns = $this->getEscapedColumns($selectedfields);
- if(sizeof($permitted_fields) != 0 && !in_array($fieldname,$permitted_fields))
+ if(sizeof($permitted_fields) != 0 && !in_array($colname,$permitted_fields))
{
continue;
}
@@ -94,7 +94,14 @@
{
if($querycolumns == "")
{
- $columnslist[$fieldcolname] = $selectedfields[0].".".$selectedfields[1].' AS "'.$selectedfields[2].'"';
+ if($selectedfields[0] == 'vtiger_activity' && $selectedfields[1] == 'status')
+ {
+ $columnslist[$fieldcolname] = " case when (vtiger_activity.status not like '') then vtiger_activity.status else vtiger_activity.eventstatus end as Calendar_Status";
+ }
+ else
+ {
+ $columnslist[$fieldcolname] = $selectedfields[0].".".$selectedfields[1].' AS "'.$selectedfields[2].'"';
+ }
}
else
{
@@ -1315,7 +1322,6 @@
{
$selectlist = $columnlist;
}
-
//columns list
if(isset($selectlist))
{
@@ -1356,7 +1362,6 @@
}
$reportquery = $this->getReportsQuery($this->primarymodule);
-
if($type == 'COLUMNSTOTOTAL')
{
if(trim($groupsquery) != "")
@@ -1408,6 +1413,7 @@
{
$sSQL = $this->sGetSQLforReport($this->reportid,$filterlist);
$result = $adb->query($sSQL);
+
if($result)
{
$y=$adb->num_fields($result);
@@ -1628,9 +1634,9 @@
{
$sSQL = $this->sGetSQLforReport($this->reportid,$filterlist);
$result = $adb->query($sSQL);
+
if($result)
{
-
$y=$adb->num_fields($result);
for ($x=0; $x<$y; $x++)
{
@@ -1639,7 +1645,6 @@
}
$noofrows = $adb->num_rows($result);
-
$custom_field_values = $adb->fetch_array($result);
$groupslist = $this->getGroupingList($this->reportid);
More information about the vtigercrm-commits
mailing list