[ Index ]
 

Code source de vtiger CRM 5.0.2

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

title

Body

[fermer]

/modules/Invoice/ -> 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/Invoice/Invoice.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,$currentModule,$theme,$singlepane_view;
  31  $focus = new Invoice();
  32  
  33  if(isset($_REQUEST['record']) && isset($_REQUEST['record'])) {
  34      $focus->retrieve_entity_info($_REQUEST['record'],"Invoice");
  35      $focus->id = $_REQUEST['record'];
  36      $focus->name=$focus->column_fields['subject'];        
  37  }
  38  
  39  if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
  40      $focus->id = "";
  41  } 
  42  
  43  $theme_path="themes/".$theme."/";
  44  $image_path=$theme_path."images/";
  45  require_once ($theme_path.'layout_utils.php');
  46  
  47  $log->info("Order detail view");
  48  
  49  
  50  $smarty = new vtigerCRM_Smarty;
  51  $smarty->assign("MOD", $mod_strings);
  52  $smarty->assign("APP", $app_strings);
  53  $smarty->assign("MODULE",$currentModule);
  54  
  55  $smarty->assign("UPDATEINFO",updateInfo($focus->id));
  56  
  57  $smarty->assign("THEME", $theme);
  58  $smarty->assign("IMAGE_PATH", $image_path);
  59  $smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
  60  
  61  if (isset($focus->name)) $smarty->assign("NAME", $focus->name);
  62  else $smarty->assign("NAME", "");
  63  $smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields)); 
  64  
  65  $smarty->assign("CUSTOMFIELD", $cust_fld);
  66  $smarty->assign("ID", $_REQUEST['record']);
  67  $smarty->assign("SINGLE_MOD", 'Invoice');
  68  $category = getParentTab();
  69  $smarty->assign("CATEGORY",$category);
  70  
  71  if(isPermitted("Invoice","EditView",$_REQUEST['record']) == 'yes')
  72      $smarty->assign("EDIT_DUPLICATE","permitted");
  73  
  74  $smarty->assign("CREATEPDF","permitted");
  75  
  76  if(isPermitted("Invoice","Delete",$_REQUEST['record']) == 'yes')
  77      $smarty->assign("DELETE","permitted");
  78  
  79  //Get the associated Products and then display above Terms and Conditions
  80  $smarty->assign("ASSOCIATED_PRODUCTS",getDetailAssociatedProducts('Invoice',$focus));
  81  
  82  $check_button = Button_Check($module);
  83  $smarty->assign("CHECK", $check_button);
  84  
  85  $tabid = getTabid("Invoice");
  86  $validationData = getDBValidationData($focus->tab_name,$tabid);
  87  $data = split_validationdataArray($validationData);
  88  $smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
  89  $smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
  90  $smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
  91  $smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST[record]));
  92  
  93  if($singlepane_view == 'true')
  94  {
  95      $related_array = getRelatedLists($currentModule,$focus);
  96      $smarty->assign("RELATEDLISTS", $related_array);
  97  }
  98  
  99  $smarty->assign("SinglePane_View", $singlepane_view);
 100  
 101  $smarty->display("Inventory/InventoryDetailView.tpl");
 102  
 103  ?>


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