[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
1 <?php 2 /********************************************************************************* 3 ** The contents of this file are subject to the vtiger CRM Public License Version 1.0 4 * ("License"); You may not use this file except in compliance with the License 5 * The Original Code is: vtiger CRM Open Source 6 * The Initial Developer of the Original Code is vtiger. 7 * Portions created by vtiger are Copyright (C) vtiger. 8 * All Rights Reserved. 9 * 10 ********************************************************************************/ 11 require_once ('include/database/PearDatabase.php'); 12 require_once ('Smarty_setup.php'); 13 require_once ('modules/Products/Products.php'); 14 require_once ('include/utils/utils.php'); 15 require_once ('user_privileges/default_module_view.php'); 16 17 $focus = new Products(); 18 19 if(isset($_REQUEST['record']) && isset($_REQUEST['record'])) { 20 //Display the error message 21 if($_SESSION['image_type_error'] != '') 22 { 23 echo '<font color="red">'.$_SESSION['image_type_error'].'</font>'; 24 session_unregister('image_type_error'); 25 } 26 27 $focus->retrieve_entity_info($_REQUEST['record'],"Products"); 28 $focus->id = $_REQUEST['record']; 29 $focus->name=$focus->column_fields['productname']; 30 } 31 32 if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { 33 $focus->id = ""; 34 } 35 36 global $app_strings,$currentModule,$singlepane_view; 37 global $mod_strings; 38 39 global $theme; 40 $theme_path="themes/".$theme."/"; 41 $image_path=$theme_path."images/"; 42 require_once ($theme_path.'layout_utils.php'); 43 44 $smarty = new vtigerCRM_Smarty; 45 $smarty->assign("MOD", $mod_strings); 46 $smarty->assign("APP", $app_strings); 47 48 if (isset($focus->name)) $smarty->assign("NAME", $focus->name); 49 else $smarty->assign("NAME", ""); 50 51 $smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields)); 52 $category = getParentTab(); 53 $smarty->assign("CATEGORY",$category); 54 $smarty->assign("UPDATEINFO",updateInfo($focus->id)); 55 56 57 $smarty->assign("CUSTOMFIELD", $cust_fld); 58 $smarty->assign("SINGLE_MOD", 'Product'); 59 60 if(isPermitted("Products","EditView",$_REQUEST['record']) == 'yes') 61 $smarty->assign("EDIT_DUPLICATE","permitted"); 62 63 if(isPermitted("Products","Delete",$_REQUEST['record']) == 'yes') 64 $smarty->assign("DELETE","permitted"); 65 66 $smarty->assign("IMAGE_PATH", $image_path); 67 $smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']); 68 $smarty->assign("ID", $_REQUEST['record']); 69 70 //Added to display the Tax informations 71 $tax_details = getTaxDetailsForProduct($focus->id); 72 73 for($i=0;$i<count($tax_details);$i++) 74 { 75 $tax_details[$i]['percentage'] = getProductTaxPercentage($tax_details[$i]['taxname'],$focus->id); 76 } 77 $smarty->assign("TAX_DETAILS", $tax_details); 78 79 80 $check_button = Button_Check($module); 81 $smarty->assign("CHECK", $check_button); 82 83 $tabid = getTabid("Products"); 84 $validationData = getDBValidationData($focus->tab_name,$tabid); 85 $data = split_validationdataArray($validationData); 86 $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']); 87 $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']); 88 $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']); 89 90 //Security check for related list 91 $smarty->assign("MODULE", $currentModule); 92 $smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST[record])); 93 94 if($singlepane_view == 'true') 95 { 96 $related_array = getRelatedLists($currentModule,$focus); 97 $smarty->assign("RELATEDLISTS", $related_array); 98 } 99 100 $smarty->assign("SinglePane_View", $singlepane_view); 101 $smarty->display("Inventory/InventoryDetailView.tpl"); 102 103 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |