当前位置: 首页>>代码示例>>PHP>>正文


PHP Currency::mark_deleted方法代码示例

本文整理汇总了PHP中Currency::mark_deleted方法的典型用法代码示例。如果您正苦于以下问题:PHP Currency::mark_deleted方法的具体用法?PHP Currency::mark_deleted怎么用?PHP Currency::mark_deleted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Currency的用法示例。


在下文中一共展示了Currency::mark_deleted方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: tearDown

 public function tearDown()
 {
     global $sugar_config;
     $this->currency_system->symbol = $this->backupSymbol;
     $this->currency_system->save(false);
     $sugar_config['default_currency_symbol'] = $this->backupSymbol;
     format_number(0, 0, 0, array('currency_id' => $this->currency_51568->id, 'currency_symbol' => $this->currency_51568->symbol));
     format_number(0, 0, 0, array('currency_id' => -99, 'currency_symbol' => $this->currency_51568->getDefaultCurrencySymbol()));
     $this->currency_51568->mark_deleted($this->currency_51568->id);
     SugarTestHelper::tearDown();
     get_number_seperators(true);
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:12,代码来源:Bug51568Test.php

示例2: testCurrencySelect

 /**
  * Create new currency
  * Create fake Opportunity with created currency
  * Try to get select for currency field and assert that new currency is selected
  * 
  * @return void
  * @group 48570
  */
 public function testCurrencySelect()
 {
     $currency = new Currency();
     $currency->iso4217 = 'EUR';
     $currency->name = 'Euro';
     $currency->symbol = 'E';
     $currency->conversion_rate = 1.5;
     $currency->status = 'Active';
     $currency->save();
     $focus = new Opportunity();
     $focus->id = __CLASS__;
     $focus->currency_id = $currency->id;
     $focus->team_id = '1';
     $editView = new EditView();
     $editView->showVCRControl = false;
     $editView->view = 'EditView';
     $editView->setup('Opportunities', $focus);
     $editView->process();
     $currency->mark_deleted($currency->id);
     $this->assertRegExp('/<option value="' . $focus->currency_id . '" selected>/sim', $editView->fieldDefs['currency_id']['value'], 'No selected option here');
 }
开发者ID:thsonvt,项目名称:sugarcrm_dev,代码行数:29,代码来源:Bug48570Test.php

示例3: Currency

 require_once 'modules/Currencies/ListCurrency.php';
 require_once 'modules/Currencies/Currency.php';
 $focus = new Currency();
 $lc = new ListCurrency();
 $lc->handleAdd();
 if (isset($_REQUEST['merge']) && $_REQUEST['merge'] == 'true') {
     $isMerge = true;
 }
 if (isset($_REQUEST['domerge'])) {
     $currencies = $_REQUEST['mergecur'];
     require_once 'modules/Opportunities/Opportunity.php';
     $opp = new Opportunity();
     $opp->update_currency_id($currencies, $_REQUEST['mergeTo']);
     foreach ($currencies as $cur) {
         if ($cur != $_REQUEST['mergeTo']) {
             $focus->mark_deleted($cur);
         }
     }
 }
 $lc->lookupCurrencies();
 if (isset($focus->id)) {
     $focus_id = $focus->id;
 } else {
     $focus_id = '';
 }
 $merge_button = '';
 $pretable = '';
 if (isset($_REQUEST['doAction']) && $_REQUEST['doAction'] == 'merge' || isset($isMerge) && !$isMerge) {
     $merge_button = '<form name= "MERGE" method="POST" action="index.php"><input type="hidden" name="module" value="Currencies"><input type="hidden" name="record" value="' . $focus_id . '"><input type="hidden" name="action" value="index"><input type="hidden" name="merge" value="true"><input title="' . $mod_strings['LBL_MERGE'] . '" accessKey="' . $mod_strings['LBL_MERGE'] . '" class="button"  type="submit" name="button" value="' . $mod_strings['LBL_MERGE'] . '" ></form>';
 }
 if (isset($isMerge) && $isMerge) {
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:index.php

示例4: Currency

/*********************************************************************************
 * The contents of this file are subject to the SugarCRM Public License Version
 * 1.1.3 ("License"); You may not use this file except in compliance with the
 * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied.  See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * All copies of the Covered Code must include on each user interface screen:
 *    (i) the "Powered by SugarCRM" logo and
 *    (ii) the SugarCRM copyright notice
 * in the same form as they appear in the distribution.  See full license for
 * requirements.
 *
 * The Original Code is: SugarCRM Open Source
 * The Initial Developer of the Original Code is SugarCRM, Inc.
 * Portions created by SugarCRM are Copyright (C) 2004-2006 SugarCRM, Inc.;
 * All Rights Reserved.
 * Contributor(s): ______________________________________.
 ********************************************************************************/
/*********************************************************************************
 ********************************************************************************/
require_once 'modules/Currencies/Currency.php';
global $mod_strings;
$focus = new Currency();
if (!isset($_REQUEST['record'])) {
    sugar_die($mod_strings['ERR_DELETE_RECORD']);
}
$focus->mark_deleted($_REQUEST['record']);
header("Location: index.php?module=" . $_REQUEST['return_module'] . "&action=" . $_REQUEST['return_action'] . "&record=" . $_REQUEST['return_id']);
开发者ID:BackupTheBerlios,项目名称:livealphaprint,代码行数:31,代码来源:Delete.php

示例5: testsave

 public function testsave()
 {
     $currency = new Currency();
     $currency->name = 'Rand';
     $currency->iso4217 = 'R';
     $currency->symbol = 'SA Rand';
     $currency->conversion_rate = '2';
     $currency->save();
     //test for record ID to verify that record is saved
     $this->assertTrue(isset($currency->id));
     $this->assertEquals(36, strlen($currency->id));
     //mark the record as deleted and verify that this record cannot be retrieved anymore.
     $currency->mark_deleted($currency->id);
     $result = $currency->retrieve($currency->id);
     $this->assertEquals(-99, $result->id);
 }
开发者ID:sacredwebsite,项目名称:SuiteCRM,代码行数:16,代码来源:CurrencyTest.php


注:本文中的Currency::mark_deleted方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。