[Vtigercrm-commits] [vtiger-commits] r10728 - in /vtigercrm/branches/5.0.3/modules/Reports: ReportColumnsTotal.php ReportRun.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Apr 19 06:31:41 EDT 2007


Author: richie
Date: Thu Apr 19 04:31:34 2007
New Revision: 10728

Log:
* Fixed the issues in Invoice when we include Contact name to display, Fixed #3663

Modified:
    vtigercrm/branches/5.0.3/modules/Reports/ReportColumnsTotal.php
    vtigercrm/branches/5.0.3/modules/Reports/ReportRun.php

Modified: vtigercrm/branches/5.0.3/modules/Reports/ReportColumnsTotal.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Reports/ReportColumnsTotal.php (original)
+++ vtigercrm/branches/5.0.3/modules/Reports/ReportColumnsTotal.php Thu Apr 19 04:31:34 2007
@@ -48,6 +48,11 @@
         $BLOCK1 = $oReport->sgetColumntoTotal($primarymodule,$secondarymodule);
 		$report_column_tot->assign("BLOCK1",$BLOCK1);
 }
-$report_column_tot->assign("ROWS_COUNT", count($BLOCK1[0]));
+//added to avoid displaying "No data avaiable to total" when using related modules in report.
+if(count($BLOCK1[0]) == 0 &&  count($BLOCK1[1])==0)
+	$report_column_tot->assign("ROWS_COUNT",0);
+else
+	$report_column_tot->assign("ROWS_COUNT","-1");
+
 $report_column_tot->display('ReportColumnsTotal.tpl');
 ?>

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 Apr 19 04:31:34 2007
@@ -1371,6 +1371,7 @@
 				left join vtiger_groups on vtiger_groups.groupname = vtiger_invoicegrouprelation.groupname
 				left join vtiger_users as vtiger_usersInvoice on vtiger_usersInvoice.id = vtiger_crmentity.smownerid
 				left join vtiger_account as vtiger_accountInvoice on vtiger_accountInvoice.accountid = vtiger_invoice.accountid
+				left join vtiger_contactdetails as vtiger_contactdetailsInvoice on vtiger_contactdetailsInvoice.contactid = vtiger_invoice.contactid
 				".$this->getRelatedModulesQuery($module,$this->secondarymodule)."
 				where vtiger_crmentity.deleted=0";
 		}





More information about the vtigercrm-commits mailing list