[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/modules/Settings/Currency/models/ -> Module.php (source)

   1  <?php
   2  
   3  /*+**********************************************************************************
   4   * The contents of this file are subject to the vtiger CRM Public License Version 1.1
   5   * ("License"); You may not use this file except in compliance with the License
   6   * The Original Code is:  vtiger CRM Open Source
   7   * The Initial Developer of the Original Code is vtiger.
   8   * Portions created by vtiger are Copyright (C) vtiger.
   9   * All Rights Reserved.
  10   ************************************************************************************/
  11  
  12  class Settings_Currency_Module_Model extends Settings_Vtiger_Module_Model{
  13      
  14      const tableName = 'vtiger_currency_info';
  15      
  16      var $listFields = array('currency_name' => 'Currency Name', 'currency_code'=>'Currency Code', 'currency_symbol'=> 'Symbol', 
  17                              'conversion_rate'=> 'Conversion Rate', 'currency_status' => 'Status');
  18      var $name = 'Currency';
  19      
  20      public function isPagingSupported() {
  21          return false;
  22      }
  23      
  24      public function getCreateRecordUrl() {
  25          return "javascript:Settings_Currency_Js.triggerAdd(event)";
  26      }
  27      
  28      public function getBaseTable() {
  29          return self::tableName;
  30      }
  31      
  32      public static function tranformCurrency($oldCurrencyId, $newCurrencyId) {
  33          return transferCurrency($oldCurrencyId,$newCurrencyId);
  34      }
  35      
  36      public static function delete($recordId) {
  37          $db = PearDatabase::getInstance();
  38          $query = 'UPDATE '.self::tableName.' SET deleted=1 WHERE id=?';
  39          $params = array($recordId);
  40          $db->pquery($query, $params);
  41      }
  42  }


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1