[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
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: Saves an Account record and then redirects the browser to the 18 * defined return URL. 19 * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc. 20 * All Rights Reserved. 21 * Contributor(s): ______________________________________.. 22 ********************************************************************************/ 23 24 require_once ('modules/Campaigns/Campaigns.php'); 25 require_once ('include/logging.php'); 26 require_once ('include/database/PearDatabase.php'); 27 28 $focus = new Campaigns(); 29 global $current_user; 30 $currencyid=fetchCurrency($current_user->id); 31 $rate_symbol = getCurrencySymbolandCRate($currencyid); 32 $rate = $rate_symbol['rate']; 33 setObjectValuesFromRequest(&$focus); 34 35 if(isset($_REQUEST['expectedrevenue'])) 36 { 37 $value = convertToDollar($_REQUEST['expectedrevenue'],$rate); 38 $focus->column_fields['expectedrevenue'] = $value; 39 } 40 if(isset($_REQUEST['budgetcost'])) 41 { 42 $value = convertToDollar($_REQUEST['budgetcost'],$rate); 43 $focus->column_fields['budgetcost'] = $value; 44 } 45 if(isset($_REQUEST['actualcost'])) 46 { 47 $value = convertToDollar($_REQUEST['actualcost'],$rate); 48 $focus->column_fields['actualcost'] = $value; 49 } 50 if(isset($_REQUEST['actualroi'])) 51 { 52 $value = convertToDollar($_REQUEST['actualroi'],$rate); 53 $focus->column_fields['actualroi'] = $value; 54 } 55 if(isset($_REQUEST['expectedroi'])) 56 { 57 $value = convertToDollar($_REQUEST['expectedroi'],$rate); 58 $focus->column_fields['expectedroi'] = $value; 59 } 60 61 62 $focus->save("Campaigns"); 63 $return_id = $focus->id; 64 65 if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = $_REQUEST['return_module']; 66 else $return_module = "Campaigns"; 67 if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = $_REQUEST['return_action']; 68 else $return_action = "DetailView"; 69 if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = $_REQUEST['return_id']; 70 71 header("Location: index.php?action=$return_action&module=$return_module&record=$return_id"); 72 ?>
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 |