[Vtigercrm-commits] [vtiger-commits] r10986 - /vtigercrm/branches/5.0.3/modules/Accounts/ListViewTop.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed May 23 10:52:01 EDT 2007


Author: richie
Date: Wed May 23 08:51:57 2007
New Revision: 10986

Log:
fix for TopAccounts are not coming in Homepage (For Non-admin User). Fixes #3936 --minnie

Modified:
    vtigercrm/branches/5.0.3/modules/Accounts/ListViewTop.php

Modified: vtigercrm/branches/5.0.3/modules/Accounts/ListViewTop.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Accounts/ListViewTop.php (original)
+++ vtigercrm/branches/5.0.3/modules/Accounts/ListViewTop.php Wed May 23 08:51:57 2007
@@ -40,14 +40,14 @@
         require('user_privileges/user_privileges_'.$current_user->id.'.php');
         require('user_privileges/sharing_privileges_'.$current_user->id.'.php');
 
-	$list_query = "select vtiger_account.accountid, vtiger_account.accountname, vtiger_account.tickersymbol, sum(vtiger_potential.amount) as amount from vtiger_potential inner join vtiger_crmentity on (vtiger_potential.potentialid=vtiger_crmentity.crmid) inner join vtiger_account on (vtiger_potential.accountid=vtiger_account.accountid) where vtiger_crmentity.deleted=0 AND vtiger_crmentity.smownerid='".$current_user->id."' and vtiger_potential.sales_stage not in ('Closed Won', 'Closed Lost','".$app_strings['LBL_CLOSE_WON']."','".$app_strings['LBL_CLOSE_LOST']."') group by vtiger_account.accountid, vtiger_account.accountname, vtiger_account.tickersymbol order by amount desc;";
+	$list_query = "select vtiger_account.accountid, vtiger_account.accountname, vtiger_account.tickersymbol, sum(vtiger_potential.amount) as amount from vtiger_potential inner join vtiger_crmentity on (vtiger_potential.potentialid=vtiger_crmentity.crmid) inner join vtiger_account on (vtiger_potential.accountid=vtiger_account.accountid) left join vtiger_accountgrouprelation on (vtiger_account.accountid = vtiger_accountgrouprelation.accountid) left join vtiger_groups on (vtiger_groups.groupname = vtiger_accountgrouprelation.groupname) where vtiger_crmentity.deleted=0 AND vtiger_crmentity.smownerid='".$current_user->id."' and vtiger_potential.sales_stage not in ('Closed Won', 'Closed Lost','".$app_strings['LBL_CLOSE_WON']."','".$app_strings['LBL_CLOSE_LOST']."')";
 	if($is_admin==false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1 && $defaultOrgSharingPermission[6] == 3)
 	{
 		$sec_parameter=getListViewSecurityParameter('Accounts');
 		$list_query .= $sec_parameter;
 
 	}
-
+	$list_query .= " group by vtiger_account.accountid, vtiger_account.accountname, vtiger_account.tickersymbol order by amount desc";
 	$list_result=$adb->query($list_query);
 	$open_accounts_list = array();
 	$noofrows = min($adb->num_rows($list_result),5);





More information about the vtigercrm-commits mailing list