[Vtigercrm-commits] [vtiger-commits] r9106 - in /vtigercrm/trunk/modules/PriceBooks: CallRelatedList.php DetailView.php PriceBook.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Aug 24 01:31:16 EDT 2006


Author: richie
Date: Wed Aug 23 23:30:51 2006
New Revision: 9106

Log:
Updated the single pane view feature for detailview in PriceBooks Module -- ahmed

Modified:
    vtigercrm/trunk/modules/PriceBooks/CallRelatedList.php
    vtigercrm/trunk/modules/PriceBooks/DetailView.php
    vtigercrm/trunk/modules/PriceBooks/PriceBook.php

Modified: vtigercrm/trunk/modules/PriceBooks/CallRelatedList.php
==============================================================================
--- vtigercrm/trunk/modules/PriceBooks/CallRelatedList.php (original)
+++ vtigercrm/trunk/modules/PriceBooks/CallRelatedList.php Wed Aug 23 23:30:51 2006
@@ -50,8 +50,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("RELATEDLISTS", $related_array);
 $smarty->assign("SINGLE_MOD",$app_strings['PriceBook']);

Modified: vtigercrm/trunk/modules/PriceBooks/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/PriceBooks/DetailView.php (original)
+++ vtigercrm/trunk/modules/PriceBooks/DetailView.php Wed Aug 23 23:30:51 2006
@@ -12,6 +12,7 @@
 require_once('Smarty_setup.php');
 require_once('modules/PriceBooks/PriceBook.php');
 require_once('include/utils/utils.php');
+require_once('user_privileges/default_module_view.php');
 
 $focus = new PriceBook();
 
@@ -27,7 +28,7 @@
         $focus->id = "";
 }
 
-global $app_strings,$mod_strings,$theme,$currentModule;
+global $app_strings,$mod_strings,$theme,$currentModule,$singlepane_view;
 
 $theme_path="themes/".$theme."/";
 $image_path=$theme_path."images/";
@@ -73,5 +74,14 @@
 $smarty->assign("MODULE", $currentModule);
 $smarty->assign("SINGLE_MOD", 'PriceBook');
 $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/PriceBooks/PriceBook.php
==============================================================================
--- vtigercrm/trunk/modules/PriceBooks/PriceBook.php (original)
+++ vtigercrm/trunk/modules/PriceBooks/PriceBook.php Wed Aug 23 23:30:51 2006
@@ -15,7 +15,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');
 
 class PriceBook extends CRMEntity {
 	var $log;
@@ -95,7 +95,7 @@
         **/
 	function get_pricebook_products($id)
 	{
-		global $log;
+		global $log,$singlepane_view;
 		$log->debug("Entering get_pricebook_products(".$id.") method ...");
 		global $app_strings;
 		require_once('modules/Products/Product.php');	
@@ -103,7 +103,10 @@
 
 		$button = '';
 
-		$returnset = '&return_module=PriceBooks&return_action=CallRelatedList&return_id='.$id;
+		if($singlepane_view == 'true')
+			$returnset = '&return_module=PriceBooks&return_action=DetailView&return_id='.$id;
+		else
+			$returnset = '&return_module=PriceBooks&return_action=CallRelatedList&return_id='.$id;
 
 		$query = 'select vtiger_products.productid, vtiger_products.productname, vtiger_products.productcode, vtiger_products.commissionrate, vtiger_products.qty_per_unit, vtiger_products.unit_price, vtiger_crmentity.crmid, vtiger_crmentity.smownerid,vtiger_pricebookproductrel.listprice from vtiger_products inner join vtiger_pricebookproductrel on vtiger_products.productid = vtiger_pricebookproductrel.productid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_products.productid inner join vtiger_pricebook on vtiger_pricebook.pricebookid = vtiger_pricebookproductrel.pricebookid  where vtiger_pricebook.pricebookid = '.$id.' and vtiger_crmentity.deleted = 0'; 
 		$log->debug("Exiting get_pricebook_products method ...");





More information about the vtigercrm-commits mailing list