[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/modules/SalesOrder/ -> DetailView.php (source)

   1  <?php
   2  /*********************************************************************************
   3   * The contents of this file are subject to the SugarCRM Public License Version 1.1.2
   4   * ("License"); You may not use this file except in compliance with the 
   5   * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
   6   * Software distributed under the License is distributed on an  "AS IS"  basis,
   7   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
   8   * the specific language governing rights and limitations under the License.
   9   * The Original Code is:  SugarCRM Open Source
  10   * The Initial Developer of the Original Code is SugarCRM, Inc.
  11   * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
  12   * All Rights Reserved.
  13   * Contributor(s): ______________________________________.
  14   ********************************************************************************/
  15  /*********************************************************************************
  16   * $Header$
  17   * Description:  TODO To be written.
  18   * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
  19   * All Rights Reserved.
  20   * Contributor(s): ______________________________________..
  21   ********************************************************************************/
  22  
  23  require_once ('Smarty_setup.php');
  24  require_once ('data/Tracker.php');
  25  require_once ('modules/SalesOrder/SalesOrder.php');
  26  require_once ('include/CustomFieldUtil.php');
  27  require_once ('include/database/PearDatabase.php');
  28  require_once ('include/utils/utils.php');
  29  require_once ('user_privileges/default_module_view.php');
  30  global $mod_strings,$app_strings,$theme,$currentModule,$singlepane_view;
  31  
  32  $focus = new SalesOrder();
  33  
  34  if(isset($_REQUEST['record']) && isset($_REQUEST['record'])) {
  35      $focus->retrieve_entity_info($_REQUEST['record'],"SalesOrder");
  36      $focus->id = $_REQUEST['record'];
  37      $focus->name=$focus->column_fields['subject'];        
  38  }
  39  
  40  if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
  41      $focus->id = "";
  42  } 
  43  
  44  $theme_path="themes/".$theme."/";
  45  $image_path=$theme_path."images/";
  46  require_once ($theme_path.'layout_utils.php');
  47  
  48  $log->info("SalesOrder detail view");
  49  
  50  $smarty = new vtigerCRM_Smarty;
  51  
  52  $smarty->assign("MOD", $mod_strings);
  53  $smarty->assign("APP", $app_strings);
  54  
  55  $smarty->assign("THEME", $theme);
  56  $smarty->assign("IMAGE_PATH", $image_path);
  57  $smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
  58  
  59  if (isset($focus->name)) 
  60  $smarty->assign("NAME", $focus->name);
  61  else 
  62  $smarty->assign("NAME", "");
  63  $smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields));
  64  $smarty->assign("UPDATEINFO",updateInfo($focus->id));
  65  
  66  $smarty->assign("CUSTOMFIELD", $cust_fld);
  67  $smarty->assign("ID", $_REQUEST['record']);
  68  $smarty->assign("SINGLE_MOD", 'SalesOrder');
  69  $category = getParentTab();
  70  $smarty->assign("CATEGORY",$category);
  71  
  72  
  73  if(isPermitted("SalesOrder","EditView",$_REQUEST['record']) == 'yes')
  74      $smarty->assign("EDIT_DUPLICATE","permitted");
  75  
  76  $smarty->assign("CREATEPDF","permitted");
  77  
  78  if(isPermitted("Invoice","EditView",$_REQUEST['record']) == 'yes')
  79      $smarty->assign("CONVERTINVOICE","permitted");
  80  
  81  if(isPermitted("SalesOrder","Delete",$_REQUEST['record']) == 'yes')
  82      $smarty->assign("DELETE","permitted");
  83  
  84  $smarty->assign("MODULE", $currentModule);
  85  $smarty->assign("CONVERTMODE",'sotoinvoice');
  86  //Get the associated Products and then display above Terms and Conditions
  87  $smarty->assign("ASSOCIATED_PRODUCTS",getDetailAssociatedProducts('SalesOrder',$focus));
  88  
  89   $tabid = getTabid("SalesOrder");
  90   $validationData = getDBValidationData($focus->tab_name,$tabid);
  91   $data = split_validationdataArray($validationData);
  92  
  93   $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
  94   $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
  95   $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
  96  
  97  $check_button = Button_Check($module);
  98  $smarty->assign("CHECK", $check_button);
  99  $smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST[record]));
 100  
 101  if($singlepane_view == 'true')
 102  {
 103      $related_array = getRelatedLists($currentModule,$focus);
 104      $smarty->assign("RELATEDLISTS", $related_array);
 105  }
 106  
 107  $smarty->assign("SinglePane_View", $singlepane_view);
 108  
 109  $smarty->display("Inventory/InventoryDetailView.tpl");
 110  
 111  ?>


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7