[Vtigercrm-commits] [vtiger-commits] r9109 - in /vtigercrm/trunk/modules/Quotes: CallRelatedList.php DetailView.php Quote.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Aug 24 01:36:38 EDT 2006
Author: richie
Date: Wed Aug 23 23:36:01 2006
New Revision: 9109
Log:
Updated the single pane view feature for detailview in Quotes Module -- ahmed
Modified:
vtigercrm/trunk/modules/Quotes/CallRelatedList.php
vtigercrm/trunk/modules/Quotes/DetailView.php
vtigercrm/trunk/modules/Quotes/Quote.php
Modified: vtigercrm/trunk/modules/Quotes/CallRelatedList.php
==============================================================================
--- vtigercrm/trunk/modules/Quotes/CallRelatedList.php (original)
+++ vtigercrm/trunk/modules/Quotes/CallRelatedList.php Wed Aug 23 23:36:01 2006
@@ -40,8 +40,7 @@
if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
$smarty->assign("OP_MODE",$_REQUEST['mode']);
}
-$smarty->assign("id",$focus->id);
-$smarty->assign("ID",$RECORD );
+$smarty->assign("ID",$focus->id);
$smarty->assign("MODULE",$currentmodule);
$smarty->assign("SINGLE_MOD",$app_strings['Quote']);
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
Modified: vtigercrm/trunk/modules/Quotes/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/Quotes/DetailView.php (original)
+++ vtigercrm/trunk/modules/Quotes/DetailView.php Wed Aug 23 23:36:01 2006
@@ -26,7 +26,8 @@
require_once('include/CustomFieldUtil.php');
require_once('include/database/PearDatabase.php');
require_once('include/utils/utils.php');
-global $mod_strings,$app_strings,$currentModule,$theme;
+require_once('user_privileges/default_module_view.php');
+global $mod_strings,$app_strings,$currentModule,$theme,$singlepane_view;
$focus = new Quote();
if(isset($_REQUEST['record']) && isset($_REQUEST['record'])) {
@@ -99,6 +100,15 @@
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST[record]));
+
+if($singlepane_view == 'true')
+{
+ $related_array = getRelatedLists($currentModule,$focus);
+ $smarty->assign("RELATEDLISTS", $related_array);
+}
+
+$smarty->assign("SinglePane_View", $singlepane_view);
+
$smarty->display("Inventory/InventoryDetailView.tpl");
?>
Modified: vtigercrm/trunk/modules/Quotes/Quote.php
==============================================================================
--- vtigercrm/trunk/modules/Quotes/Quote.php (original)
+++ vtigercrm/trunk/modules/Quotes/Quote.php Wed Aug 23 23:36:01 2006
@@ -28,6 +28,8 @@
require_once('data/CRMEntity.php');
require_once('include/utils/utils.php');
require_once('include/RelatedListView.php');
+require_once('user_privileges/default_module_view.php');
+
// Account is used to store vtiger_account information.
class Quote extends CRMEntity {
var $log;
@@ -141,14 +143,17 @@
*/
function get_salesorder($id)
{
- global $log;
+ global $log,$singlepane_view;
$log->debug("Entering get_salesorder(".$id.") method ...");
require_once('modules/SalesOrder/SalesOrder.php');
$focus = new SalesOrder();
$button = '';
- $returnset = '&return_module=Quotes&return_action=CallRelatedList&return_id='.$id;
+ if($singlepane_view == 'true')
+ $returnset = '&return_module=Quotes&return_action=DetailView&return_id='.$id;
+ else
+ $returnset = '&return_module=Quotes&return_action=CallRelatedList&return_id='.$id;
$query = "select vtiger_crmentity.*, vtiger_salesorder.*, vtiger_quotes.subject as quotename, vtiger_account.accountname from vtiger_salesorder inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_salesorder.salesorderid left outer join vtiger_quotes on vtiger_quotes.quoteid=vtiger_salesorder.quoteid left outer join vtiger_account on vtiger_account.accountid=vtiger_salesorder.accountid left join vtiger_sogrouprelation on vtiger_salesorder.salesorderid=vtiger_sogrouprelation.salesorderid left join vtiger_groups on vtiger_groups.groupname=vtiger_sogrouprelation.groupname where vtiger_crmentity.deleted=0 and vtiger_salesorder.quoteid = ".$id;
$log->debug("Exiting get_salesorder method ...");
@@ -161,7 +166,7 @@
*/
function get_activities($id)
{
- global $log;
+ global $log,$singlepane_view;
$log->debug("Entering get_activities(".$id.") method ...");
global $app_strings;
require_once('modules/Calendar/Activity.php');
@@ -169,7 +174,10 @@
$button = '';
- $returnset = '&return_module=Quotes&return_action=CallRelatedList&return_id='.$id;
+ if($singlepane_view == 'true')
+ $returnset = '&return_module=Quotes&return_action=DetailView&return_id='.$id;
+ else
+ $returnset = '&return_module=Quotes&return_action=CallRelatedList&return_id='.$id;
$query = "SELECT vtiger_contactdetails.contactid, vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_activity.*,vtiger_seactivityrel.*,vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime, vtiger_users.user_name,vtiger_recurringevents.recurringtype from vtiger_activity inner join vtiger_seactivityrel on vtiger_seactivityrel.activityid=vtiger_activity.activityid inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid left join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_cntactivityrel.contactid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid left outer join vtiger_recurringevents on vtiger_recurringevents.activityid=vtiger_activity.activityid left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_crmentity.crmid left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname where vtiger_seactivityrel.crmid=".$id." and activitytype='Task' and (vtiger_activity.status is not NULL && vtiger_activity.status != 'Completed') and (vtiger_activity.status is not NULL && vtiger_activity.status != 'Deferred')";
$log->debug("Exiting get_activities method ...");
More information about the vtigercrm-commits
mailing list