Update of /cvsroot/vtigercrm/vtiger_crm/modules/Accounts In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv16398/modules/Accounts Modified Files: Account.php DetailView.php EditView.php Import.php ListView.php ListViewTop.php Tickerdetail.php Log Message: * issues fixed for 5 beta2 release Index: Account.php =================================================================== RCS file: /cvsroot/vtigercrm/vtiger_crm/modules/Accounts/Account.php,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- Account.php 26 Jun 2006 06:54:36 -0000 1.44 +++ Account.php 5 Jul 2006 14:37:54 -0000 1.45 @@ -590,10 +590,10 @@ { global $log; $log->debug("Entering create_export_query(".$order_by.",".$where.") method ..."); - if($this->checkIfCustomTableExists('accountscf')) + if($this->checkIfCustomTableExists('vtiger_accountscf')) { - $query = $this->constructCustomQueryAddendum('accountscf','Accounts') . " + $query = $this->constructCustomQueryAddendum('vtiger_accountscf','Accounts') . " vtiger_account.*, ".$this->entity_table.".*, vtiger_accountbillads.city AS billing_city, Index: DetailView.php =================================================================== RCS file: /cvsroot/vtigercrm/vtiger_crm/modules/Accounts/DetailView.php,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- DetailView.php 8 Jun 2006 11:08:12 -0000 1.32 +++ DetailView.php 5 Jul 2006 14:37:54 -0000 1.33 @@ -95,9 +95,8 @@ $smarty->assign("TOPTIONS",$optionString); } -$account_tables = Array('account','crmentity','accountbillads','accountshipads','accountscf'); $tabid = getTabid("Accounts"); -$validationData = getDBValidationData($account_tables,$tabid); +$validationData = getDBValidationData($focus->tab_name,$tabid); $data = split_validationdataArray($validationData); $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); @@ -109,5 +108,6 @@ $smarty->assign("CHECK", $check_button); $smarty->assign("MODULE",$currentModule); +$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST[record])); $smarty->display("DetailView.tpl"); ?> Index: EditView.php =================================================================== RCS file: /cvsroot/vtigercrm/vtiger_crm/modules/Accounts/EditView.php,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- EditView.php 27 May 2006 05:42:05 -0000 1.22 +++ EditView.php 5 Jul 2006 14:37:54 -0000 1.23 @@ -23,7 +23,6 @@ require_once('Smarty_setup.php'); require_once('data/Tracker.php'); require_once('modules/Accounts/Account.php'); -require_once('modules/Accounts/Forms.php'); require_once('include/CustomFieldUtil.php'); require_once('include/ComboUtil.php'); require_once('include/utils/utils.php'); @@ -101,9 +100,8 @@ $smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']); $smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT'])); -$account_tables = Array('account','crmentity','accountbillads','accountshipads','accountscf'); $tabid = getTabid("Accounts"); - $validationData = getDBValidationData($account_tables,$tabid); + $validationData = getDBValidationData($focus->tab_name,$tabid); $data = split_validationdataArray($validationData); $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); Index: ListView.php =================================================================== RCS file: /cvsroot/vtigercrm/vtiger_crm/modules/Accounts/ListView.php,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- ListView.php 7 Jun 2006 07:20:20 -0000 1.56 +++ ListView.php 5 Jul 2006 14:37:54 -0000 1.57 @@ -76,7 +76,6 @@ $viewid = $oCustomView->getViewId($currentModule); $customviewcombo_html = $oCustomView->getCustomViewCombo($viewid); $viewnamedesc = $oCustomView->getCustomViewByCvid($viewid); -$groupid = $oCustomView->getGroupId($currentModule); //<<<<<customview>>>>> $smarty->assign("CHANGE_OWNER",getUserslist()); if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true') @@ -171,10 +170,11 @@ $query .= ' ORDER BY '.$tablename.$order_by.' '.$sorder; } } -$list_result = $adb->query($query); //Retreiving the no of rows -$noofrows = $adb->num_rows($list_result); + +$count_result = $adb->query("select count(*) count ".substr($query, strpos($query,'FROM'),strlen($query))); +$noofrows = $adb->query_result($count_result,0,"count"); //Storing Listview session object if($_SESSION['lvs'][$currentModule]) @@ -195,6 +195,14 @@ $end_rec = $navigation_array['end_val']; //By Raju Ends +//limiting the query +if ($start_rec ==0) + $limit_start_rec = 0; +else + $limit_start_rec = $start_rec -1; + +$list_result = $adb->query($query. " limit ".$limit_start_rec.",".$list_max_entries_per_page); + //mass merge for word templates -- *Raj*17/11 while($row = $adb->fetch_array($list_result)) { Index: ListViewTop.php =================================================================== RCS file: /cvsroot/vtigercrm/vtiger_crm/modules/Accounts/ListViewTop.php,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- ListViewTop.php 30 Jun 2006 04:02:57 -0000 1.36 +++ ListViewTop.php 5 Jul 2006 14:37:54 -0000 1.37 @@ -70,7 +70,7 @@ 'AMOUNT' => ($account['amount']), ); - $value[]='<a href="index.php?action=DetailView&module=Accounts&record='.$account['accountid'].'" onMouseOver=getHeadLines("'.$account['tickersymbol'].'")>'.$account['accountname'].'</a>'; + $value[]='<a href="index.php?action=DetailView&module=Accounts&record='.$account['accountid'].'">'.$account['accountname'].'</a>'; $value[]=convertFromDollar($account['amount'],$rate); $entries[$account['accountid']]=$value; } Index: Tickerdetail.php =================================================================== RCS file: /cvsroot/vtigercrm/vtiger_crm/modules/Accounts/Tickerdetail.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Tickerdetail.php 27 Feb 2006 15:16:14 -0000 1.1 +++ Tickerdetail.php 5 Jul 2006 14:37:54 -0000 1.2 @@ -8,8 +8,8 @@ * All Rights Reserved. * ********************************************************************************/ -include("modules/Accounts/Account.php"); -include("getCompanyProfile.php"); +require_once("modules/Accounts/Account.php"); +require_once("getCompanyProfile.php"); $variable = $_REQUEST['tickersymbol']; $url = "http://moneycentral.msn.com/investor/research/profile.asp?Symbol=".trim($variable); $data = getComdata($url,trim($variable)); |