更新到 5.2 正式版后第一次 SVN 提交。

[email protected]


git-svn-id: https://svn.code.sf.net/p/hawebs/svn@630 a2543c7e-f6e9-4f8a-8bff-1ffc34733512
This commit is contained in:
YuCheng Hu
2010-11-16 15:40:44 +00:00
parent d6c0eb72eb
commit 4d16fc224b
29 changed files with 3895 additions and 0 deletions
@@ -0,0 +1,85 @@
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
require_once('Smarty_setup.php');
//Redirecting Header for single page layout
require_once('user_privileges/default_module_view.php');
global $singlepane_view;
$currentmodule = vtlib_purify($_REQUEST['module']);
$RECORD = vtlib_purify($_REQUEST['record']);
$category = getParentTab();
if($singlepane_view == 'true' && $_REQUEST['action'] == 'CallRelatedList' ) {
header("Location:index.php?action=DetailView&module=$currentmodule&record=$RECORD&parenttab=$category");
} else {
$focus = CRMEntity::getInstance($currentmodule);
if(isset($_REQUEST['record']) && $_REQUEST['record']!='') {
$focus->retrieve_entity_info($RECORD,$currentmodule);
$focus->id = $RECORD;
$focus->name=$focus->column_fields['potentialname'];
$log->debug("id is ".$focus->id);
$log->debug("name is ".$focus->name);
}
global $mod_strings;
global $app_strings;
global $currentModule;
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
$smarty = new vtigerCRM_Smarty;
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
}
if(isset($_REQUEST['mode']) && $_REQUEST['mode'] != ' ') {
$smarty->assign("OP_MODE",vtlib_purify($_REQUEST['mode']));
}
if (isset($focus->name)) $smarty->assign("NAME", $focus->name);
$related_array = getRelatedLists($currentModule,$focus);
$smarty->assign("RELATEDLISTS", $related_array);
require_once('include/ListView/RelatedListViewSession.php');
if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) {
$relationId = vtlib_purify($_REQUEST['relation_id']);
RelatedListViewSession::addRelatedModuleToSession($relationId,
vtlib_purify($_REQUEST['selected_header']));
}
$open_related_modules = RelatedListViewSession::getRelatedModulesFromSession();
$smarty->assign("SELECTEDHEADERS", $open_related_modules);
$smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar'));
$smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events'));
$smarty->assign("CATEGORY",$category);
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
$smarty->assign("ID",$focus->id);
$smarty->assign("MODULE",$currentModule);
$smarty->assign("SINGLE_MOD",$app_strings['Potential']);
$smarty->assign("MOD",$mod_strings);
$smarty->assign("APP",$app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
//$smarty->assign("ACCOUNTID",$focus->column_fields['account_id']);
// Module Sequence Numbering
$mod_seq_field = getModuleSequenceField($currentModule);
if ($mod_seq_field != null) {
$mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
} else {
$mod_seq_id = $focus->id;
}
$smarty->assign('MOD_SEQ_ID', $mod_seq_id);
// END
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
$smarty->display("RelatedLists.tpl");
}
?>
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,14 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
include('modules/CustomView/index.php');
?>
@@ -0,0 +1,35 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Potentials/Delete.php,v 1.9 2005/03/16 10:31:13 rank Exp $
* Description: TODO: To be written.
********************************************************************************/
global $currentModule;
$focus = CRMEntity::getInstance($currentModule);
require_once('include/logging.php');
$log = LoggerManager::getLogger('contact_delete');
//Added to fix 4600
$url = getBasic_Advance_SearchURL();
if(!isset($_REQUEST['record']))
die("A record number must be specified to delete the opportunity.");
DeleteEntity($_REQUEST['module'],$_REQUEST['return_module'],$focus,$_REQUEST['record'],$_REQUEST['return_id']);
header("Location: index.php?module=".vtlib_purify($_REQUEST['return_module'])."&action=".vtlib_purify($_REQUEST['return_action'])."&record=".vtlib_purify($_REQUEST['return_id'])."&relmodule=".vtlib_purify($_REQUEST['module'])."&parenttab=".getParentTab().$url);
?>
@@ -0,0 +1,142 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Potentials/DetailView.php,v 1.28 2005/04/18 10:37:49 samk Exp $
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('Smarty_setup.php');
require_once('data/Tracker.php');
require_once('include/CustomFieldUtil.php');
require_once('include/utils/utils.php');
require_once('user_privileges/default_module_view.php');
global $mod_strings;
global $app_strings;
global $currentModule, $singlepane_view;
$focus = CRMEntity::getInstance($currentModule);
$smarty = new vtigerCRM_Smarty;
if(isset($_REQUEST['record']) && $_REQUEST['record']!='') {
$focus->retrieve_entity_info($_REQUEST['record'],"Potentials");
$focus->id = $_REQUEST['record'];
$focus->name=$focus->column_fields['potentialname'];
}
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
}
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
$log->info("Potential detail view");
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
$smarty->assign("ID", $focus->id);
// Module Sequence Numbering
$mod_seq_field = getModuleSequenceField($currentModule);
if ($mod_seq_field != null) {
$mod_seq_id = $focus->column_fields[$mod_seq_field['name']];
} else {
$mod_seq_id = $focus->id;
}
$smarty->assign('MOD_SEQ_ID', $mod_seq_id);
// END
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
if (isset($focus->name)) $smarty->assign("NAME", $focus->name);
else $smarty->assign("NAME", "");
$smarty->assign("BLOCKS", getBlocks($currentModule,"detail_view",'',$focus->column_fields));
$smarty->assign("CUSTOMFIELD", $cust_fld);
$smarty->assign("SINGLE_MOD", 'Opportunity');
$category = getParentTab();
$smarty->assign("CATEGORY",$category);
if(isPermitted("Potentials","EditView",$_REQUEST['record']) == 'yes')
$smarty->assign("EDIT_DUPLICATE","permitted");
if(isPermitted("Invoice","EditView",$_REQUEST['record']) == 'yes')
$smarty->assign("CONVERTINVOICE","permitted");
if(isPermitted("Potentials","Delete",$_REQUEST['record']) == 'yes')
$smarty->assign("DELETE","permitted");
$tabid = getTabid("Potentials");
$validationData = getDBValidationData($focus->tab_name,$tabid);
$data = split_validationdataArray($validationData);
$smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
$smarty->assign("CONVERTMODE",'potentoinvoice');
$smarty->assign("MODULE","Potentials");
$smarty->assign("EDIT_PERMISSION",isPermitted($currentModule,'EditView',$_REQUEST['record']));
if($singlepane_view == 'true')
{
$related_array = getRelatedLists($currentModule,$focus);
$smarty->assign("RELATEDLISTS", $related_array);
require_once('include/ListView/RelatedListViewSession.php');
if(!empty($_REQUEST['selected_header']) && !empty($_REQUEST['relation_id'])) {
RelatedListViewSession::addRelatedModuleToSession(vtlib_purify($_REQUEST['relation_id']),
vtlib_purify($_REQUEST['selected_header']));
}
$open_related_modules = RelatedListViewSession::getRelatedModulesFromSession();
$smarty->assign("SELECTEDHEADERS", $open_related_modules);
}
$smarty->assign("IS_REL_LIST",isPresentRelatedLists($currentModule));
$smarty->assign("SinglePane_View", $singlepane_view);
$smarty->assign("TODO_PERMISSION",CheckFieldPermission('parent_id','Calendar'));
$smarty->assign("EVENT_PERMISSION",CheckFieldPermission('parent_id','Events'));
if(PerformancePrefs::getBoolean('DETAILVIEW_RECORD_NAVIGATION', true) && isset($_SESSION[$currentModule.'_listquery'])){
$recordNavigationInfo = ListViewSession::getListViewNavigation($focus->id);
VT_detailViewNavigation($smarty,$recordNavigationInfo,$focus->id);
}
// Record Change Notification
$focus->markAsViewed($current_user->id);
// END
// Gather the custom link information to display
include_once('vtlib/Vtiger/Link.php');
$customlink_params = Array('MODULE'=>$currentModule, 'RECORD'=>$focus->id, 'ACTION'=>vtlib_purify($_REQUEST['action']));
$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('DETAILVIEWBASIC','DETAILVIEW','DETAILVIEWWIDGET'), $customlink_params));
// END
$smarty->assign('DETAILVIEW_AJAX_EDIT', PerformancePrefs::getBoolean('DETAILVIEW_AJAX_EDIT', true));
$smarty->display("DetailView.tpl");
?>
@@ -0,0 +1,52 @@
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
require_once('include/logging.php');
require_once('include/database/PearDatabase.php');
global $adb;
$local_log =& LoggerManager::getLogger('PotentialsAjax');
global $currentModule;
$modObj = CRMEntity::getInstance($currentModule);
$ajaxaction = $_REQUEST["ajxaction"];
if($ajaxaction == "DETAILVIEW")
{
$crmid = $_REQUEST["recordid"];
$tablename = $_REQUEST["tableName"];
$fieldname = $_REQUEST["fldName"];
$fieldvalue = utf8RawUrlDecode($_REQUEST["fieldValue"]);
if($crmid != "")
{
$modObj->retrieve_entity_info($crmid,"Potentials");
$modObj->column_fields[$fieldname] = $fieldvalue;
$_REQUEST[$fieldname] = $fieldvalue;
if($fieldname == 'amount')//amount converted to dollar value while saving
{
$modObj->column_fields[$fieldname] = getConvertedPrice($fieldvalue);
}
$modObj->id = $crmid;
$modObj->mode = "edit";
$modObj->save("Potentials");
if($modObj->id != "")
{
echo ":#:SUCCESS";
}else
{
echo ":#:FAILURE";
}
}else
{
echo ":#:FAILURE";
}
} elseif($ajaxaction == "LOADRELATEDLIST" || $ajaxaction == "DISABLEMODULE") {
require_once 'include/ListView/RelatedListViewContents.php';
}
?>
@@ -0,0 +1,164 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Potentials/EditView.php,v 1.16 2005/03/24 16:18:38 samk Exp $
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('Smarty_setup.php');
require_once('data/Tracker.php');
require_once('include/CustomFieldUtil.php');
require_once('include/utils/utils.php');
global $app_strings;
global $mod_strings;
global $currentModule;
$focus = CRMEntity::getInstance($currentModule);
$smarty = new vtigerCRM_Smarty();
//added to fix the issue4600
$searchurl = getBasic_Advance_SearchURL();
$smarty->assign("SEARCH", $searchurl);
//4600 ends
if(isset($_REQUEST['record']) && $_REQUEST['record'] != ''){
$focus->id = $_REQUEST['record'];
$focus->mode = 'edit';
$focus->retrieve_entity_info($_REQUEST['record'],"Potentials");
$focus->name=$focus->column_fields['potentialname'];
}
//adding support for uitype 10
if(!empty($_REQUEST['contact_id'])){
$focus->column_fields['related_to'] = $_REQUEST['contact_id'];
}elseif(!empty($_REQUEST['account_id'])){
$focus->column_fields['related_to'] = $_REQUEST['account_id'];
}
if(isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') {
$focus->id = "";
$focus->mode = '';
}
if(empty($_REQUEST['record']) && $focus->mode != 'edit'){
setObjectValuesFromRequest($focus);
}
$disp_view = getView($focus->mode);
if($disp_view == 'edit_view')
$smarty->assign("BLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields));
else
{
$smarty->assign("BASBLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields,'BAS'));
}
$smarty->assign("OP_MODE",$disp_view);
$category = getParentTab();
$smarty->assign("CATEGORY",$category);
//needed when creating a new opportunity with a default vtiger_account value passed in
if (isset($_REQUEST['accountname']) && is_null($focus->accountname)) {
$focus->accountname = $_REQUEST['accountname'];
}
if (isset($_REQUEST['accountid']) && is_null($focus->related_to)) {
$focus->related_to = $_REQUEST['accountid'];
}
if (isset($_REQUEST['contactid']) && is_null($focus->related_to)) {
$focus->related_to = $_REQUEST['contactid'];
}
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
$log->info("Potential detail view");
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
if (isset($focus->name))
$smarty->assign("NAME", $focus->name);
else
$smarty->assign("NAME", "");
if(isset($cust_fld))
{
$smarty->assign("CUSTOMFIELD", $cust_fld);
}
if($focus->mode == 'edit')
{
$smarty->assign("UPDATEINFO",updateInfo($focus->id));
$smarty->assign("MODE", $focus->mode);
}
// Unimplemented until jscalendar language vtiger_files are fixed
$smarty->assign("CALENDAR_LANG", $app_strings['LBL_JSCALENDAR_LANG']);
$smarty->assign("CALENDAR_DATEFORMAT", parse_calendardate($app_strings['NTC_DATE_FORMAT']));
if (isset($_REQUEST['return_module']))
$smarty->assign("RETURN_MODULE", vtlib_purify($_REQUEST['return_module']));
if (isset($_REQUEST['return_action']))
$smarty->assign("RETURN_ACTION", vtlib_purify($_REQUEST['return_action']));
if (isset($_REQUEST['return_id']))
$smarty->assign("RETURN_ID", vtlib_purify($_REQUEST['return_id']));
if (isset($_REQUEST['return_viewname']))
$smarty->assign("RETURN_VIEWNAME", vtlib_purify($_REQUEST['return_viewname']));
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);$smarty->assign("PRINT_URL", "phprint.php?jt=".session_id().$GLOBALS['request_string']);
$smarty->assign("ID", $focus->id);
$smarty->assign("MODULE",$currentModule);
$smarty->assign("SINGLE_MOD",'Potential');
$tabid = getTabid("Potentials");
$validationData = getDBValidationData($focus->tab_name,$tabid);
$data = split_validationdataArray($validationData);
$smarty->assign("VALIDATION_DATA_FIELDNAME",$data['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$data['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL",$data['fieldlabel']);
//fix for potential duplicate header
$smarty->assign("DUPLICATE",vtlib_purify($_REQUEST['isDuplicate']));
$check_button = Button_Check($module);
$smarty->assign("CHECK", $check_button);
global $adb;
// Module Sequence Numbering
$mod_seq_field = getModuleSequenceField($currentModule);
if($focus->mode != 'edit' && $mod_seq_field != null) {
$autostr = getTranslatedString('MSG_AUTO_GEN_ON_SAVE');
$mod_seq_string = $adb->pquery("SELECT prefix, cur_id from vtiger_modentity_num where semodule = ? and active=1",array($currentModule));
$mod_seq_prefix = $adb->query_result($mod_seq_string,0,'prefix');
$mod_seq_no = $adb->query_result($mod_seq_string,0,'cur_id');
if($adb->num_rows($mod_seq_string) == 0 || $focus->checkModuleSeqNumber($focus->table_name, $mod_seq_field['column'], $mod_seq_prefix.$mod_seq_no))
echo '<br><font color="#FF0000"><b>'. getTranslatedString('LBL_DUPLICATE'). ' '. getTranslatedString($mod_seq_field['label'])
.' - '. getTranslatedString('LBL_CLICK') .' <a href="index.php?module=Settings&action=CustomModEntityNo&parenttab=Settings&selmodule='.$currentModule.'">'.getTranslatedString('LBL_HERE').'</a> '
. getTranslatedString('LBL_TO_CONFIGURE'). ' '. getTranslatedString($mod_seq_field['label']) .'</b></font>';
else
$smarty->assign("MOD_SEQ_ID",$autostr);
} else {
$smarty->assign("MOD_SEQ_ID", $focus->column_fields[$mod_seq_field['name']]);
}
// END
if($focus->mode == 'edit')
$smarty->display("salesEditView.tpl");
else
$smarty->display("CreateView.tpl");
?>
@@ -0,0 +1,13 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once('include/utils/ExportRecords.php');
?>
@@ -0,0 +1,106 @@
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
require_once('Smarty_setup.php');
require_once('include/utils/utils.php');
require_once('database/DatabaseConnection.php');
global $mod_strings, $app_strings, $app_list_strings;
global $current_language, $currentModule, $current_userid, $theme;
require_once('themes/'.$theme.'/layout_utils.php');
$req_module = vtlib_purify($_REQUEST['module']);
$focus = CRMEntity::getInstance($req_module);
$return_module=vtlib_purify($_REQUEST['module']);
$delete_idstring=vtlib_purify($_REQUEST['idlist']);
$parenttab = getParenttab();
$smarty = new vtigerCRM_Smarty;
$ids_list = array();
$errormsg = '';
if(isset($_REQUEST['del_rec']))
{
$url = getBasic_Advance_SearchURL();
$delete_id_array=explode(",",$delete_idstring,-1);
foreach ($delete_id_array as $id)
{
if(isPermitted($req_module,'Delete',$id) == 'yes') {
$sql="update vtiger_crmentity set deleted=1 where crmid=?";
$result = $adb->pquery($sql, array($id));
DeleteEntity($req_module,$return_module,$focus,$id,"");
}
else {
$ids_list[] = $id;
}
}
if(count($ids_list) > 0) {
$ret = getEntityName($req_module,$ids_list);
if(count($ret) > 0)
{
$errormsg = implode(',',$ret);
}
echo "<table border='0' cellpadding='5' cellspacing='0' width='100%' height='450px'><tr><td align='center'>";
echo "<div style='border: 3px solid rgb(153, 153, 153); background-color: rgb(255, 255, 255); width: 55%; position: relative; z-index: 10000000;'>
<table border='0' cellpadding='5' cellspacing='0' width='98%'>
<tbody><tr>
<td rowspan='2' width='11%'><img src='". vtiger_imageurl('denied.gif', $theme) ."' ></td>
<td style='border-bottom: 1px solid rgb(204, 204, 204);' nowrap='nowrap' width='70%'>
<span class='genHeaderSmall'>$app_strings[LBL_DUP_PERMISSION] $req_module $errormsg</span></td>
</tr>
<tr>
<td class='small' align='right' nowrap='nowrap'>
<a href='javascript:window.location.reload();'>$app_strings[LBL_GO_BACK]</a><br>
</td>
</tr>
</tbody></table>
</div>";
echo "</td></tr></table>";
exit;
}
}
include("include/saveMergeCriteria.php");
$ret_arr=getDuplicateRecordsArr($req_module);
$fld_values=$ret_arr[0];
$total_num_group=count($fld_values);
$fld_name=$ret_arr[1];
$ui_type=$ret_arr[2];
$smarty->assign("NAVIGATION",$ret_arr["navigation"]);//Added for page navigation
$smarty->assign("MODULE",$req_module);
$smarty->assign("NUM_GROUP",$total_num_group);
$smarty->assign("FIELD_NAMES",$fld_name);
$smarty->assign("CATEGORY",$parenttab);
$smarty->assign("ALL_VALUES",$fld_values);
if(isPermitted($req_module,'Delete','') == 'yes')
$button_del = $app_strings['LBL_MASS_DELETE'];
$smarty->assign("DELETE",$button_del);
$smarty->assign("MOD", return_module_language($current_language,$req_module));
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH",$image_path);
$smarty->assign("APP", $app_strings);
$smarty->assign("CMOD", $mod_strings);
$smarty->assign("MODE",'view');
if(isset($_REQUEST['button_view']))
{
$smarty->assign("VIEW",'true');
}
if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')
$smarty->display("FindDuplicateAjax.tpl");
else
$smarty->display('FindDuplicateDisplay.tpl');
?>
@@ -0,0 +1,45 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* $Header$
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
include('modules/Import/index.php');
?>
@@ -0,0 +1,267 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
require_once('Smarty_setup.php');
require_once("data/Tracker.php");
require_once('modules/Potentials/Potentials.php');
require_once('include/logging.php');
require_once('include/ListView/ListView.php');
require_once('include/utils/utils.php');
require_once('modules/CustomView/CustomView.php');
require_once('include/database/Postgres8.php');
global $app_strings,$list_max_entries_per_page,$mod_strings;
$log = LoggerManager::getLogger('potential_list');
global $currentModule,$theme;
$category = getParentTab();
if (!isset($where)) $where = "";
$url_string = ''; // assigning http url string
$focus = new Potentials();
// Initialize sort by fields
$focus->initSortbyField('Potentials');
// END
$smarty = new vtigerCRM_Smarty();
$other_text = Array();
if(!$_SESSION['lvs'][$currentModule])
{
unset($_SESSION['lvs']);
$modObj = new ListViewSession();
$modObj->sorder = $sorder;
$modObj->sortby = $order_by;
$_SESSION['lvs'][$currentModule] = get_object_vars($modObj);
}
if($_REQUEST['errormsg'] != '')
{
$errormsg = vtlib_purify($_REQUEST['errormsg']);
$smarty->assign("ERROR","The User does not have permission to Change/Delete ".$errormsg." ".$currentModule);
}else
{
$smarty->assign("ERROR","");
}
//<<<<<<<<<<<<<<<<<<< sorting - stored in session >>>>>>>>>>>>>>>>>>>>
$sorder = $focus->getSortOrder();
$order_by = $focus->getOrderBy();
$_SESSION['POTENTIALS_ORDER_BY'] = $order_by;
$_SESSION['POTENTIALS_SORT_ORDER'] = $sorder;
//<<<<<<<<<<<<<<<<<<< sorting - stored in session >>>>>>>>>>>>>>>>>>>>
//<<<<cutomview>>>>>>>
$oCustomView = new CustomView("Potentials");
$viewid = $oCustomView->getViewId($currentModule);
$customviewcombo_html = $oCustomView->getCustomViewCombo($viewid);
$viewnamedesc = $oCustomView->getCustomViewByCvid($viewid);
//To check if a user is able to edit/delete a customview
$edit_permit = $oCustomView->isPermittedCustomView($viewid,'EditView',$currentModule);
$delete_permit = $oCustomView->isPermittedCustomView($viewid,'Delete',$currentModule);
$smarty->assign("CV_EDIT_PERMIT",$edit_permit);
$smarty->assign("CV_DELETE_PERMIT",$delete_permit);
//Added to handle approving or denying status-public by the admin in CustomView
$statusdetails = $oCustomView->isPermittedChangeStatus($viewnamedesc['status']);
$smarty->assign("CUSTOMVIEW_PERMISSION",$statusdetails);
//<<<<<customview>>>>>
$smarty->assign("CHANGE_OWNER",getUserslist());
$smarty->assign("CHANGE_GROUP_OWNER",getGroupslist());
if(isPermitted('Potentials','Delete','') == 'yes')
{
$other_text['del'] = $app_strings[LBL_MASS_DELETE];
}
if(isPermitted('Potentials','EditView','') == 'yes')
{
$other_text['mass_edit'] = $app_strings[LBL_MASS_EDIT];
$other_text['c_owner'] = $app_strings[LBL_CHANGE_OWNER];
}
if($viewnamedesc['viewname'] == 'All')
{
$smarty->assign("ALL", 'All');
}
//Retreive the list from Database
//<<<<<<<<<customview>>>>>>>>>
global $current_user;
$queryGenerator = new QueryGenerator($currentModule, $current_user);
if ($viewid != "0") {
$queryGenerator->initForCustomViewById($viewid);
} else {
$queryGenerator->initForDefaultCustomView();
}
//<<<<<<<<customview>>>>>>>>>
if(isset($_REQUEST['query']) && $_REQUEST['query'] == 'true') {
$queryGenerator->addUserSearchConditions($_REQUEST);
$ustring = getSearchURL($_REQUEST);
// we have a query
$url_string .="&query=true".$ustring;
$smarty->assign("SEARCH_URL",$url_string);
}
$list_query = $queryGenerator->getQuery();
$where = $queryGenerator->getConditionalWhere();
if(isset($where) && $where != '')
{
if(isset($_REQUEST['from_dashboard']) && $_REQUEST['from_dashboard'] == 'true')
$list_query .= " AND vtiger_potential.sales_stage = '".$mod_strings['Closed Won']."' AND ".$where;
elseif(isset($_REQUEST['from_homepagedb']) && $_REQUEST['from_homepagedb'] == 'true')
$list_query .= " AND vtiger_potential.sales_stage not in( '".$mod_strings['Closed Won']."' , '".$mod_strings['Closed Lost']."' )AND ".$where;
$_SESSION['export_where'] = $where;
}
else
unset($_SESSION['export_where']);
if(isset($order_by) && $order_by != '')
{
if($order_by == 'smownerid')
{
if( $adb->dbType == "pgsql")
$list_query .= ' GROUP BY user_name';
$list_query .= ' ORDER BY user_name '.$sorder;
}
else
{
$tablename = getTableNameForField('Potentials',$order_by);
$tablename = (($tablename != '')?($tablename."."):'');
if( $adb->dbType == "pgsql")
$list_query .= ' GROUP BY '.$tablename.$order_by;
$list_query .= ' ORDER BY '.$tablename.$order_by.' '.$sorder;
}
}
if($viewid ==0)
{
echo "<table border='0' cellpadding='5' cellspacing='0' width='100%' height='450px'><tr><td align='center'>";
echo "<div style='border: 3px solid rgb(153, 153, 153); background-color: rgb(255, 255, 255); width: 55%; position: relative; z-index: 10000000;'>
<table border='0' cellpadding='5' cellspacing='0' width='98%'>
<tbody><tr>
<td rowspan='2' width='11%'><img src='". vtiger_imageurl('denied.gif', $theme) ."' ></td>
<td style='border-bottom: 1px solid rgb(204, 204, 204);' nowrap='nowrap' width='70%'><span clas
s='genHeaderSmall'>$app_strings[LBL_PERMISSION]</span></td>
</tr>
<tr>
<td class='small' align='right' nowrap='nowrap'>
<a href='javascript:window.history.back();'>$app_strings[LBL_GO_BACK]</a><br>
</td>
</tr>
</tbody></table>
</div>";
echo "</td></tr></table>";
exit;
}
//Constructing the list view
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH",$image_path);
$smarty->assign("CUSTOMVIEW_OPTION",$customviewcombo_html);
$smarty->assign("VIEWID", $viewid);
$smarty->assign("MODULE",$currentModule);
$smarty->assign("SINGLE_MOD",'Opportunity');
$smarty->assign("BUTTONS",$other_text);
$smarty->assign("CATEGORY",$category);
//Postgres 8 fixes
if( $adb->dbType == "pgsql")
$list_query = fixPostgresQuery( $list_query, $log, 0);
if(PerformancePrefs::getBoolean('LISTVIEW_COMPUTE_PAGE_COUNT', false) === true){
$count_result = $adb->query( mkCountQuery( $list_query));
$noofrows = $adb->query_result($count_result,0,"count");
}else{
$noofrows = null;
}
$queryMode = (isset($_REQUEST['query']) && $_REQUEST['query'] == 'true');
$start = ListViewSession::getRequestCurrentPage($currentModule, $list_query, $viewid, $queryMode);
$navigation_array = VT_getSimpleNavigationValues($start,$list_max_entries_per_page,$noofrows);
$limit_start_rec = ($start-1) * $list_max_entries_per_page;
if( $adb->dbType == "pgsql")
$list_result = $adb->pquery($list_query. " OFFSET $limit_start_rec LIMIT $list_max_entries_per_page", array());
else
$list_result = $adb->pquery($list_query. " LIMIT $limit_start_rec, $list_max_entries_per_page", array());
$recordListRangeMsg = getRecordRangeMessage($list_result, $limit_start_rec,$noofrows);
$smarty->assign('recordListRange',$recordListRangeMsg);
//Retreive the List View Table Header
if($viewid !='')
$url_string .="&viewname=".$viewid;
$controller = new ListViewController($adb, $current_user, $queryGenerator);
$listview_header = $controller->getListViewHeader($focus,$currentModule,$url_string,$sorder,
$order_by);
$smarty->assign("LISTHEADER", $listview_header);
$listview_header_search = $controller->getBasicSearchFieldInfoList();
$smarty->assign("SEARCHLISTHEADER", $listview_header_search);
$listview_entries = $controller->getListViewEntries($focus,$currentModule,$list_result,
$navigation_array);
$smarty->assign("LISTHEADER", $listview_header);
$smarty->assign("LISTENTITY", $listview_entries);
$smarty->assign("AVALABLE_FIELDS", getMergeFields($currentModule,"available_fields"));
$smarty->assign("FIELDS_TO_MERGE", getMergeFields($currentModule,"fileds_to_merge"));
//Added to select Multiple records in multiple pages
$smarty->assign("SELECTEDIDS", vtlib_purify($_REQUEST['selobjs']));
$smarty->assign("ALLSELECTEDIDS", vtlib_purify($_REQUEST['allselobjs']));
$smarty->assign("CURRENT_PAGE_BOXES", implode(array_keys($listview_entries),";"));
$navigationOutput = getTableHeaderSimpleNavigation($navigation_array, $url_string,"Potentials","index",$viewid);
$alphabetical = AlphabeticalSearch($currentModule,'index','potentialname','true','basic',"","","","",$viewid);
$fieldnames = $controller->getAdvancedSearchOptionString();
$criteria = getcriteria_options();
$smarty->assign("CRITERIA", $criteria);
$smarty->assign("FIELDNAMES", $fieldnames);
$smarty->assign("ALPHABETICAL", $alphabetical);
$smarty->assign("NAVIGATION", $navigationOutput);
$smarty->assign("SELECT_SCRIPT", $view_script);
$check_button = Button_Check($currentModule);
$smarty->assign("CHECK", $check_button);
ListViewSession::setSessionQuery($currentModule,$list_query,$viewid);
// Gather the custom link information to display
include_once('vtlib/Vtiger/Link.php');
$customlink_params = Array('MODULE'=>$currentModule, 'ACTION'=>vtlib_purify($_REQUEST['action']), 'CATEGORY'=> $category);
$smarty->assign('CUSTOM_LINKS', Vtiger_Link::getAllByType(getTabid($currentModule), Array('LISTVIEWBASIC','LISTVIEW'), $customlink_params));
// END
if(isset($_REQUEST['ajax']) && $_REQUEST['ajax'] != '')
$smarty->display("ListViewEntries.tpl");
else
$smarty->display("ListView.tpl");
?>
@@ -0,0 +1,11 @@
<?php
/*+*******************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
require_once 'include/ListView/ListViewPagging.php';
?>
@@ -0,0 +1,104 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Potentials/ListViewTop.php,v 1.18 2005/04/20 20:24:30 ray Exp $
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
/**Function to get the top 5 Potentials order by Amount in Descending Order
*return array $values - array with the title, header and entries like Array('Title'=>$title,'Header'=>$listview_header,'Entries'=>$listview_entries) where as listview_header and listview_entries are arrays of header and entity values which are returned from function getListViewHeader and getListViewEntries
*/
function getTopPotentials($maxval,$calCnt)
{
$log = LoggerManager::getLogger('top opportunity_list');
$log->debug("Entering getTopPotentials() method ...");
require_once("data/Tracker.php");
require_once('modules/Potentials/Potentials.php');
require_once('include/logging.php');
require_once('include/ListView/ListView.php');
global $app_strings;
global $adb;
global $current_language;
global $current_user;
$current_module_strings = return_module_language($current_language, "Potentials");
$title=array();
$title[]='myTopOpenPotentials.gif';
$title[]=$current_module_strings['LBL_TOP_OPPORTUNITIES'];
$title[]='home_mypot';
$where = "AND vtiger_potential.potentialid > 0 AND vtiger_potential.sales_stage not in ('Closed Won','Closed Lost','".$current_module_strings['Closed Won']."','".$current_module_strings['Closed Lost']."') AND vtiger_crmentity.smownerid='".$current_user->id."' AND vtiger_potential.amount > 0";
$header=array();
$header[]=$current_module_strings['LBL_LIST_OPPORTUNITY_NAME'];
//$header[]=$current_module_strings['LBL_LIST_ACCOUNT_NAME'];
$currencyid=fetchCurrency($current_user->id);
$rate_symbol = getCurrencySymbolandCRate($currencyid);
$rate = $rate_symbol['rate'];
$curr_symbol = $rate_symbol['symbol'];
$header[]=$current_module_strings['LBL_LIST_AMOUNT'].'('.$curr_symbol.')';
$list_query = "SELECT vtiger_crmentity.crmid, vtiger_potential.potentialname,
vtiger_potential.amount, potentialid
FROM vtiger_potential
IGNORE INDEX(PRIMARY) INNER JOIN vtiger_crmentity
ON vtiger_crmentity.crmid = vtiger_potential.potentialid";
$list_query .= getNonAdminAccessControlQuery('Potentials',$current_user);
$list_query .= "WHERE vtiger_crmentity.deleted = 0 ".$where;
$list_query .=" ORDER BY amount DESC";
$list_query .=" LIMIT " . $adb->sql_escape_string($maxval);
if($calCnt == 'calculateCnt') {
$list_result_rows = $adb->query(mkCountQuery($list_query));
return $adb->query_result($list_result_rows, 0, 'count');
}
$list_result = $adb->query($list_query);
$open_potentials_list = array();
$noofrows = $adb->num_rows($list_result);
$entries=array();
if ($noofrows) {
for($i=0;$i<$noofrows;$i++)
{
$open_potentials_list[] = Array('name' => $adb->query_result($list_result,$i,'potentialname'),
'id' => $adb->query_result($list_result,$i,'potentialid'),
'amount' => $adb->query_result($list_result,$i,'amount'),
);
$potentialid=$adb->query_result($list_result,$i,'potentialid');
$potentialname = $adb->query_result($list_result,$i,'potentialname');
$Top_Potential = (strlen($potentialname) > 20) ? (substr($potentialname,0,20).'...') : $potentialname;
$value=array();
$value[]='<a href="index.php?action=DetailView&module=Potentials&record='.$potentialid.'">'.$Top_Potential.'</a>';
$value[]=convertFromDollar($adb->query_result($list_result,$i,'amount'),$rate);
$entries[$potentialid]=$value;
}
}
$search_qry = "&query=true&Fields0=assigned_user_id&Condition0=e&Srch_value0=".$current_user->column_fields['user_name']."&Fields1=sales_stage&Condition1=k&Srch_value1=closed&searchtype=advance&search_cnt=2&matchtype=all";
$values=Array('ModuleName'=>'Potentials','Title'=>$title,'Header'=>$header,'Entries'=>$entries,'search_qry'=>$search_qry);
if ( ($display_empty_home_blocks && count($open_potentials_list) == 0 ) || (count($open_potentials_list)>0) )
{
$log->debug("Exiting getTopPotentials method ...");
return $values;
}
}
?>
@@ -0,0 +1,45 @@
<?php
/*+**********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
************************************************************************************/
global $mod_strings,$app_strings,$theme,$currentModule,$current_user;
require_once('Smarty_setup.php');
require_once('include/utils/utils.php');
$focus = CRMEntity::getInstance($currentModule);
$focus->mode = '';
$mode = 'mass_edit';
$disp_view = getView($focus->mode);
$smarty = new vtigerCRM_Smarty;
$smarty->assign("BLOCKS",getBlocks($currentModule,$disp_view,$mode,$focus->column_fields));
$smarty->assign("IDS",$_REQUEST['idstring']);
$smarty->assign("MASS_EDIT","1");
$smarty->assign("MODULE",$currentModule);
$smarty->assign("APP",$app_strings);
$smarty->assign("CATEGORY",getParentTab());
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
// Field Validation Information
$tabid = getTabid($currentModule);
$validationData = getDBValidationData($focus->tab_name,$tabid);
$validationArray = split_validationdataArray($validationData);
$smarty->assign("VALIDATION_DATA_FIELDNAME",$validationArray['fieldname']);
$smarty->assign("VALIDATION_DATA_FIELDDATATYPE",$validationArray['datatype']);
$smarty->assign("VALIDATION_DATA_FIELDLABEL",$validationArray['fieldlabel']);
$smarty->display('MassEditForm.tpl');
?>
@@ -0,0 +1,67 @@
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
global $currentModule;
$focus = CRMEntity::getInstance($currentModule);
$idlist= vtlib_purify($_REQUEST['massedit_recordids']);
$viewid = vtlib_purify($_REQUEST['viewname']);
$return_module = vtlib_purify($_REQUEST['massedit_module']);
$return_action = 'index';
global $rstart;
//Added to fix 4600
$url = getBasic_Advance_SearchURL();
if(isset($_REQUEST['start']) && $_REQUEST['start']!=''){
$rstart = "&start=".vtlib_purify($_REQUEST['start']);
}
if(isset($idlist)) {
$recordids = explode(';', $idlist);
for($index = 0; $index < count($recordids); ++$index) {
$recordid = $recordids[$index];
if($recordid == '') continue;
if(isPermitted($currentModule,'EditView',$recordid) == 'yes') {
// Save each module record with update value.
$focus->retrieve_entity_info($recordid, $currentModule);
$focus->mode = 'edit';
$focus->id = $recordid;
foreach($focus->column_fields as $fieldname => $val)
{
if(isset($_REQUEST[$fieldname."_mass_edit_check"]))
{
if($fieldname == 'assigned_user_id'){
if($_REQUEST['assigntype'] == 'U') {
$value = $_REQUEST['assigned_user_id'];
} elseif($_REQUEST['assigntype'] == 'T') {
$value = $_REQUEST['assigned_group_id'];
}
} else {
if(is_array($_REQUEST[$fieldname]))
$value = $_REQUEST[$fieldname];
else
$value = trim($_REQUEST[$fieldname]);
}
$focus->column_fields[$fieldname] = $value;
}
else{
$focus->column_fields[$fieldname] = decode_html($focus->column_fields[$fieldname]);
}
}
$focus->save($currentModule);
}
}
}
$parenttab = getParentTab();
header("Location: index.php?module=$return_module&action=$return_action&parenttab=$parenttab$rstart");
?>
@@ -0,0 +1,17 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
require_once('Popup.php');
?>
@@ -0,0 +1,89 @@
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
document.write("<script type='text/javascript' src='include/js/Merge.js'></"+"script>");
function set_return(product_id, product_name) {
if(document.getElementById('from_link').value != '') {
window.opener.document.QcEditView.parent_name.value = product_name;
window.opener.document.QcEditView.parent_id.value = product_id;
} else {
window.opener.document.EditView.parent_name.value = product_name;
window.opener.document.EditView.parent_id.value = product_id;
}
}
function set_return_specific(product_id, product_name) {
var fldName = getOpenerObj("potential_name");
var fldId = getOpenerObj("potential_id");
fldName.value = product_name;
fldId.value = product_id;
}
function add_data_to_relatedlist(entity_id,recordid)
{
opener.document.location.href="index.php?module=Emails&action=updateRelations&destination_module=Contacts&entityid="+entity_id+"&parentid="+recordid;
}
function set_return_address(potential_id, potential_name, account_id, account_name, bill_street, ship_street, bill_city, ship_city, bill_state, ship_state, bill_code, ship_code, bill_country, ship_country,bill_pobox,ship_pobox) {
if(typeof(window.opener.document.EditView.potential_name) != 'undefined')
window.opener.document.EditView.potential_name.value = potential_name;
if(typeof(window.opener.document.EditView.potential_id) != 'undefined')
window.opener.document.EditView.potential_id.value = potential_id;
if(typeof(window.opener.document.EditView.account_name) != 'undefined')
window.opener.document.EditView.account_name.value = account_name;
if(typeof(window.opener.document.EditView.account_id) != 'undefined')
window.opener.document.EditView.account_id.value = account_id;
if(typeof(window.opener.document.EditView.bill_street) != 'undefined')
window.opener.document.EditView.bill_street.value = bill_street;
if(typeof(window.opener.document.EditView.ship_street) != 'undefined')
window.opener.document.EditView.ship_street.value = ship_street;
if(typeof(window.opener.document.EditView.bill_city) != 'undefined')
window.opener.document.EditView.bill_city.value = bill_city;
if(typeof(window.opener.document.EditView.ship_city) != 'undefined')
window.opener.document.EditView.ship_city.value = ship_city;
if(typeof(window.opener.document.EditView.bill_state) != 'undefined')
window.opener.document.EditView.bill_state.value = bill_state;
if(typeof(window.opener.document.EditView.ship_state) != 'undefined')
window.opener.document.EditView.ship_state.value = ship_state;
if(typeof(window.opener.document.EditView.bill_code) != 'undefined')
window.opener.document.EditView.bill_code.value = bill_code;
if(typeof(window.opener.document.EditView.ship_code) != 'undefined')
window.opener.document.EditView.ship_code.value = ship_code;
if(typeof(window.opener.document.EditView.bill_country) != 'undefined')
window.opener.document.EditView.bill_country.value = bill_country;
if(typeof(window.opener.document.EditView.ship_country) != 'undefined')
window.opener.document.EditView.ship_country.value = ship_country;
if(typeof(window.opener.document.EditView.bill_pobox) != 'undefined')
window.opener.document.EditView.bill_pobox.value = bill_pobox;
if(typeof(window.opener.document.EditView.ship_pobox) != 'undefined')
window.opener.document.EditView.ship_pobox.value = ship_pobox;
}
function set_return_contact(potential_id, potential_name, contact_id, contact_name) {
if(typeof(window.opener.document.EditView.potential_name) != 'undefined')
window.opener.document.EditView.potential_name.value = potential_name;
if(typeof(window.opener.document.EditView.potential_id) != 'undefined')
window.opener.document.EditView.potential_id.value = potential_id;
if(typeof(window.opener.document.EditView.contact_name) != 'undefined')
window.opener.document.EditView.contact_name.value = contact_name;
if(typeof(window.opener.document.EditView.contact_id) != 'undefined')
window.opener.document.EditView.contact_id.value = contact_id;
}
function set_return_todo(product_id, product_name) {
if(document.getElementById('from_link').value != '') {
window.opener.document.QcEditView.task_parent_name.value = product_name;
window.opener.document.QcEditView.task_parent_id.value = product_id;
} else {
window.opener.document.createTodo.task_parent_name.value = product_name;
window.opener.document.createTodo.task_parent_id.value = product_id;
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,12 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once('include/Ajax/CommonAjax.php');
?>
@@ -0,0 +1,134 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once('Smarty_setup.php');
require_once('database/DatabaseConnection.php');
require_once('modules/Users/Users.php');
require_once('include/utils/utils.php');
$module = vtlib_purify($_REQUEST['module']);
$focus = CRMEntity::getInstance($module);
global $mod_strings, $app_strings, $app_list_strings;
global $current_language, $currentModule, $theme;
global $adb;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
$mode = $_REQUEST['mergemode'];
if($mode == 'mergesave') {
$return_module=vtlib_purify($_REQUEST['return_module']);
$action=vtlib_purify($_REQUEST['action']);
$return_action=vtlib_purify($_REQUEST['return_action']);
$parenttab=vtlib_purify($_REQUEST['parent']);
$merge_id=vtlib_purify($_REQUEST['record']);
$recordids=vtlib_purify($_REQUEST['pass_rec']);
$result = $adb->pquery("SELECT count(*) AS count FROM vtiger_crmentity WHERE crmid=? and deleted=0", array($merge_id));
$count = $adb->query_result($result,0,'count');
if($count > 0)
{
// First, save the primary record
$focus->mode="edit";
setObjectValuesFromRequest($focus);
$focus->save($module);
$rec_values=$focus->column_fields;
// Remove the id of primary record from the list of records to be deleted.
$del_value=explode(",",$recordids,-1);
$offset = array_search($merge_id,$del_value);
unset($del_value[$offset]);
// Transfer the related lists of the records to be deleted, to the primary record's related list
if(method_exists($focus, 'transferRelatedRecords')){
$focus->transferRelatedRecords($module,$del_value,$merge_id);
} else {
transferRelatedRecords($module,$del_value,$merge_id);
}
// Delete the records by id specified in the list
foreach($del_value as $value)
{
DeleteEntity($_REQUEST['module'],$_REQUEST['return_module'],$focus,$value,"");
}
}
?>
<script>
window.self.close();window.opener.location.href=window.opener.location.href;
</script>
<?php
} elseif ($mode == 'mergefields') {
$idstring=vtlib_purify($_REQUEST['passurl']);
$parent_tab=getParentTab();
$exploded_id=explode(",",$idstring,-1);
$record_count = count($exploded_id);
$smarty = new vtigerCRM_Smarty;
$smarty->assign("EDIT_DUPLICATE","");
if($record_count == 2) {
if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes'
&& isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes')
$smarty->assign("EDIT_DUPLICATE","permitted");
}
else {
if(isPermitted($currentModule,"EditView",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"EditView",$exploded_id[2]) == 'yes'
&& isPermitted($currentModule,"Delete",$exploded_id[0]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[1]) == 'yes' && isPermitted($currentModule,"Delete",$exploded_id[2]) == 'yes')
$smarty->assign("EDIT_DUPLICATE","permitted");
}
$all_values_array=getRecordValues($exploded_id,$module);
$all_values=$all_values_array[0];
$js_arr_val=$all_values_array[1];
$fld_array=$all_values_array[2];
$js_arr=implode(",",$js_arr_val);
$imported_records = Array();
$sql="select bean_id from vtiger_users_last_import where bean_type=? and deleted=0";
$result = $adb->pquery($sql, array($module));
$num_rows=$adb->num_rows($result);
$count=0;
for($i=0; $i<$num_rows;$i++)
{
foreach($exploded_id as $value)
if($value == $adb->query_result($result,$i,"bean_id"))
$count++;
array_push($imported_records,$adb->query_result($result,$i,"bean_id"));
}
if ($record_count == $count)
$no_existing=1;
else
$no_existing=0;
$smarty->assign("MOD", $mod_strings);
$smarty->assign("APP", $app_strings);
$smarty->assign("RECORD_COUNT",$record_count);
$smarty->assign("THEME", $theme);
$smarty->assign("IMAGE_PATH", $image_path);
$smarty->assign("MODULENAME", $module);
$smarty->assign("PARENT_TAB", $parent_tab);
$smarty->assign("JS_ARRAY", $js_arr);
$smarty->assign("ID_ARRAY", $exploded_id);
$smarty->assign("IDSTRING",$idstring);
$smarty->assign("ALLVALUES", $all_values);
$smarty->assign("FIELD_ARRAY", $fld_array);
$smarty->assign("IMPORTED_RECORDS", $imported_records);
$smarty->assign("NO_EXISTING", $no_existing);
$smarty->display("MergeFields.tpl");
}
?>
@@ -0,0 +1,12 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once('include/quickcreate.php');
?>
@@ -0,0 +1,69 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Potentials/Save.php,v 1.6 2005/03/15 10:02:12 shaw Exp $
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
require_once('modules/Potentials/Potentials.php');
require_once('include/logging.php');
require_once('include/database/PearDatabase.php');
$local_log =& LoggerManager::getLogger('index');
$focus = new Potentials();
//added to fix 4600
$search=vtlib_purify($_REQUEST['search_url']);
global $current_user;
$currencyid=fetchCurrency($current_user->id);
$rate_symbol = getCurrencySymbolandCRate($currencyid);
$rate = $rate_symbol['rate'];
$curr_symbol= $rate_symbol['symbol'];
setObjectValuesFromRequest($focus);
if(isset($_REQUEST['amount']))
{
$value = convertToDollar($_REQUEST['amount'],$rate);
$focus->column_fields['amount'] = $value;
}
if($_REQUEST['assigntype'] == 'U') {
$focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_user_id'];
} elseif($_REQUEST['assigntype'] == 'T') {
$focus->column_fields['assigned_user_id'] = $_REQUEST['assigned_group_id'];
}
$focus->save("Potentials");
$pot_id = $return_id = $focus->id;
$parenttab = getParentTab();
if(isset($_REQUEST['return_module']) && $_REQUEST['return_module'] != "") $return_module = vtlib_purify($_REQUEST['return_module']);
else $return_module = "Potentials";
if(isset($_REQUEST['return_action']) && $_REQUEST['return_action'] != "") $return_action = vtlib_purify($_REQUEST['return_action']);
else $return_action = "DetailView";
if(isset($_REQUEST['return_id']) && $_REQUEST['return_id'] != "") $return_id = vtlib_purify($_REQUEST['return_id']);
$local_log->debug("Saved record with id of ".$return_id);
//code added for returning back to the current view after edit from list view
if($_REQUEST['return_viewname'] == '') $return_viewname='0';
if($_REQUEST['return_viewname'] != '')$return_viewname=vtlib_purify($_REQUEST['return_viewname']);
header("Location: index.php?action=$return_action&module=$return_module&parenttab=$parenttab&record=$return_id&pot_id=$pot_id&viewname=$return_viewname&start=".vtlib_purify($_REQUEST['pagenumber']).$search);
?>
@@ -0,0 +1,13 @@
<?php
/*+**********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
************************************************************************************/
include('modules/Vtiger/Settings.php');
?>
@@ -0,0 +1,12 @@
<?php
/*********************************************************************************
** The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*
********************************************************************************/
require_once('include/Ajax/TagCloud.php')
?>
@@ -0,0 +1,11 @@
<?php
/*+*******************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
*********************************************************************************/
require_once 'modules/Home/UnifiedSearch.php';
?>
@@ -0,0 +1,30 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Potentials/index.php,v 1.4 2005/03/17 14:01:15 samk Exp $
* Description: TODO: To be written.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
global $theme;
$theme_path="themes/".$theme."/";
$image_path=$theme_path."images/";
global $mod_strings;
include ('modules/Potentials/ListView.php');
?>
@@ -0,0 +1,157 @@
<?php
/*********************************************************************************
* The contents of this file are subject to the SugarCRM Public License Version 1.1.2
* ("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.
* The Original Code is: SugarCRM Open Source
* The Initial Developer of the Original Code is SugarCRM, Inc.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
* All Rights Reserved.
* Contributor(s): ______________________________________.
********************************************************************************/
/*********************************************************************************
* $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Potentials/language/en_us.lang.php,v 1.18 2005/04/28 14:05:53 ray Exp $
* Description: Defines the English language pack for the Account module.
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
* All Rights Reserved.
* Contributor(s): ______________________________________..
********************************************************************************/
$mod_strings = Array(
'LBL_MODULE_NAME'=>'Potentials',
'LBL_MODULE_TITLE'=>'Potentials: Home',
'LBL_SEARCH_FORM_TITLE'=>'Potential Search',
'LBL_LIST_FORM_TITLE'=>'Potential List',
'LBL_OPPORTUNITY_NAME'=>'Potential Name:',
'LBL_OPPORTUNITY'=>'Potential:',
'LBL_NAME'=>'Potential Name',
'LBL_INVITEE'=>'Contacts',
'LBL_LIST_OPPORTUNITY_NAME'=>'Potential',
'LBL_LIST_ACCOUNT_NAME'=>'Account Name',
'LBL_PRODUCT_NAME'=>'Product Name',
'LBL_LIST_AMOUNT'=>'Amount',
'LBL_LIST_DATE_CLOSED'=>'Expected Close',
'LBL_LIST_SALES_STAGE'=>'Sales Stage',
'LBL_OPPORTUNITY_NAME'=>'Potential Name:',
'LBL_ACCOUNT_NAME'=>'Account Name:',
'LBL_AMOUNT'=>'Amount:',
'LBL_DATE_CLOSED'=>'Expected Close Date:',
'LBL_TYPE'=>'Type:',
'LBL_NEXT_STEP'=>'Next Step:',
'LBL_LEAD_SOURCE'=>'Lead Source:',
'LBL_SALES_STAGE'=>'Sales Stage:',
'LBL_PROBABILITY'=>'Probability (%):',
'LBL_DESCRIPTION'=>'Description:',
'LBL_OPPORTUNITY_INFORMATION'=>'Potential Information:',
'LBL_DESCRIPTION_INFORMATION'=>'Description Information:',
'LBL_CUSTOM_INFORMATION'=>'Custom Information',
'LBL_NEW_FORM_TITLE'=>'New Potential',
'ERR_DELETE_RECORD'=>"A record number must be specified to delete the opportunity.",
'LBL_TOP_OPPORTUNITIES'=>"My Top Open Potentials",
'NTC_REMOVE_OPP_CONFIRMATION'=>'Are you sure you want to remove this contact from this opportunity?',
'NTC_NONE_SCHEDULED'=>'None scheduled.',
'LBL_SELECT_OPPOPTUNITY'=>'Select Potential',
'LBL_GENERAL_INFORMATION'=>'General Information',
//for v4 release added
'LBL_NEW_POTENTIAL'=>'New Potential',
'LBL_POTENTIAL_TITLE'=>'Potentials',
'LBL_NEW_TASK'=>'New Task',
'LBL_TASK_TITLE'=>'Tasks',
'LBL_NEW_CALL'=>'New Call',
'LBL_CALL_TITLE'=>'Calls',
'LBL_NEW_MEETING'=>'New Meeting',
'LBL_MEETING_TITLE'=>'Meetings',
'LBL_NEW_EMAIL'=>'New Email',
'LBL_EMAIL_TITLE'=>'Emails',
'LBL_NEW_NOTE'=>'New Document',
'LBL_NOTE_TITLE'=>'Documents',
'LBL_NEW_ATTACHMENT'=>'New Attachment',
'LBL_ATTACHMENT_TITLE'=>'Attachments',
'LBL_NEW_CONTACT'=>'New Contact',
'LBL_CONTACT_TITLE'=>'Contacts',
//Added vtiger_fields after RC1 - Release
'LBL_ALL'=>'All',
'LBL_WON'=>'Won',
'LBL_LOST'=>'Lost',
'LBL_VALUE_PROPOSITION'=>'Value Proposition',
'LBL_PROSPECTING'=>'Prospecting',
// Added for 4GA
'LBL_TOOL_FORM_TITLE'=>'Potential Tools',
//Added for 4GA
'Potential Name'=>'Potential Name',
'Amount'=>'Amount',
'Account Name'=>'Account Name',
'Currency'=>'Currency',
'Expected Close Date'=>'Expected Close Date',
'Opportunity Type'=>'Opportunity Type',
'Type'=>'Type',
'Next Step'=>'Next Step',
'Lead Source'=>'Lead Source',
'Sales Stage'=>'Sales Stage',
'Assigned To'=>'Assigned To',
'Probability'=>'Probability (%)',
'Campaign Source'=>'Campaign Source',
'Description'=>'Description',
'Created Time'=>'Created Time',
'Modified Time'=>'Modified Time',
//Added for 4.2 Release -- CustomView
'Potential'=>'Potential',
'Expected Close'=>'Expected Close',
//Added for Existing Picklist Strings
'Prospecting'=>'Prospecting',
'Qualification'=>'Qualification',
'Needs Analysis'=>'Needs Analysis',
'Value Proposition'=>'Value Proposition',
'Id. Decision Makers'=>'Id. Decision Makers',
'Perception Analysis'=>'Perception Analysis',
'Proposal/Price Quote'=>'Proposal/Price Quote',
'Negotiation/Review'=>'Negotiation/Review',
'Closed Won'=>'Closed Won',
'Closed Lost'=>'Closed Lost',
'Cold Call'=>'Cold Call',
'Existing Customer'=>'Existing Customer',
'Self Generated'=>'Self Generated',
'Employee'=>'Employee',
'Partner'=>'Partner',
'Public Relations'=>'Public Relations',
'Direct Mail'=>'Direct Mail',
'Conference'=>'Conference',
'Trade Show'=>'Trade Show',
'Web Site'=>'Web Site',
'Word of mouth'=>'Word of mouth',
'Other'=>'Other',
'--None--'=>'--None--',
'Existing Business'=>'Existing Business',
'New Business'=>'New Business',
// Added after 5.0.4 GA
// Module Sequence Numbering
'Potential No' => 'Potential No',
// END
'Related To' => 'Related To',
);
?>
@@ -0,0 +1,156 @@
<?php
/**
* Copyright (C) 2006-2010 YUCHENG HU
*
* ---------------------------------------------
* HA WEBSYSTEMS
* http://www.hawebs.net
* https://www.hawebs.org/forums/computer/
*
* CONTACT
* [email protected] / [email protected]
*
* ---------------------------------------------
* [A] GNU GENERAL PUBLIC LICENSE GNU/LGPL
* [B] Apache License, Version 2.0
*
* ---------------------------------------------
* NOTE
* 1. 所有的语言配置文件请采用 UTF-8 编码
*
* ---------------------------------------------
*/
$mod_strings = Array(
'LBL_MODULE_NAME' => '业务',
'LBL_MODULE_TITLE' => '业务: 首页',
'LBL_SEARCH_FORM_TITLE' => '搜寻业务',
'LBL_LIST_FORM_TITLE' => '业务列表',
'LBL_OPPORTUNITY_NAME' => '机会名称:',
'LBL_OPPORTUNITY' => '机会:',
'LBL_NAME' => '业务名称',
'LBL_INVITEE' => '联系人',
'LBL_LIST_OPPORTUNITY_NAME' => '可能性',
'LBL_LIST_ACCOUNT_NAME' => '客户名称',
'LBL_PRODUCT_NAME' => '业务类型',
'LBL_LIST_AMOUNT' => '合计',
'LBL_LIST_DATE_CLOSED' => '预期结束',
'LBL_LIST_SALES_STAGE' => '销售策略',
'LBL_OPPORTUNITY_NAME'=>'潜在客户名称:',
'LBL_ACCOUNT_NAME' => '客户名称:',
'LBL_AMOUNT' => '合计:',
'LBL_DATE_CLOSED' => '预期结束日期:',
'LBL_TYPE' => '类型:',
'LBL_NEXT_STEP' => '下一步:',
'LBL_LEAD_SOURCE' => '接触来源:',
'LBL_SALES_STAGE' => '客服场景:',
'LBL_PROBABILITY' => '可能性 (%):',
'LBL_DESCRIPTION' => '描述:',
'LBL_OPPORTUNITY_INFORMATION' => '业务信息:',
'LBL_DESCRIPTION_INFORMATION' => '描述信息:',
'LBL_CUSTOM_INFORMATION' => '自订信息',
'LBL_NEW_FORM_TITLE' => '新增业务',
'ERR_DELETE_RECORD' => '删除业务必须指定记录编号.',
'LBL_TOP_OPPORTUNITIES' => '最佳业务',
'NTC_REMOVE_OPP_CONFIRMATION' => '您确定要从业务中删除这位联系人?',
'NTC_NONE_SCHEDULED' => '未安排行程',
'LBL_SELECT_OPPOPTUNITY' => '选择业务',
'LBL_GENERAL_INFORMATION' => '一般信息',
//for v4 release added
'LBL_NEW_POTENTIAL' => '新增业务',
'LBL_POTENTIAL_TITLE' => '业务',
'LBL_NEW_TASK' => '新增任务',
'LBL_TASK_TITLE' => '任务',
'LBL_NEW_CALL' => '新增电话记录',
'LBL_CALL_TITLE' => '电话记录',
'LBL_NEW_MEETING' => '新增会议',
'LBL_MEETING_TITLE' => '会议',
'LBL_NEW_EMAIL' => '新增电子邮件',
'LBL_EMAIL_TITLE' => '电子邮件',
'LBL_NEW_NOTE' => '新增备忘录',
'LBL_NOTE_TITLE' => '备忘录',
'LBL_NEW_ATTACHMENT' => '新增附件',
'LBL_ATTACHMENT_TITLE' => '附件',
'LBL_NEW_CONTACT' => '新增联系人',
'LBL_CONTACT_TITLE' => '联系人',
//Added vtiger_fields after RC1 - Release
'LBL_ALL' => '全部',
'LBL_WON' => '获得',
'LBL_LOST' => '失去',
'LBL_VALUE_PROPOSITION' => '价值建议',
'LBL_PROSPECTING' => '预期值',
// Added for 4GA
'LBL_TOOL_FORM_TITLE' => '业务编辑器',
//Added for 4GA
'Potential Name' => '业务名称',
'Amount' => '合计',
'Account Name' => '客户名称',
'Currency' => '货币',
'Expected Close Date' => '预定结束日期',
'Opportunity Type' => '机会类型',
'Type' => '类型',
'Next Step' => '下一步',
'Lead Source' => '接触来源',
'Sales Stage' => '销售策略',
'Assigned To' => '负责人',
'Probability' => '可能性 (%)',
'Campaign Source' => '活动来源',
'Description' => '描述',
'Created Time' => '建立时间',
'Modified Time' => '修改时间',
//Added for 4.2 Release -- CustomView
'Potential' => '业务',
'Expected Close' => '预期结案日期',
//Added for Existing Picklist Strings
'Prospecting' => '潜在客户',
'Qualification' => '具有资格',
'Needs Analysis' => '需要分析',
'Value Proposition' => '价值主张',
'Id. Decision Makers' => '决策者',
'Perception Analysis' => '感觉分析',
'Proposal/Price Quote' => '建议书/报价单',
'Negotiation/Review' => '交涉/审阅',
'Closed Won' => '成功结案',
'Closed Lost' => '失败结案',
'Cold Call' => '陌生拜访',
'Existing Customer' => '既有客户',
'Self Generated' => '自动产生',
'Employee' => '员工',
'Partner' => '伙伴',
'Public Relations' => '公众关系',
'Direct Mail' => '邮件营销',
'Conference' => '研讨会',
'Trade Show' => '贸易展览',
'Web Site' => '网站',
'Word of mouth' => '朋友介绍',
'Other' => '其它',
'--None--' => '-- 无 --',
'Existing Business' => '已有商务往来',
'New Business' => '新客户',
// Added after 5.0.4 GA
// Module Sequence Numbering
'Potential No' => '潜在机会序列号',
// END
);
?>
@@ -0,0 +1,55 @@
<?php
/*+********************************************************************************
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
* ("License"); You may not use this file except in compliance with the License
* The Original Code is: vtiger CRM Open Source
* The Initial Developer of the Original Code is vtiger.
* Portions created by vtiger are Copyright (C) vtiger.
* All Rights Reserved.
********************************************************************************/
require_once('include/database/PearDatabase.php');
require_once('user_privileges/default_module_view.php');
global $adb, $singlepane_view, $currentModule;
$idlist = vtlib_purify($_REQUEST['idlist']);
$dest_mod = vtlib_purify($_REQUEST['destination_module']);
$parenttab = getParentTab();
$forCRMRecord = vtlib_purify($_REQUEST['parentid']);
if($singlepane_view == 'true')
$action = "DetailView";
else
$action = "CallRelatedList";
$storearray = array();
if(!empty($_REQUEST['idlist'])) {
// Split the string of ids
$storearray = explode (";",trim($idlist,";"));
} else if(!empty($_REQUEST['entityid'])){
$storearray = array($_REQUEST['entityid']);
}
$focus = CRMEntity::getInstance($currentModule);
foreach($storearray as $id)
{
if($id != '')
{
if($dest_mod == 'Contacts') { //When we select contact from potential related list
$sql = "insert into vtiger_contpotentialrel values (?,?)";
$adb->pquery($sql, array($id, $forCRMRecord));
} elseif($dest_mod == 'Products') {//when we select product from potential related list
$sql = "insert into vtiger_seproductsrel values (?,?,?)";
$adb->pquery($sql, array($forCRMRecord, $id,'Potentials'));
} elseif($dest_mod == 'Documents') {
$sql = "insert into vtiger_senotesrel values (?,?)";
$adb->pquery($sql, array($forCRMRecord, $id));
} else {
$focus->save_related_module($currentModule, $forCRMRecord, $dest_mod, $id);
}
}
}
header("Location: index.php?action=$action&module=$currentModule&record=".$forCRMRecord."&parenttab=".$parenttab);
?>