[Vtigercrm-commits] [vtiger-commits] r9110 - in /vtigercrm/trunk/modules/SalesOrder: CallRelatedList.php DetailView.php SalesOrder.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Aug 24 01:39:54 EDT 2006
Author: richie
Date: Wed Aug 23 23:38:40 2006
New Revision: 9110
Log:
Updated the single pane view feature for detailview in SalesOrders Module -- ahmed
Modified:
vtigercrm/trunk/modules/SalesOrder/CallRelatedList.php
vtigercrm/trunk/modules/SalesOrder/DetailView.php
vtigercrm/trunk/modules/SalesOrder/SalesOrder.php
Modified: vtigercrm/trunk/modules/SalesOrder/CallRelatedList.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/CallRelatedList.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/CallRelatedList.php Wed Aug 23 23:38:40 2006
@@ -40,8 +40,7 @@
$category = getParentTab();
$smarty->assign("CATEGORY",$category);
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
-$smarty->assign("id",$focus->id);
-$smarty->assign("ID",$RECORD );
+$smarty->assign("ID",$focus->id);
$smarty->assign("MODULE",$currentmodule);
$smarty->assign("SINGLE_MOD",$app_strings['SalesOrder']);
$smarty->assign("MOD",$mod_strings);
Modified: vtigercrm/trunk/modules/SalesOrder/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/DetailView.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/DetailView.php Wed Aug 23 23:38:40 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,$theme,$currentModule;
+require_once('user_privileges/default_module_view.php');
+global $mod_strings,$app_strings,$theme,$currentModule,$singlepane_view;
$focus = new SalesOrder();
@@ -96,6 +97,15 @@
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
$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/SalesOrder/SalesOrder.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/SalesOrder.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/SalesOrder.php Wed Aug 23 23:38:40 2006
@@ -27,6 +27,7 @@
require_once('data/SugarBean.php');
require_once('data/CRMEntity.php');
require_once('include/utils/utils.php');
+require_once('user_privileges/default_module_view.php');
// Account is used to store vtiger_account information.
class SalesOrder extends CRMEntity {
@@ -142,7 +143,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');
@@ -150,7 +151,10 @@
$button = '';
- $returnset = '&return_module=SalesOrder&return_action=CallRelatedList&return_id='.$id;
+ if($singlepane_view == 'true')
+ $returnset = '&return_module=SalesOrder&return_action=DetailView&return_id='.$id;
+ else
+ $returnset = '&return_module=SalesOrder&return_action=CallRelatedList&return_id='.$id;
$query = "SELECT vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.contactid, vtiger_activity.*,vtiger_seactivityrel.*,vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime, vtiger_users.user_name 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 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_crmentity.deleted=0 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 ...");
@@ -231,14 +235,17 @@
*/
function get_invoices($id)
{
- global $log;
+ global $log,$singlepane_view;
$log->debug("Entering get_invoices(".$id.") method ...");
require_once('modules/Invoice/Invoice.php');
$focus = new Invoice();
$button = '';
- $returnset = '&return_module=SalesOrder&return_action=CallRelatedList&return_id='.$id;
+ if($singlepane_view == 'true')
+ $returnset = '&return_module=SalesOrder&return_action=DetailView&return_id='.$id;
+ else
+ $returnset = '&return_module=SalesOrder&return_action=CallRelatedList&return_id='.$id;
$query = "select vtiger_crmentity.*, vtiger_invoice.*, vtiger_account.accountname, vtiger_salesorder.subject as salessubject from vtiger_invoice inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_invoice.invoiceid left outer join vtiger_account on vtiger_account.accountid=vtiger_invoice.accountid inner join vtiger_salesorder on vtiger_salesorder.salesorderid=vtiger_invoice.salesorderid left join vtiger_invoicegrouprelation on vtiger_invoice.invoiceid=vtiger_invoicegrouprelation.invoiceid left join vtiger_groups on vtiger_groups.groupname=vtiger_invoicegrouprelation.groupname where vtiger_crmentity.deleted=0 and vtiger_salesorder.salesorderid=".$id;
More information about the vtigercrm-commits
mailing list