init
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['MyClosedOpportunitiesDashlet'] = array('module' => 'Opportunities',
|
||||
'title' => translate('LBL_MY_CLOSED_OPPORTUNITIES', 'Opportunities'),
|
||||
'description' => 'A customizable view into Opportunities',
|
||||
'category' => 'Module Views',
|
||||
'hidden' => true);
|
||||
?>
|
||||
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/Dashlets/Dashlet.php');
|
||||
|
||||
|
||||
class MyClosedOpportunitiesDashlet extends Dashlet {
|
||||
var $total_opportunities;
|
||||
var $total_opportunities_won;
|
||||
|
||||
function MyClosedOpportunitiesDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
parent::Dashlet($id);
|
||||
$this->isConfigurable = false;
|
||||
$this->isRefreshable = true;
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_MY_CLOSED_OPPORTUNITIES', 'Opportunities');
|
||||
|
||||
$this->seedBean = new Opportunity();
|
||||
|
||||
$qry = "SELECT * from opportunities WHERE assigned_user_id = '" . $current_user->id . "' AND deleted=0";
|
||||
$result = $this->seedBean->db->query($this->seedBean->create_list_count_query($qry));
|
||||
$row = $this->seedBean->db->fetchByAssoc($result);
|
||||
|
||||
$this->total_opportunities = $row['c'];
|
||||
$qry = "SELECT * from opportunities WHERE assigned_user_id = '" . $current_user->id . "' AND sales_stage = 'Closed Won' AND deleted=0";
|
||||
$result = $this->seedBean->db->query($this->seedBean->create_list_count_query($qry));
|
||||
$row = $this->seedBean->db->fetchByAssoc($result);
|
||||
|
||||
$this->total_opportunities_won = $row['c'];
|
||||
}
|
||||
|
||||
function display(){
|
||||
|
||||
|
||||
$ss = new Sugar_Smarty();
|
||||
$ss->assign('lblTotalOpportunities', translate('LBL_TOTAL_OPPORTUNITIES', 'Opportunities'));
|
||||
$ss->assign('lblClosedWonOpportunities', translate('LBL_CLOSED_WON_OPPORTUNITIES', 'Opportunities'));
|
||||
|
||||
$ss->assign('total_opportunities', $this->total_opportunities);
|
||||
$ss->assign('total_opportunities_won', $this->total_opportunities_won);
|
||||
|
||||
return parent::display() . $ss->fetch('modules/Opportunities/Dashlets/MyClosedOpportunitiesDashlet/MyClosedOpportunitiesDashlet.tpl');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,53 @@
|
||||
{*
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
*}
|
||||
|
||||
<div style="width:100%;vertical-align:middle;">
|
||||
<table width="100%" border="0" align="center" class="list view" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<th align="center">{$lblTotalOpportunities}</td>
|
||||
<th align="center">{$lblClosedWonOpportunities}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="oddListRowS1" valign="top">{$total_opportunities}</td>
|
||||
<td class="oddListRowS1" valign="top"><b>{$total_opportunities_won}</b></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $current_user;
|
||||
|
||||
$dashletData['MyOpportunitiesDashlet']['searchFields'] = array('date_entered' => array('default' => ''),
|
||||
'opportunity_type' => array('default' => ''),
|
||||
'sales_stage' => array('default' =>
|
||||
array('Prospecting', 'Qualification', 'Needs Analysis', 'Value Proposition', 'Id. Decision Makers', 'Perception Analysis', 'Proposal/Price Quote', 'Negotiation/Review')),
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'label' => 'LBL_ASSIGNED_TO',
|
||||
'default' => $current_user->name));
|
||||
|
||||
$dashletData['MyOpportunitiesDashlet']['columns'] = array('name' => array('width' => '35',
|
||||
'label' => 'LBL_OPPORTUNITY_NAME',
|
||||
'link' => true,
|
||||
'default' => true
|
||||
),
|
||||
'account_name' => array('width' => '35',
|
||||
'label' => 'LBL_ACCOUNT_NAME',
|
||||
'default' => true,
|
||||
'link' => false,
|
||||
'id' => 'account_id',
|
||||
'ACLTag' => 'ACCOUNT'),
|
||||
'amount_usdollar' => array('width' => '15',
|
||||
'label' => 'LBL_AMOUNT_USDOLLAR',
|
||||
'default' => true,
|
||||
'currency_format' => true),
|
||||
'date_closed' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_CLOSED',
|
||||
'default' => true,
|
||||
'defaultOrderColumn' => array('sortOrder' => 'ASC')),
|
||||
'opportunity_type' => array('width' => '15',
|
||||
'label' => 'LBL_TYPE'),
|
||||
'lead_source' => array('width' => '15',
|
||||
'label' => 'LBL_LEAD_SOURCE'),
|
||||
'sales_stage' => array('width' => '15',
|
||||
'label' => 'LBL_SALES_STAGE'),
|
||||
'probability' => array('width' => '15',
|
||||
'label' => 'LBL_PROBABILITY'),
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
'date_modified' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_MODIFIED'),
|
||||
'created_by' => array('width' => '8',
|
||||
'label' => 'LBL_CREATED'),
|
||||
'assigned_user_name' => array('width' => '8',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER'),
|
||||
'next_step' => array('width' => '10',
|
||||
'label' => 'LBL_NEXT_STEP'),
|
||||
);
|
||||
?>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['MyOpportunitiesDashlet'] = array('module' => 'Opportunities',
|
||||
'title' => translate('LBL_TOP_OPPORTUNITIES', 'Opportunities'),
|
||||
'description' => 'A customizable view into Opportunities',
|
||||
'category' => 'Module Views',
|
||||
'hidden' => true);
|
||||
?>
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/Dashlets/DashletGeneric.php');
|
||||
|
||||
|
||||
class MyOpportunitiesDashlet extends DashletGeneric {
|
||||
function MyOpportunitiesDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings, $dashletData;
|
||||
require('modules/Opportunities/Dashlets/MyOpportunitiesDashlet/MyOpportunitiesDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_TOP_OPPORTUNITIES', 'Opportunities');
|
||||
|
||||
$this->searchFields = $dashletData['MyOpportunitiesDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['MyOpportunitiesDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new Opportunity();
|
||||
}
|
||||
|
||||
//4.5.0g fix for upgrade issue where user_preferences table still refer to column as 'amount'
|
||||
function process($lvsParams = array()) {
|
||||
if(!empty($this->displayColumns)) {
|
||||
if(array_search('amount', $this->displayColumns)) {
|
||||
$this->displayColumns[array_search('amount', $this->displayColumns)] = 'amount_usdollar';
|
||||
}
|
||||
}
|
||||
parent::process($lvsParams);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
63
modules/Opportunities/ListViewTop.html
Executable file
63
modules/Opportunities/ListViewTop.html
Executable file
@@ -0,0 +1,63 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* {APP.LBL_CURRENCY_SYM}Header: /cvsroot/sugarcrm/sugarcrm/modules/Opportunities/ListViewTop.html,v 1.3 2004/07/25 01:47:06 sugarjacob Exp {APP.LBL_CURRENCY_SYM}
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view">
|
||||
<!-- BEGIN: list_nav_row -->
|
||||
{PAGINATION}
|
||||
<!-- END: list_nav_row -->
|
||||
<tr height="20">
|
||||
<th scope="col" scope="col" width="40%" nowrap><slot>{MOD.LBL_LIST_OPPORTUNITY_NAME}</slot></th>
|
||||
<th scope="col" width="25%" nowrap><slot>{MOD.LBL_LIST_ACCOUNT_NAME}</slot></th>
|
||||
<th scope="col" width="15%" nowrap><slot>{MOD.LBL_LIST_AMOUNT}</slot></th>
|
||||
<th scope="col" width="20%" nowrap><slot>{MOD.LBL_LIST_DATE_CLOSED}</slot></th>
|
||||
</tr>
|
||||
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" class="{ROW_COLOR}S1">
|
||||
<td scope='row' valign=TOP><slot><{TAG.MAIN} href="{URL_PREFIX}index.php?action=DetailView&module=Opportunities&record={OPPORTUNITY.ID}" >{OPPORTUNITY.NAME}</{TAG.MAIN}></slot></td>
|
||||
<td valign=TOP ><slot><{TAG.ACCOUNT} href="{URL_PREFIX}index.php?action=DetailView&module=Accounts&record={OPPORTUNITY.ACCOUNT_ID}" >{OPPORTUNITY.ACCOUNT_NAME}</{TAG.ACCOUNT}></slot></td>
|
||||
<td valign=TOP><slot>{APP.LBL_CURRENCY_SYM}{OPPORTUNITY.AMOUNT}</slot></td>
|
||||
<td valign=TOP><slot>{OPPORTUNITY.DATE_CLOSED}</slot></td>
|
||||
</tr>
|
||||
|
||||
<!-- END: row -->
|
||||
|
||||
</table>
|
||||
<!-- END: main -->
|
||||
64
modules/Opportunities/ListViewTop.php
Executable file
64
modules/Opportunities/ListViewTop.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$current_module_strings = return_module_language($current_language, "Opportunities");
|
||||
$seedOpportunity = new Opportunity();
|
||||
|
||||
//build top 5 opportunity list
|
||||
$where = "opportunities.sales_stage <> 'Closed Won' AND opportunities.sales_stage <> 'Closed Lost' AND opportunities.assigned_user_id='".$current_user->id."'";
|
||||
$header_text = '';
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=ListView&from_module=Opportunities'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>";
|
||||
}
|
||||
$ListView = new ListView();
|
||||
$ListView->initNewXTemplate( 'modules/Opportunities/ListViewTop.html',$current_module_strings);
|
||||
$ListView->setHeaderTitle($current_module_strings['LBL_TOP_OPPORTUNITIES']. $header_text );
|
||||
$ListView->setQuery($where, 5, "amount DESC", "OPPORTUNITY", false);
|
||||
$ListView->processListView($seedOpportunity, "main", "OPPORTUNITY");
|
||||
|
||||
?>
|
||||
57
modules/Opportunities/Menu.php
Executable file
57
modules/Opportunities/Menu.php
Executable file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings, $app_strings, $sugar_config;
|
||||
$module_menu = Array();
|
||||
if(ACLController::checkAccess('Opportunities','edit',true)){
|
||||
$module_menu[]= Array("index.php?module=Opportunities&action=EditView&return_module=Opportunities&return_action=DetailView", $mod_strings['LNK_NEW_OPPORTUNITY'],"CreateOpportunities");
|
||||
}
|
||||
if(ACLController::checkAccess('Opportunities','list',true)){
|
||||
$module_menu[]= Array("index.php?module=Opportunities&action=index&return_module=Opportunities&return_action=DetailView", $mod_strings['LNK_OPPORTUNITY_LIST'],"Opportunities");
|
||||
}
|
||||
if(ACLController::checkAccess('Opportunities','import',true)){
|
||||
$module_menu[]= Array("index.php?module=Import&action=Step1&import_module=Opportunities&return_module=Opportunities&return_action=index", $mod_strings['LNK_IMPORT_OPPORTUNITIES'],"Import");
|
||||
}
|
||||
|
||||
?>
|
||||
80
modules/Opportunities/OpportunitiesQuickCreate.php
Executable file
80
modules/Opportunities/OpportunitiesQuickCreate.php
Executable file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/EditView/QuickCreate.php');
|
||||
|
||||
|
||||
|
||||
class OpportunitiesQuickCreate extends QuickCreate {
|
||||
|
||||
var $javascript;
|
||||
|
||||
function process() {
|
||||
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
|
||||
$mod_strings = return_module_language($current_language, 'Opportunities');
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
parent::process();
|
||||
|
||||
list($num_grp_sep, $dec_sep) = get_number_seperators();
|
||||
$this->ss->assign('NUM_GRP_SEP', $num_grp_sep);
|
||||
$this->ss->assign('DEC_SEP', $dec_sep);
|
||||
$this->ss->assign('CURRENCY_ID', $current_user->getPreference('currency'));
|
||||
|
||||
$this->ss->assign("SALES_STAGE_OPTIONS", get_select_options_with_id($app_list_strings['sales_stage_dom'], ''));
|
||||
$this->ss->assign("LEAD_SOURCE_OPTIONS", get_select_options_with_id($app_list_strings['lead_source_dom'], ''));
|
||||
$this->ss->assign('prob_array', $json->encode($app_list_strings['sales_probability_dom']));
|
||||
|
||||
if($this->viaAJAX) { // override for ajax call
|
||||
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"opportunitiesQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"opportunities\"); else return false;'");
|
||||
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_opportunities\")';");
|
||||
}
|
||||
|
||||
$this->ss->assign('viaAJAX', $this->viaAJAX);
|
||||
|
||||
$this->javascript = new javascript();
|
||||
$this->javascript->setFormName('opportunitiesQuickCreate');
|
||||
|
||||
$focus = new Opportunity();
|
||||
$this->javascript->setSugarBean($focus);
|
||||
$this->javascript->addAllFields('');
|
||||
|
||||
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
|
||||
}
|
||||
}
|
||||
?>
|
||||
454
modules/Opportunities/Opportunity.php
Executable file
454
modules/Opportunities/Opportunity.php
Executable file
@@ -0,0 +1,454 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description:
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Opportunity is used to store customer information.
|
||||
class Opportunity extends SugarBean {
|
||||
var $field_name_map;
|
||||
// Stored fields
|
||||
var $id;
|
||||
var $lead_source;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $assigned_user_id;
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $modified_by_name;
|
||||
var $description;
|
||||
var $name;
|
||||
var $opportunity_type;
|
||||
var $amount;
|
||||
var $amount_usdollar;
|
||||
var $currency_id;
|
||||
var $date_closed;
|
||||
var $next_step;
|
||||
var $sales_stage;
|
||||
var $probability;
|
||||
var $campaign_id;
|
||||
|
||||
// These are related
|
||||
var $account_name;
|
||||
var $account_id;
|
||||
var $contact_id;
|
||||
var $task_id;
|
||||
var $note_id;
|
||||
var $meeting_id;
|
||||
var $call_id;
|
||||
var $email_id;
|
||||
var $assigned_user_name;
|
||||
|
||||
var $table_name = "opportunities";
|
||||
var $rel_account_table = "accounts_opportunities";
|
||||
var $rel_contact_table = "opportunities_contacts";
|
||||
var $module_dir = "Opportunities";
|
||||
|
||||
var $importable = true;
|
||||
var $object_name = "Opportunity";
|
||||
|
||||
// This is used to retrieve related fields from form posts.
|
||||
var $additional_column_fields = Array('assigned_user_name', 'assigned_user_id', 'account_name', 'account_id', 'contact_id', 'task_id', 'note_id', 'meeting_id', 'call_id', 'email_id'
|
||||
);
|
||||
|
||||
var $relationship_fields = Array('task_id'=>'tasks', 'note_id'=>'notes', 'account_id'=>'accounts',
|
||||
'meeting_id'=>'meetings', 'call_id'=>'calls', 'email_id'=>'emails', 'project_id'=>'project',
|
||||
);
|
||||
|
||||
function Opportunity() {
|
||||
parent::SugarBean();
|
||||
global $sugar_config;
|
||||
if(!$sugar_config['require_accounts']){
|
||||
unset($this->required_fields['account_name']);
|
||||
}
|
||||
}
|
||||
|
||||
var $new_schema = true;
|
||||
|
||||
|
||||
|
||||
function get_summary_text()
|
||||
{
|
||||
return "$this->name";
|
||||
}
|
||||
|
||||
function create_list_query($order_by, $where, $show_deleted = 0)
|
||||
{
|
||||
|
||||
$custom_join = $this->custom_fields->getJOIN();
|
||||
$query = "SELECT ";
|
||||
|
||||
$query .= "
|
||||
accounts.id as account_id,
|
||||
accounts.name as account_name,
|
||||
accounts.assigned_user_id account_id_owner,
|
||||
users.user_name as assigned_user_name ";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " ,opportunities.*
|
||||
FROM opportunities ";
|
||||
|
||||
|
||||
$query .= "LEFT JOIN users
|
||||
ON opportunities.assigned_user_id=users.id ";
|
||||
$query .= "LEFT JOIN $this->rel_account_table
|
||||
ON opportunities.id=$this->rel_account_table.opportunity_id
|
||||
LEFT JOIN accounts
|
||||
ON $this->rel_account_table.account_id=accounts.id ";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$where_auto = '1=1';
|
||||
if($show_deleted == 0){
|
||||
$where_auto = "
|
||||
($this->rel_account_table.deleted is null OR $this->rel_account_table.deleted=0)
|
||||
AND (accounts.deleted is null OR accounts.deleted=0)
|
||||
AND opportunities.deleted=0";
|
||||
}else if($show_deleted == 1){
|
||||
$where_auto = " opportunities.deleted=1";
|
||||
}
|
||||
|
||||
if($where != "")
|
||||
$query .= "where ($where) AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
if($order_by != "")
|
||||
$query .= " ORDER BY $order_by";
|
||||
else
|
||||
$query .= " ORDER BY opportunities.name";
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
|
||||
function create_export_query(&$order_by, &$where, $relate_link_join='')
|
||||
{
|
||||
$custom_join = $this->custom_fields->getJOIN(true, true,$where);
|
||||
if($custom_join)
|
||||
$custom_join['join'] .= $relate_link_join;
|
||||
$query = "SELECT
|
||||
opportunities.*,
|
||||
accounts.name as account_name,
|
||||
users.user_name as assigned_user_name ";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM opportunities ";
|
||||
$query .= "LEFT JOIN users
|
||||
ON opportunities.assigned_user_id=users.id";
|
||||
$query .= " LEFT JOIN $this->rel_account_table
|
||||
ON opportunities.id=$this->rel_account_table.opportunity_id
|
||||
LEFT JOIN accounts
|
||||
ON $this->rel_account_table.account_id=accounts.id ";
|
||||
if($custom_join){
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
$where_auto = "
|
||||
($this->rel_account_table.deleted is null OR $this->rel_account_table.deleted=0)
|
||||
AND (accounts.deleted is null OR accounts.deleted=0)
|
||||
AND opportunities.deleted=0";
|
||||
|
||||
if($where != "")
|
||||
$query .= "where $where AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
if($order_by != "")
|
||||
$query .= " ORDER BY opportunities.$order_by";
|
||||
else
|
||||
$query .= " ORDER BY opportunities.name";
|
||||
return $query;
|
||||
}
|
||||
|
||||
function fill_in_additional_list_fields()
|
||||
{
|
||||
if ( $this->force_load_details == true)
|
||||
{
|
||||
$this->fill_in_additional_detail_fields();
|
||||
}
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields()
|
||||
{
|
||||
parent::fill_in_additional_detail_fields();
|
||||
|
||||
$currency = new Currency();
|
||||
$currency->retrieve($this->currency_id);
|
||||
if($currency->id != $this->currency_id || $currency->deleted == 1){
|
||||
$this->amount = $this->amount_usdollar;
|
||||
$this->currency_id = $currency->id;
|
||||
}
|
||||
//get campaign name
|
||||
$camp = new Campaign();
|
||||
$camp->retrieve($this->campaign_id);
|
||||
$this->campaign_name = $camp->name;
|
||||
$this->account_name = '';
|
||||
$this->account_id = '';
|
||||
$ret_values=Opportunity::get_account_detail($this->id);
|
||||
if (!empty($ret_values)) {
|
||||
$this->account_name=$ret_values['name'];
|
||||
$this->account_id=$ret_values['id'];
|
||||
$this->account_id_owner =$ret_values['assigned_user_id'];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** Returns a list of the associated contacts
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc..
|
||||
* All Rights Reserved..
|
||||
* Contributor(s): ______________________________________..
|
||||
*/
|
||||
function get_contacts()
|
||||
{
|
||||
$this->load_relationship('contacts');
|
||||
$query_array=$this->contacts->getQuery(true);
|
||||
|
||||
//update the select clause in the retruned query.
|
||||
$query_array['select']="SELECT contacts.id, contacts.first_name, contacts.last_name, contacts.title, contacts.email1, contacts.phone_work, opportunities_contacts.contact_role as opportunity_role, opportunities_contacts.id as opportunity_rel_id ";
|
||||
|
||||
$query='';
|
||||
foreach ($query_array as $qstring) {
|
||||
$query.=' '.$qstring;
|
||||
}
|
||||
$temp = Array('id', 'first_name', 'last_name', 'title', 'email1', 'phone_work', 'opportunity_role', 'opportunity_rel_id');
|
||||
return $this->build_related_list2($query, new Contact(), $temp);
|
||||
}
|
||||
|
||||
function update_currency_id($fromid, $toid){
|
||||
$idequals = '';
|
||||
|
||||
$currency = new Currency();
|
||||
$currency->retrieve($toid);
|
||||
foreach($fromid as $f){
|
||||
if(!empty($idequals)){
|
||||
$idequals .=' or ';
|
||||
}
|
||||
$idequals .= "currency_id='$f'";
|
||||
}
|
||||
|
||||
if(!empty($idequals)){
|
||||
$query = "select amount, id from opportunities where (". $idequals. ") and deleted=0 and opportunities.sales_stage <> 'Closed Won' AND opportunities.sales_stage <> 'Closed Lost';";
|
||||
$result = $this->db->query($query);
|
||||
while($row = $this->db->fetchByAssoc($result)){
|
||||
|
||||
$query = "update opportunities set currency_id='".$currency->id."', amount_usdollar='".$currency->convertToDollar($row['amount'])."' where id='".$row['id']."';";
|
||||
$this->db->query($query);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function get_list_view_data(){
|
||||
global $locale, $current_language, $current_user, $mod_strings, $app_list_strings, $sugar_config;
|
||||
$app_strings = return_application_language($current_language);
|
||||
$params = array();
|
||||
|
||||
$temp_array = $this->get_list_view_array();
|
||||
$temp_array['SALES_STAGE'] = empty($temp_array['SALES_STAGE']) ? '' : $temp_array['SALES_STAGE'];
|
||||
$temp_array["ENCODED_NAME"]=$this->name;
|
||||
return $temp_array;
|
||||
}
|
||||
|
||||
function get_currency_symbol(){
|
||||
if(isset($this->currency_id)){
|
||||
$cur_qry = "select * from currencies where id ='".$this->currency_id."'";
|
||||
$cur_res = $this->db->query($cur_qry);
|
||||
if(!empty($cur_res)){
|
||||
$cur_row = $this->db->fetchByAssoc($cur_res);
|
||||
if(isset($cur_row['symbol'])){
|
||||
return $cur_row['symbol'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
builds a generic search based on the query string using or
|
||||
do not include any $this-> because this is called on without having the class instantiated
|
||||
*/
|
||||
function build_generic_where_clause ($the_query_string) {
|
||||
$where_clauses = Array();
|
||||
$the_query_string = $GLOBALS['db']->quote($the_query_string);
|
||||
array_push($where_clauses, "opportunities.name like '$the_query_string%'");
|
||||
array_push($where_clauses, "accounts.name like '$the_query_string%'");
|
||||
|
||||
$the_where = "";
|
||||
foreach($where_clauses as $clause)
|
||||
{
|
||||
if($the_where != "") $the_where .= " or ";
|
||||
$the_where .= $clause;
|
||||
}
|
||||
|
||||
|
||||
return $the_where;
|
||||
}
|
||||
|
||||
function save($check_notify = FALSE)
|
||||
{
|
||||
// Bug 32581 - Make sure the currency_id is set to something
|
||||
global $current_user, $app_list_strings;
|
||||
|
||||
if ( empty($this->currency_id) )
|
||||
$this->currency_id = $current_user->getPreference('currency');
|
||||
if ( empty($this->currency_id) )
|
||||
$this->currency_id = -99;
|
||||
|
||||
//if probablity isn't set, set it based on the sales stage
|
||||
if (!isset($this->probability) && !empty($this->sales_stage))
|
||||
{
|
||||
$prob_arr = $app_list_strings['sales_probability_dom'];
|
||||
if (isset($prob_arr[$this->sales_stage]))
|
||||
$this->probability = $prob_arr[$this->sales_stage];
|
||||
}
|
||||
|
||||
require_once('modules/Opportunities/SaveOverload.php');
|
||||
|
||||
perform_save($this);
|
||||
return parent::save($check_notify);
|
||||
|
||||
}
|
||||
|
||||
function save_relationship_changes($is_update)
|
||||
{
|
||||
//if account_id was replaced unlink the previous account_id.
|
||||
//this rel_fields_before_value is populated by sugarbean during the retrieve call.
|
||||
if (!empty($this->account_id) and !empty($this->rel_fields_before_value['account_id']) and
|
||||
(trim($this->account_id) != trim($this->rel_fields_before_value['account_id']))) {
|
||||
//unlink the old record.
|
||||
$this->load_relationship('accounts');
|
||||
$this->accounts->delete($this->id,$this->rel_fields_before_value['account_id']);
|
||||
}
|
||||
|
||||
parent::save_relationship_changes($is_update);
|
||||
|
||||
if (!empty($this->contact_id)) {
|
||||
$this->set_opportunity_contact_relationship($this->contact_id);
|
||||
}
|
||||
}
|
||||
|
||||
function set_opportunity_contact_relationship($contact_id)
|
||||
{
|
||||
global $app_list_strings;
|
||||
$default = $app_list_strings['opportunity_relationship_type_default_key'];
|
||||
$this->load_relationship('contacts');
|
||||
$this->contacts->add($contact_id,array('contact_role'=>$default));
|
||||
}
|
||||
|
||||
function set_notification_body($xtpl, $oppty)
|
||||
{
|
||||
global $app_list_strings;
|
||||
|
||||
$xtpl->assign("OPPORTUNITY_NAME", $oppty->name);
|
||||
$xtpl->assign("OPPORTUNITY_AMOUNT", $oppty->amount);
|
||||
$xtpl->assign("OPPORTUNITY_CLOSEDATE", $oppty->date_closed);
|
||||
$xtpl->assign("OPPORTUNITY_STAGE", (isset($oppty->sales_stage)?$app_list_strings['sales_stage_dom'][$oppty->sales_stage]:""));
|
||||
$xtpl->assign("OPPORTUNITY_DESCRIPTION", $oppty->description);
|
||||
|
||||
return $xtpl;
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function listviewACLHelper(){
|
||||
$array_assign = parent::listviewACLHelper();
|
||||
$is_owner = false;
|
||||
if(!empty($this->account_id)){
|
||||
|
||||
if(!empty($this->account_id_owner)){
|
||||
global $current_user;
|
||||
$is_owner = $current_user->id == $this->account_id_owner;
|
||||
}
|
||||
}
|
||||
if(!ACLController::moduleSupportsACL('Accounts') || ACLController::checkAccess('Accounts', 'view', $is_owner)){
|
||||
$array_assign['ACCOUNT'] = 'a';
|
||||
}else{
|
||||
$array_assign['ACCOUNT'] = 'span';
|
||||
}
|
||||
|
||||
return $array_assign;
|
||||
}
|
||||
|
||||
/**
|
||||
* Static helper function for getting releated account info.
|
||||
*/
|
||||
function get_account_detail($opp_id) {
|
||||
$ret_array = array();
|
||||
$db = DBManagerFactory::getInstance();
|
||||
$query = "SELECT acc.id, acc.name, acc.assigned_user_id "
|
||||
. "FROM accounts acc, accounts_opportunities a_o "
|
||||
. "WHERE acc.id=a_o.account_id"
|
||||
. " AND a_o.opportunity_id='$opp_id'"
|
||||
. " AND a_o.deleted=0"
|
||||
. " AND acc.deleted=0";
|
||||
$result = $db->query($query, true,"Error filling in opportunity account details: ");
|
||||
$row = $db->fetchByAssoc($result);
|
||||
if($row != null) {
|
||||
$ret_array['name'] = $row['name'];
|
||||
$ret_array['id'] = $row['id'];
|
||||
$ret_array['assigned_user_id'] = $row['assigned_user_id'];
|
||||
}
|
||||
return $ret_array;
|
||||
}
|
||||
}
|
||||
function getCurrencyType(){
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
466
modules/Opportunities/OpportunityFormBase.php
Executable file
466
modules/Opportunities/OpportunityFormBase.php
Executable file
@@ -0,0 +1,466 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
class OpportunityFormBase{
|
||||
|
||||
|
||||
function checkForDuplicates($prefix){
|
||||
require_once('include/formbase.php');
|
||||
|
||||
$focus = new Opportunity();
|
||||
$query = '';
|
||||
$baseQuery = 'select id, name, sales_stage,amount, date_closed from opportunities where deleted!=1 and (';
|
||||
|
||||
if(isset($_POST[$prefix.'name']) && !empty($_POST[$prefix.'name'])){
|
||||
$query = $baseQuery ." name like '%".$_POST[$prefix.'name']."%'";
|
||||
$query .= getLikeForEachWord('name', $_POST[$prefix.'name']);
|
||||
}
|
||||
|
||||
if(!empty($query)){
|
||||
$rows = array();
|
||||
global $db;
|
||||
$result = $db->query($query.')');
|
||||
$i=-1;
|
||||
while(($row=$db->fetchByAssoc($result)) != null) {
|
||||
$i++;
|
||||
$rows[$i] = $row;
|
||||
}
|
||||
if ($i==-1) return null;
|
||||
|
||||
return $rows;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
function buildTableForm($rows, $mod='Opportunities'){
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}else global $mod_strings;
|
||||
global $app_strings;
|
||||
$cols = sizeof($rows[0]) * 2 + 1;
|
||||
$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
|
||||
|
||||
$form .= "<form action='index.php' method='post' name='dupOpps'><input type='hidden' name='selectedOpportunity' value=''>";
|
||||
$form .= "<table width='100%' cellpadding='0' cellspacing='0' class='list view'>";
|
||||
$form .= "<tr class='pagination'><td colspan='$cols'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td><input type='submit' class='button' name='ContinueOpportunity' value='${mod_strings['LNK_NEW_OPPORTUNITY']}'></td></tr></table></td></tr><tr>";
|
||||
$form .= "<tr><td scope='col'> </td>";
|
||||
require_once('include/formbase.php');
|
||||
$form .= getPostToForm();
|
||||
if(isset($rows[0])){
|
||||
foreach ($rows[0] as $key=>$value){
|
||||
if($key != 'id'){
|
||||
$form .= "<td scope='col'>". $mod_strings[$mod_strings['db_'.$key]]. "</td>";
|
||||
}}
|
||||
$form .= "</tr>";
|
||||
}
|
||||
|
||||
$rowColor = 'oddListRowS1';
|
||||
foreach($rows as $row){
|
||||
|
||||
$form .= "<tr class='$rowColor'>";
|
||||
|
||||
$form .= "<td width='1%' nowrap='nowrap'><a href='#' onclick='document.dupOpps.selectedOpportunity.value=\"${row['id']}\";document.dupOpps.submit();'>[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>";
|
||||
$wasSet = false;
|
||||
foreach ($row as $key=>$value){
|
||||
if($key != 'id'){
|
||||
if(!$wasSet){
|
||||
$form .= "<td scope='row'><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>";
|
||||
$wasSet = true;
|
||||
}else{
|
||||
$form .= "<td><a target='_blank' href='index.php?module=Opportunities&action=DetailView&record=${row['id']}'>$value</a></td>";
|
||||
}
|
||||
}}
|
||||
|
||||
if($rowColor == 'evenListRowS1'){
|
||||
$rowColor = 'oddListRowS1';
|
||||
}else{
|
||||
$rowColor = 'evenListRowS1';
|
||||
}
|
||||
$form .= "</tr>";
|
||||
}
|
||||
$form .= "<tr class='pagination'><td colspan='$cols'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td><input type='submit' class='button' name='ContinueOpportunity' value='${mod_strings['LNK_NEW_OPPORTUNITY']}'></td></tr></table></td></tr><tr>";
|
||||
$form .= "</table><BR></form>";
|
||||
|
||||
return $form;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getForm($prefix, $mod='Opportunities'){
|
||||
if(!ACLController::checkAccess('Opportunities', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}else global $mod_strings;
|
||||
global $app_strings;
|
||||
global $sugar_version, $sugar_config;
|
||||
|
||||
|
||||
$lbl_save_button_title = $app_strings['LBL_SAVE_BUTTON_TITLE'];
|
||||
$lbl_save_button_key = $app_strings['LBL_SAVE_BUTTON_KEY'];
|
||||
$lbl_save_button_label = $app_strings['LBL_SAVE_BUTTON_LABEL'];
|
||||
|
||||
|
||||
$the_form = get_left_form_header($mod_strings['LBL_NEW_FORM_TITLE']);
|
||||
$the_form .= <<<EOQ
|
||||
<form name="{$prefix}OppSave" onSubmit="return check_form('{$prefix}OppSave')" method="POST" action="index.php">
|
||||
<input type="hidden" name="{$prefix}module" value="Opportunities">
|
||||
<input type="hidden" name="${prefix}action" value="Save">
|
||||
EOQ;
|
||||
$the_form .= $this->getFormBody($prefix, $mod, "{$prefix}OppSave");
|
||||
$the_form .= <<<EOQ
|
||||
<input title="$lbl_save_button_title" accessKey="$lbl_save_button_key" class="button" type="submit" name="button" value=" $lbl_save_button_label " >
|
||||
</form>
|
||||
|
||||
EOQ;
|
||||
$the_form .= get_left_form_footer();
|
||||
$the_form .= get_validate_record_js();
|
||||
|
||||
return $the_form;
|
||||
}
|
||||
|
||||
function getWideFormBody($prefix, $mod='Opportunities', $formname='', $lead='', $showaccount = true){
|
||||
if(!ACLController::checkAccess('Opportunities', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
if(empty($lead)){
|
||||
$lead = new Lead();
|
||||
}
|
||||
global $mod_strings, $sugar_config;
|
||||
$showaccount = $showaccount && $sugar_config['require_accounts'];
|
||||
$temp_strings = $mod_strings;
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $theme;
|
||||
global $current_user;
|
||||
global $timedate;
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// global $current_language;
|
||||
// global $default_language;
|
||||
// global $cal_codes;
|
||||
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$lbl_opportunity_name = $mod_strings['LBL_OPPORTUNITY_NAME'];
|
||||
$lbl_sales_stage = $mod_strings['LBL_SALES_STAGE'];
|
||||
$lbl_date_closed = $mod_strings['LBL_DATE_CLOSED'];
|
||||
$lbl_amount = $mod_strings['LBL_AMOUNT'];
|
||||
$lbl_probability = $mod_strings['LBL_PROBABILITY'];
|
||||
$json = getJSONobj();
|
||||
$prob_array = $json->encode($app_list_strings['sales_probability_dom']);
|
||||
//$prePopProb = '';
|
||||
//if(empty($this->bean->id))
|
||||
$prePopProb = 'document.getElementsByName(\''.$prefix.'sales_stage\')[0].onchange();';
|
||||
$probability_script=<<<EOQ
|
||||
<script>
|
||||
prob_array = $prob_array;
|
||||
document.getElementsByName('{$prefix}sales_stage')[0].onchange = function() {
|
||||
if(typeof(document.getElementsByName('{$prefix}sales_stage')[0].value) != "undefined" && prob_array[document.getElementsByName('{$prefix}sales_stage')[0].value]) {
|
||||
document.getElementsByName('{$prefix}probability')[0].value = prob_array[document.getElementsByName('{$prefix}sales_stage')[0].value];
|
||||
}
|
||||
};
|
||||
$prePopProb
|
||||
</script>
|
||||
EOQ;
|
||||
|
||||
$ntc_date_format = $timedate->get_user_date_format();
|
||||
$cal_dateformat = $timedate->get_cal_date_format();
|
||||
if (isset($lead->assigned_user_id)) {
|
||||
$user_id=$lead->assigned_user_id;
|
||||
} else {
|
||||
$user_id = $current_user->id;
|
||||
}
|
||||
|
||||
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// $cal_lang = (empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
|
||||
$cal_lang = "en";
|
||||
|
||||
$the_form="";
|
||||
|
||||
|
||||
if (isset($lead->opportunity_amount)) {
|
||||
$opp_amount=$lead->opportunity_amount;
|
||||
} else {
|
||||
$opp_amount='';
|
||||
}
|
||||
$jsCalendarImage = SugarThemeRegistry::current()->getImageURL('jscalendar.gif');
|
||||
$the_form .= <<<EOQ
|
||||
|
||||
<input type="hidden" name="{$prefix}record" value="">
|
||||
<input type="hidden" name="{$prefix}account_name">
|
||||
<input type="hidden" name="{$prefix}assigned_user_id" value='${user_id}'>
|
||||
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width="20%" scope="row">$lbl_opportunity_name <span class="required">$lbl_required_symbol</span></td>
|
||||
<td width="80%" scope="row">{$mod_strings['LBL_DESCRIPTION']}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td ><input name='{$prefix}name' type="text" value="{$lead->opportunity_name}"></td>
|
||||
<td rowspan="7"><textarea name='{$prefix}description' rows='5' cols='50'></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row">$lbl_date_closed <span class="required">$lbl_required_symbol</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td ><input name='{$prefix}date_closed' onblur="parseDate(this, '$cal_dateformat');" size='12' maxlength='10' id='${prefix}jscal_field' type="text" value=""> <img src="{$jsCalendarImage}" alt="{$app_strings['LBL_ENTER_DATE']}" id="${prefix}jscal_trigger" align="absmiddle"></td>
|
||||
</tr>
|
||||
EOQ;
|
||||
if($showaccount){
|
||||
$the_form .= <<<EOQ
|
||||
<tr>
|
||||
<td scope="row">${mod_strings['LBL_ACCOUNT_NAME']} <span class="required">${lbl_required_symbol}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td ><input readonly id='qc_account_name' name='account_name' type='text' value="" size="16"><input id='qc_account_id' name='account_id' type="hidden" value=''> <input title="{$app_strings['LBL_SELECT_BUTTON_TITLE']}" accessKey="{$app_strings['LBL_SELECT_BUTTON_KEY']}" type="button" class="button" value='{$app_strings['LBL_SELECT_BUTTON_LABEL']}' name=btn1 LANGUAGE=javascript onclick='return window.open("index.php?module=Accounts&action=Popup&html=Popup_picker&form={$formname}&form_submit=false","","width=600,height=400,resizable=1,scrollbars=1");'></td>
|
||||
</tr>
|
||||
EOQ;
|
||||
}
|
||||
$the_form .= <<<EOQ
|
||||
<tr>
|
||||
<td scope="row">$lbl_sales_stage <span class="required">$lbl_required_symbol</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td ><select name='{$prefix}sales_stage'>
|
||||
EOQ;
|
||||
$the_form .= get_select_options_with_id($app_list_strings['sales_stage_dom'], "");
|
||||
$the_form .= <<<EOQ
|
||||
</select></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row">$lbl_amount <span class="required">$lbl_required_symbol</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td ><input name='{$prefix}amount' type="text" value='{$opp_amount}'></td>
|
||||
</tr>
|
||||
EOQ;
|
||||
//carry forward custom lead fields to opportunities during Lead Conversion
|
||||
$tempOpp = new Opportunity();
|
||||
if (method_exists($lead, 'convertCustomFieldsForm')) $lead->convertCustomFieldsForm($the_form, $tempOpp, $prefix);
|
||||
unset($tempOpp);
|
||||
|
||||
$the_form .= <<<EOQ
|
||||
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
Calendar.setup ({
|
||||
inputField : "{$prefix}jscal_field", ifFormat : "$cal_dateformat", showsTime : false, button : "${prefix}jscal_trigger", singleClick : true, step : 1, weekNumbers:false
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
EOQ;
|
||||
|
||||
|
||||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new Opportunity());
|
||||
$javascript->addRequiredFields($prefix);
|
||||
$the_form .=$javascript->getScript();
|
||||
$mod_strings = $temp_strings;
|
||||
return $the_form;
|
||||
|
||||
} // end getWideFormBody
|
||||
|
||||
function getFormBody($prefix, $mod='Opportunities', $formname=''){
|
||||
if(!ACLController::checkAccess('Opportunities', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}else global $mod_strings;
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
global $theme;
|
||||
global $current_user;
|
||||
global $sugar_config;
|
||||
global $timedate;
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// global $current_language;
|
||||
// global $default_language;
|
||||
// global $cal_codes;
|
||||
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$lbl_opportunity_name = $mod_strings['LBL_OPPORTUNITY_NAME'];
|
||||
$lbl_sales_stage = $mod_strings['LBL_SALES_STAGE'];
|
||||
$lbl_date_closed = $mod_strings['LBL_DATE_CLOSED'];
|
||||
$lbl_amount = $mod_strings['LBL_AMOUNT'];
|
||||
|
||||
$ntc_date_format = $timedate->get_user_date_format();
|
||||
$cal_dateformat = $timedate->get_cal_date_format();
|
||||
|
||||
$user_id = $current_user->id;
|
||||
|
||||
// Unimplemented until jscalendar language files are fixed
|
||||
// $cal_lang = (empty($cal_codes[$current_language])) ? $cal_codes[$default_language] : $cal_codes[$current_language];
|
||||
$cal_lang = "en";
|
||||
|
||||
$the_form = <<<EOQ
|
||||
<p>
|
||||
<input type="hidden" name="{$prefix}record" value="">
|
||||
<input type="hidden" name="{$prefix}assigned_user_id" value='${user_id}'>
|
||||
|
||||
$lbl_opportunity_name <span class="required">$lbl_required_symbol</span><br>
|
||||
<input name='{$prefix}name' type="text" value="">
|
||||
EOQ;
|
||||
if($sugar_config['require_accounts']){
|
||||
|
||||
///////////////////////////////////////
|
||||
///
|
||||
/// SETUP ACCOUNT POPUP
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return',
|
||||
'form_name' => "{$prefix}OppSave",
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'account_id',
|
||||
'name' => 'account_name',
|
||||
),
|
||||
);
|
||||
|
||||
$json = getJSONobj();
|
||||
$encoded_popup_request_data = $json->encode($popup_request_data);
|
||||
|
||||
//
|
||||
///////////////////////////////////////
|
||||
|
||||
$the_form .= <<<EOQ
|
||||
${mod_strings['LBL_ACCOUNT_NAME']} <span class="required">${lbl_required_symbol}</span><br>
|
||||
<input class='sqsEnabled' autocomplete='off' id='qc_account_name' name='account_name' type='text' value="" size="16"><input id='qc_account_id' name='account_id' type="hidden" value=''> <input title="{$app_strings['LBL_SELECT_BUTTON_TITLE']}" accessKey="{$app_strings['LBL_SELECT_BUTTON_KEY']}" type="button" class="button" value='{$app_strings['LBL_SELECT_BUTTON_LABEL']}' name=btn1
|
||||
onclick='open_popup("Accounts", 600, 400, "", true, false, {$encoded_popup_request_data});' /><br>
|
||||
EOQ;
|
||||
}
|
||||
$jsCalendarImage = SugarThemeRegistry::current()->getImageURL('jscalendar.gif');
|
||||
$the_form .= <<<EOQ
|
||||
$lbl_date_closed <span class="required">$lbl_required_symbol</span> <br><span class="dateFormat">$ntc_date_format</span><br>
|
||||
<input name='{$prefix}date_closed' size='12' maxlength='10' id='{$prefix}jscal_field' type="text" value=""> <img src="{$jsCalendarImage}" alt="{$app_strings['LBL_ENTER_DATE']}" id="jscal_trigger" align="absmiddle"><br>
|
||||
$lbl_sales_stage <span class="required">$lbl_required_symbol</span><br>
|
||||
<select name='{$prefix}sales_stage'>
|
||||
EOQ;
|
||||
$the_form .= get_select_options_with_id($app_list_strings['sales_stage_dom'], "");
|
||||
$the_form .= <<<EOQ
|
||||
</select><br>
|
||||
$lbl_amount <span class="required">$lbl_required_symbol</span><br>
|
||||
<input name='{$prefix}amount' type="text"></p>
|
||||
<input type='hidden' name='lead_source' value=''>
|
||||
<script type="text/javascript">
|
||||
Calendar.setup ({
|
||||
inputField : "{$prefix}jscal_field", daFormat : "$cal_dateformat", ifFormat : "$cal_dateformat", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1, weekNumbers:false
|
||||
});
|
||||
</script>
|
||||
EOQ;
|
||||
|
||||
|
||||
require_once('include/QuickSearchDefaults.php');
|
||||
$qsd = new QuickSearchDefaults();
|
||||
$sqs_objects = array('qc_account_name' => $qsd->getQSParent());
|
||||
$sqs_objects['qc_account_name']['populate_list'] = array('qc_account_name', 'qc_account_id');
|
||||
$quicksearch_js = '<script type="text/javascript" language="javascript">sqs_objects = ' . $json->encode($sqs_objects) . '</script>';
|
||||
$the_form .= $quicksearch_js;
|
||||
|
||||
|
||||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new Opportunity());
|
||||
$javascript->addRequiredFields($prefix);
|
||||
$the_form .=$javascript->getScript();
|
||||
|
||||
|
||||
return $the_form;
|
||||
|
||||
}
|
||||
|
||||
|
||||
function handleSave($prefix,$redirect=true, $useRequired=false){
|
||||
global $current_user;
|
||||
|
||||
|
||||
require_once('include/formbase.php');
|
||||
|
||||
$focus = new Opportunity();
|
||||
if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))){
|
||||
return null;
|
||||
}
|
||||
|
||||
if(empty($_POST['currency_id'])){
|
||||
$currency_id = $current_user->getPreference('currency');
|
||||
if(isset($currency_id)){
|
||||
$focus->currency_id = $currency_id;
|
||||
}
|
||||
}
|
||||
$focus = populateFromPost($prefix, $focus);
|
||||
if( !ACLController::checkAccess($focus->module_dir, 'edit', $focus->isOwner($current_user->id))){
|
||||
ACLController::displayNoAccess(true);
|
||||
}
|
||||
$check_notify = FALSE;
|
||||
if (isset($GLOBALS['check_notify'])) {
|
||||
$check_notify = $GLOBALS['check_notify'];
|
||||
}
|
||||
|
||||
$focus->save($check_notify);
|
||||
|
||||
if(!empty($_POST['duplicate_parent_id'])){
|
||||
clone_relationship($focus->db, array('opportunities_contacts'),'opportunity_id', $_POST['duplicate_parent_id'], $focus->id);
|
||||
}
|
||||
$return_id = $focus->id;
|
||||
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
|
||||
if($redirect){
|
||||
handleRedirect($return_id,"Opportunities" );
|
||||
}else{
|
||||
return $focus;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
48
modules/Opportunities/Save.php
Executable file
48
modules/Opportunities/Save.php
Executable file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('modules/Opportunities/OpportunityFormBase.php');
|
||||
$opportunityForm = new OpportunityFormBase();
|
||||
$opportunityForm->handleSave('', true, false);
|
||||
?>
|
||||
47
modules/Opportunities/SaveOverload.php
Executable file
47
modules/Opportunities/SaveOverload.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
function perform_save(&$focus){
|
||||
|
||||
//US DOLLAR
|
||||
if(isset($focus->amount) && !number_empty($focus->amount)){
|
||||
$currency = new Currency();
|
||||
$currency->retrieve($focus->currency_id);
|
||||
$focus->amount_usdollar = $currency->convertToDollar($focus->amount);
|
||||
}
|
||||
}
|
||||
?>
|
||||
62
modules/Opportunities/SubPanelView.html
Executable file
62
modules/Opportunities/SubPanelView.html
Executable file
@@ -0,0 +1,62 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* {APP.LBL_CURRENCY_SYM}Header: /cvsroot/sugarcrm/sugarcrm/modules/Opportunities/SubPanelView.html,v 1.5 2004/06/16 17:49:36 sugarclint Exp {APP.LBL_CURRENCY_SYM}
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view">
|
||||
<tr height="20" >
|
||||
<td scope="col" scope="col" width="50%" ><slot>{MOD.LBL_LIST_OPPORTUNITY_NAME}</slot></td>
|
||||
<td scope="col" width="30%" ><slot>{MOD.LBL_LIST_ACCOUNT_NAME}</slot></td>
|
||||
<td scope="col" width="20%" ><slot>{MOD.LBL_LIST_DATE_CLOSED}</slot></td>
|
||||
<td scope="col" width="20%" ><slot> </slot></td>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" class="{ROW_COLOR}S1">
|
||||
<td scope="row" valign=TOP><slot><a href="{URL_PREFIX}index.php?action=DetailView&module=Opportunities&record={OPPORTUNITY.ID}" >{OPPORTUNITY.NAME}</a></slot></td>
|
||||
<td valign=TOP><slot><a href="{URL_PREFIX}index.php?action=DetailView&module=Accounts&record={OPPORTUNITY.ACCOUNT_ID}" >{OPPORTUNITY.ACCOUNT_NAME}</A></slot></td>
|
||||
<td valign=TOP><slot>{OPPORTUNITY.DATE_CLOSED}</slot></td>
|
||||
<td nowrap align="center" valign=TOP><slot><a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=EditView&module=Opportunities&record={OPPORTUNITY.ID}{RETURN_URL}">{EDIT_INLINE_PNG}</a> <a class="listViewTdToolsS1" href="{URL_PREFIX}index.php?action=EditView&module=Opportunities&record={OPPORTUNITY.ID}{RETURN_URL}">{APP.LNK_EDIT}</a></slot></td>
|
||||
</tr>
|
||||
|
||||
<!-- END: row -->
|
||||
|
||||
</table>
|
||||
<!-- END: main -->
|
||||
144
modules/Opportunities/SubPanelView.php
Executable file
144
modules/Opportunities/SubPanelView.php
Executable file
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
|
||||
global $current_language;
|
||||
$current_module_strings = return_module_language($current_language, 'Opportunities');
|
||||
|
||||
global $currentModule;
|
||||
|
||||
global $theme;
|
||||
global $focus;
|
||||
global $action;
|
||||
|
||||
|
||||
|
||||
|
||||
// focus_list is the means of passing data to a SubPanelView.
|
||||
global $focus_list;
|
||||
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
$button .= "<input type='hidden' name='module' value='Opportunities'>\n";
|
||||
if ($currentModule == 'Accounts') $button .= "<input type='hidden' name='account_id' value='$focus->id'>\n<input type='hidden' name='account_name' value=\"".urlencode($focus->name)."\">\n";
|
||||
if ($currentModule == 'Contacts') {
|
||||
$button .= "<input type='hidden' name='account_id' value='$focus->account_id'>\n<input type='hidden' name='account_name' value=\"".urlencode($focus->account_name)."\">\n";
|
||||
$button .= "<input type='hidden' name='contact_id' value='$focus->id'>\n";
|
||||
}
|
||||
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
|
||||
$button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
|
||||
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
|
||||
$button .= "<input type='hidden' name='action'>\n";
|
||||
|
||||
$button .= "<input title='".$app_strings['LBL_NEW_BUTTON_TITLE']."' accessyKey='".$app_strings['LBL_NEW_BUTTON_KEY']."' class='button' onclick=\"this.form.action.value='EditView'\" type='submit' name='New' value=' ".$app_strings['LBL_NEW_BUTTON_LABEL']." '>\n";
|
||||
if ($currentModule == 'Accounts')
|
||||
{
|
||||
///////////////////////////////////////
|
||||
///
|
||||
/// SETUP PARENT POPUP
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return_and_save',
|
||||
'form_name' => 'DetailView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'opportunity_id',
|
||||
),
|
||||
);
|
||||
|
||||
$json = getJSONobj();
|
||||
$encoded_popup_request_data = $json->encode($popup_request_data);
|
||||
|
||||
//
|
||||
///////////////////////////////////////
|
||||
|
||||
$button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']
|
||||
."' accessyKey='".$app_strings['LBL_SELECT_BUTTON_KEY']
|
||||
."' type='button' class='button' value=' ".$app_strings['LBL_SELECT_BUTTON_LABEL']
|
||||
." ' name='button' onclick='open_popup(\"Opportunities\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
|
||||
// ." ' name='button' onclick='window.open(\"index.php?module=Opportunities&action=Popup&html=Popup_picker&form=DetailView&form_submit=true\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
///////////////////////////////////////
|
||||
///
|
||||
/// SETUP PARENT POPUP
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return_and_save',
|
||||
'form_name' => 'DetailView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'opportunity_id',
|
||||
),
|
||||
);
|
||||
|
||||
$json = getJSONobj();
|
||||
$encoded_popup_request_data = $json->encode($popup_request_data);
|
||||
|
||||
//
|
||||
///////////////////////////////////////
|
||||
|
||||
$button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']
|
||||
."' accessyKey='".$app_strings['LBL_SELECT_BUTTON_KEY']
|
||||
."' type='button' class='button' value=' ".$app_strings['LBL_SELECT_BUTTON_LABEL']
|
||||
." ' name='button' onclick='open_popup(\"Opportunities\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
|
||||
// ." ' name='button' onclick='window.open(\"index.php?module=Opportunities&action=Popup&html=Popup_picker&form=ContactDetailView&form_submit=true&query=true&account_id=$focus->account_id&account_name=$focus->account_name\",\"new\",\"width=600,height=400,resizable=1,scrollbars=1\");'>\n";
|
||||
}
|
||||
$button .= "</form>\n";
|
||||
$header_text = '';
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=Opportunities&record=". $_REQUEST['record']."'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>";
|
||||
}
|
||||
$ListView = new ListView();
|
||||
$ListView->initNewXTemplate( 'modules/Opportunities/SubPanelView.html',$current_module_strings);
|
||||
$ListView->xTemplateAssign("RETURN_URL", "&return_module=".$currentModule."&return_action=DetailView&return_id={$_REQUEST['record']}");
|
||||
$ListView->xTemplateAssign("EDIT_INLINE_PNG", SugarThemeRegistry::current()->getImage('edit_inline','align="absmiddle" alt="'.$app_strings['LNK_EDIT'].'" border="0"'));
|
||||
$ListView->setHeaderTitle($current_module_strings['LBL_MODULE_NAME']. $header_text );
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->processListView($focus_list, "main", "OPPORTUNITY");
|
||||
|
||||
?>
|
||||
67
modules/Opportunities/SubPanelViewProjects.html
Executable file
67
modules/Opportunities/SubPanelViewProjects.html
Executable file
@@ -0,0 +1,67 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
* {APP.LBL_CURRENCY_SYM}Header: /cvsroot/sugarcrm/sugarcrm/modules/Opportunities/SubPanelView.html,v 1.5 2004/06/16 17:49:36 sugarclint Exp {APP.LBL_CURRENCY_SYM}
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0" class="list view">
|
||||
<tr height="20" >
|
||||
<td scope="col" scope="col" width="50%" ><slot>{MOD.LBL_LIST_OPPORTUNITY_NAME}</slot></td>
|
||||
<td scope="col" width="30%" ><slot>{MOD.LBL_LIST_ACCOUNT_NAME}</slot></td>
|
||||
<td scope="col" width="20%" ><slot>{MOD.LBL_LIST_DATE_CLOSED}</slot></td>
|
||||
<td scope="col" width="20%" ><slot> </slot></td>
|
||||
</tr>
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" class="{ROW_COLOR}S1">
|
||||
<td scope="row" valign=TOP><slot><a href="{URL_PREFIX}index.php?action=DetailView&module=Opportunities&record={OPPORTUNITY.ID}" >{OPPORTUNITY.NAME}</a></slot></td>
|
||||
<td valign=TOP><slot><a href="{URL_PREFIX}index.php?action=DetailView&module=Accounts&record={OPPORTUNITY.ACCOUNT_ID}" >{OPPORTUNITY.ACCOUNT_NAME}</A></slot></td>
|
||||
<td valign=TOP><slot>{OPPORTUNITY.DATE_CLOSED}</slot></td>
|
||||
<td nowrap align="center" valign=TOP><slot><a
|
||||
class="listViewTdToolsS1"
|
||||
onclick="return confirm('{MOD.OPPORTUNITY_REMOVE_PROJECT_CONFIRM}');"
|
||||
href="{URL_PREFIX}index.php?module=ProjectRelation&action=Delete&relation_id={OPPORTUNITY.ID}{RETURN_URL}"
|
||||
>{REMOVE_INLINE_PNG}</a> <a
|
||||
class="listViewTdToolsS1"
|
||||
onclick="return confirm('{MOD.OPPORTUNITY_REMOVE_PROJECT_CONFIRM}');"
|
||||
href="{URL_PREFIX}index.php?module=ProjectRelation&action=Delete&relation_id={OPPORTUNITY.ID}{RETURN_URL}"
|
||||
>{APP.LNK_REMOVE}</a></slot></td>
|
||||
</tr>
|
||||
|
||||
<!-- END: row -->
|
||||
|
||||
</table>
|
||||
<!-- END: main -->
|
||||
110
modules/Opportunities/SubPanelViewProjects.php
Executable file
110
modules/Opportunities/SubPanelViewProjects.php
Executable file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: TODO: To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
//we don't want the parent module's string file, but rather the string file specifc to this subpanel
|
||||
global $current_language;
|
||||
$current_module_strings = return_module_language($current_language, 'Opportunities');
|
||||
$project_module_strings = return_module_language($current_language, 'Project');
|
||||
|
||||
global $currentModule;
|
||||
|
||||
global $theme;
|
||||
global $focus;
|
||||
global $action;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////
|
||||
///
|
||||
/// SETUP PARENT POPUP
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'set_return_and_save',
|
||||
'form_name' => 'DetailView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'opportunity_id',
|
||||
),
|
||||
);
|
||||
|
||||
$json = getJSONobj();
|
||||
$encoded_popup_request_data = $json->encode($popup_request_data);
|
||||
|
||||
//
|
||||
///////////////////////////////////////
|
||||
|
||||
// focus_list is the means of passing data to a SubPanelView.
|
||||
global $focus_list;
|
||||
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
$button .= "<input type='hidden' name='module' value='Opportunities'>\n";
|
||||
$button .= "<input type='hidden' name='return_module' value='".$currentModule."'>\n";
|
||||
$button .= "<input type='hidden' name='return_action' value='".$action."'>\n";
|
||||
$button .= "<input type='hidden' name='return_id' value='".$focus->id."'>\n";
|
||||
$button .= "<input type='hidden' name='action'>\n";
|
||||
$button .= "<input title='".$app_strings['LBL_SELECT_BUTTON_TITLE']
|
||||
."' accessyKey='".$app_strings['LBL_SELECT_BUTTON_KEY']
|
||||
."' type='button' class='button' value=' "
|
||||
.$app_strings['LBL_SELECT_BUTTON_LABEL']
|
||||
." ' name='button' onclick='open_popup(\"Opportunities\", 600, 400, \"\", false, true, {$encoded_popup_request_data});'>\n";
|
||||
$button .= "</form>\n";
|
||||
$header_text = '';
|
||||
if(is_admin($current_user) && $_REQUEST['module'] != 'DynamicLayout' && !empty($_SESSION['editinplace'])){
|
||||
$header_text = " <a href='index.php?action=index&module=DynamicLayout&from_action=SubPanelView&from_module=Opportunities&record=". $_REQUEST['record']."'>".SugarThemeRegistry::current()->getImage("EditLayout","border='0' alt='Edit Layout' align='bottom'")."</a>";
|
||||
}
|
||||
$ListView = new ListView();
|
||||
$ListView->initNewXTemplate('modules/Opportunities/SubPanelViewProjects.html',$current_module_strings);
|
||||
$ListView->xTemplateAssign("RETURN_URL", "&return_module=".$currentModule."&return_action=DetailView&return_id={$_REQUEST['record']}");
|
||||
$ListView->xTemplateAssign("REMOVE_INLINE_PNG", SugarThemeRegistry::current()->getImage('delete_inline','align="absmiddle" alt="'.$app_strings['LNK_REMOVE'].'" border="0"'));
|
||||
$ListView->setHeaderTitle($project_module_strings['LBL_OPPORTUNITY_SUBPANEL_TITLE']. $header_text );
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->processListView($focus_list, "main", "OPPORTUNITY");
|
||||
|
||||
?>
|
||||
62
modules/Opportunities/SugarFeeds/OppFeed.php
Executable file
62
modules/Opportunities/SugarFeeds/OppFeed.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('modules/SugarFeed/feedLogicBase.php');
|
||||
|
||||
|
||||
class OppFeed extends FeedLogicBase {
|
||||
var $module = "Opportunities";
|
||||
function pushFeed($bean, $event, $arguments){
|
||||
$text = '';
|
||||
if(empty($bean->fetched_row)){
|
||||
$currency = new Currency();
|
||||
$currency->retrieve($bean->currency_id);
|
||||
$text = '{SugarFeed.CREATED_OPPORTUNITY} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->name . '] {SugarFeed.WITH} [Accounts:' . $bean->account_id . ':' . $bean->account_name . '] {SugarFeed.FOR} ' . $currency->symbol. format_number($bean->amount);
|
||||
}else{
|
||||
if(!empty($bean->fetched_row['sales_stage']) && $bean->fetched_row['sales_stage'] != $bean->sales_stage && $bean->sales_stage == 'Closed Won'){
|
||||
$currency = new Currency();
|
||||
$currency->retrieve($bean->currency_id);
|
||||
$text = '{SugarFeed.WON_OPPORTUNITY} [' . $bean->module_dir . ':' . $bean->id . ':' . $bean->name . '] {SugarFeed.WITH} [Accounts:' . $bean->account_id . ':' . $bean->account_name . '] {SugarFeed.FOR} '. $currency->symbol . format_number($bean->amount);
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($text)){
|
||||
SugarFeed::pushFeed2($text, $bean);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
68
modules/Opportunities/field_arrays.php
Executable file
68
modules/Opportunities/field_arrays.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Contains field arrays that are used for caching
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$fields_array['Opportunity'] = array ('column_fields' => Array("id"
|
||||
, "name"
|
||||
, "opportunity_type"
|
||||
, "lead_source"
|
||||
, "amount"
|
||||
, "currency_id"
|
||||
, "amount_usdollar"
|
||||
, "date_entered"
|
||||
, "date_modified"
|
||||
, "modified_user_id"
|
||||
, "assigned_user_id"
|
||||
, "created_by"
|
||||
, "date_closed"
|
||||
, "next_step"
|
||||
, "sales_stage"
|
||||
, "probability"
|
||||
, "description"
|
||||
,"campaign_id"
|
||||
),
|
||||
'list_fields' => Array('id', 'name', 'account_id', 'sales_stage', 'account_name', 'date_closed', 'amount', 'assigned_user_name', 'assigned_user_id','sales_stage','probability','lead_source','opportunity_type'
|
||||
, "amount_usdollar"
|
||||
),
|
||||
'required_fields' => Array('name'=>1, 'date_closed'=>2, 'amount'=>3, 'sales_stage'=>4, 'account_name'=>5),
|
||||
);
|
||||
?>
|
||||
144
modules/Opportunities/language/en_us.lang.php
Executable file
144
modules/Opportunities/language/en_us.lang.php
Executable file
@@ -0,0 +1,144 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_MODULE_NAME' => 'Opportunities',
|
||||
'LBL_MODULE_TITLE' => 'Opportunities: Home',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Opportunity Search',
|
||||
'LBL_VIEW_FORM_TITLE' => 'Opportunity View',
|
||||
'LBL_LIST_FORM_TITLE' => 'Opportunity List',
|
||||
'LBL_OPPORTUNITY_NAME' => 'Opportunity Name:',
|
||||
'LBL_OPPORTUNITY' => 'Opportunity:',
|
||||
'LBL_NAME' => 'Opportunity Name',
|
||||
'LBL_INVITEE' => 'Contacts',
|
||||
'LBL_CURRENCIES' => 'Currencies',
|
||||
'LBL_LIST_OPPORTUNITY_NAME' => 'Name',
|
||||
'LBL_LIST_ACCOUNT_NAME' => 'Account Name',
|
||||
'LBL_LIST_AMOUNT' => 'Opportunity Amount',
|
||||
'LBL_LIST_AMOUNT_USDOLLAR' => 'Amount',
|
||||
'LBL_LIST_DATE_CLOSED' => 'Close',
|
||||
'LBL_LIST_SALES_STAGE' => 'Sales Stage',
|
||||
'LBL_ACCOUNT_ID'=>'Account ID',
|
||||
'LBL_CURRENCY_ID'=>'Currency ID',
|
||||
'LBL_CURRENCY_NAME'=>'Currency Name',
|
||||
'LBL_CURRENCY_SYMBOL'=>'Currency Symbol',
|
||||
//DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_sales_stage' => 'LBL_LIST_SALES_STAGE',
|
||||
'db_name' => 'LBL_NAME',
|
||||
'db_amount' => 'LBL_LIST_AMOUNT',
|
||||
'db_date_closed' => 'LBL_LIST_DATE_CLOSED',
|
||||
//END DON'T CONVERT
|
||||
'UPDATE' => 'Opportunity - Currency Update',
|
||||
'UPDATE_DOLLARAMOUNTS' => 'Update U.S. Dollar Amounts',
|
||||
'UPDATE_VERIFY' => 'Verify Amounts',
|
||||
'UPDATE_VERIFY_TXT' => 'Verifies that the amount values in opportunities are valid decimal numbers with only numeric characters(0-9) and decimals(.)',
|
||||
'UPDATE_FIX' => 'Fix Amounts',
|
||||
'UPDATE_FIX_TXT' => 'Attempts to fix any invalid amounts by creating a valid decimal from the current amount. Any modified amount is backed up in the amount_backup database field. If you run this and notice bugs, do not rerun it without restoring from the backup as it may overwrite the backup with new invalid data.',
|
||||
'UPDATE_DOLLARAMOUNTS_TXT' => 'Update the U.S. Dollar amounts for opportunities based on the current set currency rates. This value is used to calculate Graphs and List View Currency Amounts.',
|
||||
'UPDATE_CREATE_CURRENCY' => 'Creating New Currency:',
|
||||
'UPDATE_VERIFY_FAIL' => 'Record Failed Verification:',
|
||||
'UPDATE_VERIFY_CURAMOUNT' => 'Current Amount:',
|
||||
'UPDATE_VERIFY_FIX' => 'Running Fix would give',
|
||||
'UPDATE_INCLUDE_CLOSE' => 'Include Closed Records',
|
||||
'UPDATE_VERIFY_NEWAMOUNT' => 'New Amount:',
|
||||
'UPDATE_VERIFY_NEWCURRENCY' => 'New Currency:',
|
||||
'UPDATE_DONE' => 'Done',
|
||||
'UPDATE_BUG_COUNT' => 'Bugs Found and Attempted to Resolve:',
|
||||
'UPDATE_BUGFOUND_COUNT' => 'Bugs Found:',
|
||||
'UPDATE_COUNT' => 'Records Updated:',
|
||||
'UPDATE_RESTORE_COUNT' => 'Record Amounts Restored:',
|
||||
'UPDATE_RESTORE' => 'Restore Amounts',
|
||||
'UPDATE_RESTORE_TXT' => 'Restores amount values from the backups created during fix.',
|
||||
'UPDATE_FAIL' => 'Could not update - ',
|
||||
'UPDATE_NULL_VALUE' => 'Amount is NULL setting it to 0 -',
|
||||
'UPDATE_MERGE' => 'Merge Currencies',
|
||||
'UPDATE_MERGE_TXT' => 'Merge multiple currencies into a single currency. If there are multiple currency records for the same currency, you merge them together. This will also merge the currencies for all other modules.',
|
||||
'LBL_ACCOUNT_NAME' => 'Account Name:',
|
||||
'LBL_AMOUNT' => 'Opportunity Amount:',
|
||||
'LBL_AMOUNT_USDOLLAR' => 'Amount:',
|
||||
'LBL_CURRENCY' => 'Currency:',
|
||||
'LBL_DATE_CLOSED' => 'Expected Close Date:',
|
||||
'LBL_TYPE' => 'Type:',
|
||||
'LBL_CAMPAIGN' => 'Campaign:',
|
||||
'LBL_NEXT_STEP' => 'Next Step:',
|
||||
'LBL_LEAD_SOURCE' => 'Lead Source:',
|
||||
'LBL_SALES_STAGE' => 'Sales Stage:',
|
||||
'LBL_PROBABILITY' => 'Probability (%):',
|
||||
'LBL_DESCRIPTION' => 'Description:',
|
||||
'LBL_DUPLICATE' => 'Possible Duplicate Opportunity',
|
||||
'MSG_DUPLICATE' => 'The opportunity record you are about to create might be a duplicate of a opportunity record that already exists. Opportunity records containing similar names are listed below.<br>Click Save to continue creating this new opportunity, or click Cancel to return to the module without creating the opportunity.',
|
||||
'LBL_NEW_FORM_TITLE' => 'Create Opportunity',
|
||||
'LNK_NEW_OPPORTUNITY' => 'Create Opportunity',
|
||||
'LNK_OPPORTUNITY_LIST' => 'View Opportunities',
|
||||
'ERR_DELETE_RECORD' => 'A record number must be specified to delete the opportunity.',
|
||||
'LBL_TOP_OPPORTUNITIES' => 'My Top Open Opportunities',
|
||||
'NTC_REMOVE_OPP_CONFIRMATION' => 'Are you sure you want to remove this contact from the opportunity?',
|
||||
'OPPORTUNITY_REMOVE_PROJECT_CONFIRM' => 'Are you sure you want to remove this opportunity from the project?',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Opportunities',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Activities',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'History',
|
||||
'LBL_RAW_AMOUNT'=>'Raw Amount',
|
||||
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Leads',
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE' => 'Contacts',
|
||||
'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projects',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Assigned to:',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Assigned User',
|
||||
'LBL_LIST_SALES_STAGE' => 'Sales Stage',
|
||||
'LBL_MY_CLOSED_OPPORTUNITIES' => 'My Closed Opportunities',
|
||||
'LBL_TOTAL_OPPORTUNITIES' => 'Total Opportunities',
|
||||
'LBL_CLOSED_WON_OPPORTUNITIES' => 'Closed Won Opportunities',
|
||||
'LBL_ASSIGNED_TO_ID' =>'Assigned User:',
|
||||
'LBL_CREATED_ID'=>'Created by ID',
|
||||
'LBL_MODIFIED_ID'=>'Modified by ID',
|
||||
'LBL_MODIFIED_NAME'=>'Modified by User Name',
|
||||
'LBL_CREATED_USER' => 'Created User',
|
||||
'LBL_MODIFIED_USER' => 'Modified User',
|
||||
'LBL_CAMPAIGN_OPPORTUNITY' => 'Campaigns',
|
||||
'LBL_PROJECT_SUBPANEL_TITLE' => 'Projects',
|
||||
'LABEL_PANEL_ASSIGNMENT' => 'Assignment',
|
||||
'LNK_IMPORT_OPPORTUNITIES' => 'Import Opportunities',
|
||||
);
|
||||
|
||||
?>
|
||||
149
modules/Opportunities/language/pl_pl.lang.php
Executable file
149
modules/Opportunities/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,149 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* 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-2005 SugarCRM, Inc.;
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
* pl_pl.lang.php,v for SugarCRM 4.5.1-->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_MODULE_NAME' => 'Okazje',
|
||||
'LBL_MODULE_TITLE' => 'Okazje: Strona główna',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukaj',
|
||||
'LBL_VIEW_FORM_TITLE' => 'Widok okazji',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista okazji',
|
||||
'LBL_OPPORTUNITY_NAME' => 'Nazwa okazji:',
|
||||
'LBL_OPPORTUNITY' => 'Okazje:',
|
||||
'LBL_NAME' => 'Nazwa okazji',
|
||||
'LBL_INVITEE' => 'Kontakty',
|
||||
'LBL_CURRENCIES' => 'Waluty',
|
||||
'LBL_LIST_OPPORTUNITY_NAME' => 'Okazje',
|
||||
'LBL_LIST_ACCOUNT_NAME' => 'Nazwa klienta',
|
||||
'LBL_LIST_AMOUNT' => 'Kwota przychodu',
|
||||
'LBL_LIST_DATE_CLOSED' => 'Zakończone',
|
||||
'LBL_LIST_SALES_STAGE' => 'Etap sprzedaży',
|
||||
'LBL_ACCOUNT_ID'=>'ID klienta',
|
||||
'LBL_CURRENCY_ID'=>'ID waluty',
|
||||
'LBL_CURRENCY_NAME'=>'Nazwa waluty',
|
||||
'LBL_CURRENCY_SYMBOL'=>'Symbol waluty',
|
||||
|
||||
'LBL_TEAM_ID' =>'ID Zespołu',
|
||||
|
||||
//DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_sales_stage' => 'LBL_LIST_SALES_STAGE',
|
||||
'db_name' => 'LBL_NAME',
|
||||
'db_amount' => 'LBL_LIST_AMOUNT',
|
||||
'db_date_closed' => 'LBL_LIST_DATE_CLOSED',
|
||||
//END DON'T CONVERT
|
||||
'UPDATE' => 'Okazje - Aktualizuj waluty',
|
||||
'UPDATE_DOLLARAMOUNTS' => 'Aktualizuj przychody w USD',
|
||||
'UPDATE_VERIFY' => 'Weryfikuj kwotę przychodu',
|
||||
'UPDATE_VERIFY_TXT' => 'Weryfikuje tylko te wartości, które zapisane są w postaci cyfrowej (cyfry 0-9) oraz w postaci dziesiętnej.',
|
||||
'UPDATE_FIX' => 'Napraw przychody',
|
||||
'UPDATE_FIX_TXT' => 'Próba naprawienia wartości przychodów poprzez przekształcenie znalezionych wartości do postaci liczbowej. Obecne wartości zostaną zapisane w kopii bezpieczeństwa. Jeśli operacja spowoduje powstanie błędów możesz przywrócić poprzednie wartości z kopii bezpieczeństwa. Nie ponawiaj tej operacji po wykryciu nieprawidłowości. Grozi to nadpisaniem kopii bezpieczeństwa błędnymi danymi!.',
|
||||
'UPDATE_DOLLARAMOUNTS_TXT' => 'Aktualizuje przychody z okazji w oparciu o przelicznik do waluty bazowej (USD). Wartości te są używane do sporządzania wykresów oraz zestwień wartości Ofert.',
|
||||
'UPDATE_CREATE_CURRENCY' => 'Tworzenie nowej waluty:',
|
||||
'UPDATE_VERIFY_FAIL' => 'Błąd weryfikacji rekordu:',
|
||||
'UPDATE_VERIFY_CURAMOUNT' => 'Bierzące przychody:',
|
||||
'UPDATE_VERIFY_FIX' => 'Running Fix would give',
|
||||
'UPDATE_INCLUDE_CLOSE' => 'Dodaj zamknięte rekordy',
|
||||
'UPDATE_VERIFY_NEWAMOUNT' => 'Nowy przychód:',
|
||||
'UPDATE_VERIFY_NEWCURRENCY' => 'Nowa waluta:',
|
||||
'UPDATE_DONE' => 'Zrobione.',
|
||||
'UPDATE_BUG_COUNT' => 'Znaleziono błąd, trwa próba naprawienia:',
|
||||
'UPDATE_BUGFOUND_COUNT' => 'Znalezione błędy:',
|
||||
'UPDATE_COUNT' => 'Rekord zaktualizowany:',
|
||||
'UPDATE_RESTORE_COUNT' => 'Odzyskano przychód:',
|
||||
'UPDATE_RESTORE' => 'Odzyskiwanie przychodu',
|
||||
'UPDATE_RESTORE_TXT' => 'Odzyskiwanie wartości przychodów z kopii bezpieczeństwa.',
|
||||
'UPDATE_FAIL' => 'Nie mogę zaktualizować - ',
|
||||
'UPDATE_NULL_VALUE' => 'Wartosć przychodu nieznana. Ustawiam na 0 -',
|
||||
'UPDATE_MERGE' => 'Połącz waluty',
|
||||
'UPDATE_MERGE_TXT' => 'Łączy wiele walut w pojedynczą walutę. Użyj tej funkcji jeśli Twoje dane zawierają różne oznaczenia tej samej waluty np.: PLN, PLZ, ZŁ, zł. ',
|
||||
'LBL_ACCOUNT_NAME' => 'Nazwa klienta:',
|
||||
'LBL_AMOUNT' => 'Wartość okazji:',
|
||||
'LBL_AMOUNT_USDOLLAR' => 'Wartość USD:',
|
||||
'LBL_CURRENCY' => 'Waluta:',
|
||||
'LBL_DATE_CLOSED' => 'Data zakończenia etapu:',
|
||||
'LBL_TYPE' => 'Typ:',
|
||||
'LBL_CAMPAIGN' => 'Kampania:',
|
||||
'LBL_NEXT_STEP' => 'Następny krok:',
|
||||
'LBL_LEAD_SOURCE' => 'Źródło pozyskania:',
|
||||
'LBL_SALES_STAGE' => 'Etap sprzedaży:',
|
||||
'LBL_PROBABILITY' => 'Szansa (%):',
|
||||
'LBL_DESCRIPTION' => 'Opis:',
|
||||
'LBL_DUPLICATE' => 'Prawdopodobnie taka Okazja już istnieje',
|
||||
'MSG_DUPLICATE' => 'Utworzenie tej okazji prawdopodobnie spowoduje powstanie duplikatu już istniejącego. Możesz wybrać istniejącą okazje z listy lub kontynuować klikając [Zapisz]. Operacja ta utworzy nową okazję wykorzystując dane, które wprowadziłeś za pomocą formularza. ',
|
||||
'LBL_NEW_FORM_TITLE' => 'Dodaj Okazję',
|
||||
'LNK_NEW_OPPORTUNITY' => 'Dodaj Okazję',
|
||||
|
||||
'LNK_OPPORTUNITY_REPORTS' => 'Raporty okazji',
|
||||
|
||||
'LNK_OPPORTUNITY_LIST' => 'Okazje',
|
||||
'ERR_DELETE_RECORD' => 'Muszisz wybrac rekord, aby usunąć okazję.',
|
||||
'LBL_TOP_OPPORTUNITIES' => '10 moich najważniejszych okazji',
|
||||
'NTC_REMOVE_OPP_CONFIRMATION' => 'Czy na pewno usunąć osoby Kontaktowe z tej Okazji?',
|
||||
'OPPORTUNITY_REMOVE_PROJECT_CONFIRM' => 'Czy na pewno chcesz usunąć to zadanie z okazji?',
|
||||
'LBL_AMOUNT_BACKUP'=>'Wielkość backupu',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Okazje',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Działania',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'Historia',
|
||||
'LBL_RAW_AMOUNT'=>'Wstępna Kwota',
|
||||
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Adresy',
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE' => 'Kontakty',
|
||||
|
||||
'LBL_QUOTES_SUBPANEL_TITLE' => 'Oferty',
|
||||
|
||||
'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projekty',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Przydzielone do:',
|
||||
'LBL_LIST_ASSIGNED_TO_NAME' => 'Nazwa przydzielonego użytkownika',
|
||||
|
||||
'LBL_CONTRACTS'=>'Kontrakty',
|
||||
'LBL_CONTRACTS_SUBPANEL_TITLE'=>'Kontrakty',
|
||||
|
||||
'LBL_LIST_SALES_STAGE' => 'Etapy sprzedaży',
|
||||
'LBL_MY_CLOSED_OPPORTUNITIES' => 'Moje zamknięte okazje',
|
||||
'LBL_TOTAL_OPPORTUNITIES' => 'Wszystkie okazje',
|
||||
'LBL_CLOSED_WON_OPPORTUNITIES' => 'Okazje zakończone wygraną',
|
||||
'LBL_ASSIGNED_TO_ID' =>'Przydzielone do (ID)',
|
||||
'LBL_CREATED_ID'=>'Utworzone przez (ID)',
|
||||
'LBL_MODIFIED_ID'=>'Zmodyfikowane przez (ID)',
|
||||
'LBL_MODIFIED_NAME'=>'Nazwa użytkownika modyfikującego',
|
||||
'LBL_CREATED_USER' => 'Użytkownik tworzący',
|
||||
'LBL_MODIFIED_USER' => 'Użytkownik modyfikujący',
|
||||
'LBL_CAMPAIGN_OPPORTUNITY' => 'Kampania',
|
||||
'LBL_PROJECT_SUBPANEL_TITLE' => 'Projekty',
|
||||
|
||||
//add 26.09.2011
|
||||
'LBL_LIST_AMOUNT_USDOLLAR' => 'Ilość',
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
50
modules/Opportunities/metadata/SearchFields.php
Executable file
50
modules/Opportunities/metadata/SearchFields.php
Executable file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchFields['Opportunities'] =
|
||||
array (
|
||||
'name' => array( 'query_type'=>'default'),
|
||||
'account_name'=> array('query_type'=>'default','db_field'=>array('accounts.name')),
|
||||
'amount'=> array('query_type'=>'default'),
|
||||
'next_step'=> array('query_type'=>'default'),
|
||||
'probability'=> array('query_type'=>'default'),
|
||||
'lead_source'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'lead_source_dom', 'template_var' => 'LEAD_SOURCE_OPTIONS'),
|
||||
'opportunity_type'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'opportunity_type_dom', 'template_var' => 'TYPE_OPTIONS'),
|
||||
'sales_stage'=> array('query_type'=>'default', 'operator'=>'=', 'options' => 'sales_stage_dom', 'template_var' => 'SALES_STAGE_OPTIONS', 'options_add_blank' => true),
|
||||
'current_user_only'=> array('query_type'=>'default','db_field'=>array('assigned_user_id'),'my_items'=>true, 'vname' => 'LBL_CURRENT_USER_FILTER', 'type' => 'bool'),
|
||||
'assigned_user_id'=> array('query_type'=>'default'),
|
||||
);
|
||||
?>
|
||||
60
modules/Opportunities/metadata/acldefs.php
Executable file
60
modules/Opportunities/metadata/acldefs.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
// created: 2005-10-19 11:16:08
|
||||
$acldefs['Opportunities'] = array (
|
||||
'forms' =>
|
||||
array (
|
||||
'by_name' =>
|
||||
array (
|
||||
'btn1' =>
|
||||
array (
|
||||
'display_option' => 'disabled',
|
||||
'action_option' => 'list',
|
||||
'app_action' => 'EditView',
|
||||
'module' => 'Accounts',
|
||||
),
|
||||
),
|
||||
),
|
||||
'form_names' =>
|
||||
array (
|
||||
'by_id' => 'by_id',
|
||||
'by_name' => 'by_name',
|
||||
'DetailView' => 'DetailView',
|
||||
'EditView' => 'EditView',
|
||||
),
|
||||
);
|
||||
?>
|
||||
62
modules/Opportunities/metadata/additionalDetails.php
Executable file
62
modules/Opportunities/metadata/additionalDetails.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
function additionalDetailsOpportunity($fields) {
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'Opportunities');
|
||||
$overlib_string = '';
|
||||
|
||||
if(!empty($fields['LEAD_SOURCE'])) $overlib_string .= '<b>'. $mod_strings['LBL_LEAD_SOURCE'] . '</b> ' . $fields['LEAD_SOURCE'] . '<br>';
|
||||
if(!empty($fields['PROBABILITY'])) $overlib_string .= '<b>'. $mod_strings['LBL_PROBABILITY'] . '</b> ' . $fields['PROBABILITY'] . '<br>';
|
||||
if(!empty($fields['NEXT_STEP'])) $overlib_string .= '<b>'. $mod_strings['LBL_NEXT_STEP'] . '</b> ' . $fields['NEXT_STEP'] . '<br>';
|
||||
if(!empty($fields['OPPORTUNITY_TYPE'])) $overlib_string .= '<b>'. $mod_strings['LBL_TYPE'] . '</b> ' . $fields['OPPORTUNITY_TYPE'] . '<br>';
|
||||
|
||||
if(!empty($fields['DESCRIPTION'])) {
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ';
|
||||
$overlib_string .= substr($fields['DESCRIPTION'], 0, 300);
|
||||
if(strlen($fields['DESCRIPTION']) > 300) $overlib_string .= '...';
|
||||
}
|
||||
|
||||
return array('fieldToAddTo' => 'NAME',
|
||||
'string' => $overlib_string,
|
||||
'editLink' => "index.php?action=EditView&module=Opportunities&return_module=Opportunities&record={$fields['ID']}",
|
||||
'viewLink' => "index.php?action=DetailView&module=Opportunities&return_module=Opportunities&record={$fields['ID']}");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
110
modules/Opportunities/metadata/detailviewdefs.php
Executable file
110
modules/Opportunities/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs['Opportunities']['DetailView'] = array(
|
||||
'templateMeta' => array('form' => array('buttons'=>array('EDIT', 'DUPLICATE', 'DELETE',
|
||||
array('customCode'=>'<input title="{$APP.LBL_DUP_MERGE}" ' .
|
||||
'accesskey="M" ' .
|
||||
'class="button" ' .
|
||||
'onclick="this.form.return_module.value=\'Opportunities\';this.form.return_action.value=\'DetailView\';this.form.return_id.value=\'{$fields.id.value}\'; this.form.action.value=\'Step1\'; this.form.module.value=\'MergeRecords\';" ' .
|
||||
'name="button" ' .
|
||||
'value="{$APP.LBL_DUP_MERGE}" ' .
|
||||
'type="submit">'),)),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
),
|
||||
'panels' => array(
|
||||
'default' => array (
|
||||
array('name',
|
||||
'account_name',
|
||||
),
|
||||
|
||||
array(
|
||||
'opportunity_type'
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'amount','label' => '{$MOD.LBL_AMOUNT} ({$CURRENCY})'),
|
||||
'date_closed'
|
||||
),
|
||||
|
||||
array(
|
||||
'next_step',
|
||||
'sales_stage'
|
||||
),
|
||||
|
||||
array (
|
||||
'lead_source',
|
||||
'probability'
|
||||
),
|
||||
|
||||
array(
|
||||
'campaign_name'
|
||||
),
|
||||
|
||||
array(
|
||||
array(
|
||||
'name'=>'description',
|
||||
'nl2br'=>true
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'LBL_PANEL_ASSIGNMENT' => array(
|
||||
array (
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'label' => 'LBL_ASSIGNED_TO',
|
||||
),
|
||||
array (
|
||||
'name' => 'date_modified',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$fields.modified_by_name.value}',
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'date_entered',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$fields.created_by_name.value}',
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
)
|
||||
);
|
||||
?>
|
||||
95
modules/Opportunities/metadata/editviewdefs.php
Executable file
95
modules/Opportunities/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs['Opportunities']['EditView'] = array(
|
||||
'templateMeta' => array('maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'javascript' => '{$PROBABILITY_SCRIPT}',
|
||||
),
|
||||
'panels' =>array (
|
||||
'default' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
array('name'=>'name'),
|
||||
'account_name',
|
||||
),
|
||||
|
||||
array (
|
||||
'campaign_name',
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'currency_id','label'=>'LBL_CURRENCY'),
|
||||
'opportunity_type',
|
||||
),
|
||||
|
||||
array (
|
||||
array( 'name'=>'amount'),
|
||||
array('name'=>'date_closed'),
|
||||
),
|
||||
|
||||
array (
|
||||
'next_step',
|
||||
array (
|
||||
'name' => 'sales_stage',
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
|
||||
array (
|
||||
'lead_source',
|
||||
'probability',
|
||||
),
|
||||
|
||||
array (
|
||||
'description',
|
||||
),
|
||||
),
|
||||
|
||||
'LBL_PANEL_ASSIGNMENT' => array(
|
||||
array(
|
||||
'assigned_user_name',
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
);
|
||||
?>
|
||||
109
modules/Opportunities/metadata/listviewdefs.php
Executable file
109
modules/Opportunities/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$listViewDefs['Opportunities'] = array(
|
||||
'NAME' => array(
|
||||
'width' => '30',
|
||||
'label' => 'LBL_LIST_OPPORTUNITY_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'ACCOUNT_NAME' => array(
|
||||
'width' => '20',
|
||||
'label' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'id' => 'ACCOUNT_ID',
|
||||
'module' => 'Accounts',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'sortable'=> true,
|
||||
'ACLTag' => 'ACCOUNT',
|
||||
'contextMenu' => array('objectType' => 'sugarAccount',
|
||||
'metaData' => array('return_module' => 'Contacts',
|
||||
'return_action' => 'ListView',
|
||||
'module' => 'Accounts',
|
||||
'return_action' => 'ListView',
|
||||
'parent_id' => '{$ACCOUNT_ID}',
|
||||
'parent_name' => '{$ACCOUNT_NAME}',
|
||||
'account_id' => '{$ACCOUNT_ID}',
|
||||
'account_name' => '{$ACCOUNT_NAME}',
|
||||
),
|
||||
),
|
||||
'related_fields' => array('account_id')),
|
||||
'SALES_STAGE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_SALES_STAGE',
|
||||
'default' => true),
|
||||
'AMOUNT_USDOLLAR' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_AMOUNT_USDOLLAR',
|
||||
'align' => 'right',
|
||||
'default' => true,
|
||||
'currency_format' => true,
|
||||
),
|
||||
'OPPORTUNITY_TYPE' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_TYPE'),
|
||||
'LEAD_SOURCE' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_LEAD_SOURCE'),
|
||||
'NEXT_STEP' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_NEXT_STEP'),
|
||||
'PROBABILITY' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_PROBABILITY'),
|
||||
'DATE_CLOSED' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_DATE_CLOSED',
|
||||
'default' => true),
|
||||
'DATE_ENTERED' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
'CREATED_BY_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_CREATED'),
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '5',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true),
|
||||
'MODIFIED_BY_NAME' => array(
|
||||
'width' => '5',
|
||||
'label' => 'LBL_MODIFIED')
|
||||
);
|
||||
|
||||
?>
|
||||
51
modules/Opportunities/metadata/metafiles.php
Executable file
51
modules/Opportunities/metadata/metafiles.php
Executable file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*
|
||||
* Created on Jun 1, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$metafiles['Opportunities'] = array(
|
||||
'detailviewdefs' => 'modules/Opportunities/metadata/detailviewdefs.php',
|
||||
'editviewdefs' => 'modules/Opportunities/metadata/editviewdefs.php',
|
||||
'listviewdefs' => 'modules/Opportunities/metadata/listviewdefs.php',
|
||||
'searchdefs' => 'modules/Opportunities/metadata/searchdefs.php',
|
||||
'popupdefs' => 'modules/Opportunities/metadata/popupdefs.php',
|
||||
'searchfields' => 'modules/Opportunities/metadata/SearchFields.php',
|
||||
|
||||
);
|
||||
?>
|
||||
85
modules/Opportunities/metadata/popupdefs.php
Executable file
85
modules/Opportunities/metadata/popupdefs.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
$popupMeta = array('moduleMain' => 'Opportunity',
|
||||
'varName' => 'OPPORTUNITY',
|
||||
'orderBy' => 'name',
|
||||
'whereClauses' =>
|
||||
array('name' => 'opportunities.name',
|
||||
'account_name' => 'accounts.name'),
|
||||
'searchInputs' =>
|
||||
array('name', 'account_name'),
|
||||
'listviewdefs' => array(
|
||||
'NAME' => array(
|
||||
'width' => '30',
|
||||
'label' => 'LBL_LIST_OPPORTUNITY_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'ACCOUNT_NAME' => array(
|
||||
'width' => '20',
|
||||
'label' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'id' => 'ACCOUNT_ID',
|
||||
'module' => 'Accounts',
|
||||
'default' => true,
|
||||
'sortable'=> true,
|
||||
'ACLTag' => 'ACCOUNT'),
|
||||
'OPPORTUNITY_TYPE' => array(
|
||||
'width' => '15',
|
||||
'default' => true,
|
||||
'label' => 'LBL_TYPE'),
|
||||
'SALES_STAGE' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_SALES_STAGE',
|
||||
'default' => true),
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '5',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true),
|
||||
),
|
||||
'searchdefs' => array(
|
||||
'name',
|
||||
array('name' => 'account_name', 'displayParams' => array('hideButtons'=>'true', 'size'=>30, 'class'=>'sqsEnabled sqsNoAutofill')),
|
||||
'opportunity_type',
|
||||
'sales_stage',
|
||||
array('name' => 'assigned_user_id', 'type' => 'enum', 'label' => 'LBL_ASSIGNED_TO', 'function' => array('name' => 'get_user_array', 'params' => array(false))),
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
116
modules/Opportunities/metadata/quickcreatedefs.php
Executable file
116
modules/Opportunities/metadata/quickcreatedefs.php
Executable file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$viewdefs = array (
|
||||
'Opportunities' =>
|
||||
array (
|
||||
'QuickCreate' =>
|
||||
array (
|
||||
'templateMeta' =>
|
||||
array (
|
||||
'maxColumns' => '2',
|
||||
'widths' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
1 =>
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
),
|
||||
'javascript' => '{$PROBABILITY_SCRIPT}',
|
||||
),
|
||||
'panels' =>
|
||||
array (
|
||||
'DEFAULT' =>
|
||||
array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'name',
|
||||
'displayParams'=>array('required'=>true),
|
||||
),
|
||||
array (
|
||||
'name' => 'account_name',
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'currency_id',
|
||||
),
|
||||
array (
|
||||
'name' => 'opportunity_type',
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'amount',
|
||||
'displayParams'=>array('required'=>true),
|
||||
),
|
||||
array (
|
||||
'name' => 'date_closed',
|
||||
'displayParams'=>array('required'=>true),
|
||||
),
|
||||
),
|
||||
array (
|
||||
'next_step',
|
||||
'sales_stage',
|
||||
),
|
||||
array (
|
||||
'lead_source',
|
||||
'probability',
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
131
modules/Opportunities/metadata/searchdefs.php
Executable file
131
modules/Opportunities/metadata/searchdefs.php
Executable file
@@ -0,0 +1,131 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$searchdefs['Opportunities'] = array(
|
||||
'templateMeta' =>
|
||||
array (
|
||||
'maxColumns' => '3',
|
||||
'widths' =>
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
),
|
||||
'layout' =>
|
||||
array (
|
||||
'basic_search' =>
|
||||
array (
|
||||
'name' =>
|
||||
array (
|
||||
'name' => 'name',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'current_user_only' =>
|
||||
array (
|
||||
'name' => 'current_user_only',
|
||||
'label' => 'LBL_CURRENT_USER_FILTER',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
),
|
||||
'advanced_search' =>
|
||||
array (
|
||||
'name' =>
|
||||
array (
|
||||
'name' => 'name',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'account_name' =>
|
||||
array (
|
||||
'name' => 'account_name',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'amount' =>
|
||||
array (
|
||||
'name' => 'amount',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'assigned_user_id' =>
|
||||
array (
|
||||
'name' => 'assigned_user_id',
|
||||
'type' => 'enum',
|
||||
'label' => 'LBL_ASSIGNED_TO',
|
||||
'function' =>
|
||||
array (
|
||||
'name' => 'get_user_array',
|
||||
'params' =>
|
||||
array (
|
||||
0 => false,
|
||||
),
|
||||
),
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'sales_stage' =>
|
||||
array (
|
||||
'name' => 'sales_stage',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'lead_source' =>
|
||||
array (
|
||||
'name' => 'lead_source',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'date_closed' =>
|
||||
array (
|
||||
'name' => 'date_closed',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'next_step' =>
|
||||
array (
|
||||
'type' => 'varchar',
|
||||
'label' => 'LBL_NEXT_STEP',
|
||||
'width' => '10%',
|
||||
'default' => true,
|
||||
'name' => 'next_step',
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
);
|
||||
?>
|
||||
65
modules/Opportunities/metadata/studio.php
Executable file
65
modules/Opportunities/metadata/studio.php
Executable file
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$GLOBALS['studioDefs']['Opportunities'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Opportunities/DetailView.html',
|
||||
'php_file'=>'modules/Opportunities/DetailView.php',
|
||||
'type'=>'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Opportunities/EditView.html',
|
||||
'php_file'=>'modules/Opportunities/EditView.php',
|
||||
'type'=>'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template'=>'listview',
|
||||
'meta_file'=>'modules/Opportunities/listviewdefs.php',
|
||||
'type'=>'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Opportunities/SearchForm.html',
|
||||
'php_file'=>'modules/Opportunities/ListView.php',
|
||||
'type'=>'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
173
modules/Opportunities/metadata/subpaneldefs.php
Executable file
173
modules/Opportunities/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,173 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$layout_defs['Opportunities'] = array(
|
||||
// list of what Subpanels to show in the DetailView
|
||||
'subpanel_setup' => array(
|
||||
'activities' => array(
|
||||
'order' => 10,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'date_start',
|
||||
'title_key' => 'LBL_ACTIVITIES_SUBPANEL_TITLE',
|
||||
'type' => 'collection',
|
||||
'subpanel_name' => 'activities', //this values is not associated with a physical file.
|
||||
'module'=>'Activities',
|
||||
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateTaskButton'),
|
||||
array('widget_class' => 'SubPanelTopScheduleMeetingButton'),
|
||||
array('widget_class' => 'SubPanelTopScheduleCallButton'),
|
||||
array('widget_class' => 'SubPanelTopComposeEmailButton'),
|
||||
),
|
||||
|
||||
'collection_list' => array(
|
||||
'meetings' => array(
|
||||
'module' => 'Meetings',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'meetings',
|
||||
),
|
||||
'tasks' => array(
|
||||
'module' => 'Tasks',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'tasks',
|
||||
),
|
||||
'calls' => array(
|
||||
'module' => 'Calls',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'calls',
|
||||
),
|
||||
)
|
||||
),
|
||||
|
||||
'history' => array(
|
||||
'order' => 20,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'date_modified',
|
||||
'title_key' => 'LBL_HISTORY_SUBPANEL_TITLE',
|
||||
'type' => 'collection',
|
||||
'subpanel_name' => 'history', //this values is not associated with a physical file.
|
||||
'module'=>'History',
|
||||
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateNoteButton'),
|
||||
array('widget_class' => 'SubPanelTopArchiveEmailButton'),
|
||||
array('widget_class' => 'SubPanelTopSummaryButton'),
|
||||
),
|
||||
|
||||
'collection_list' => array(
|
||||
'meetings' => array(
|
||||
'module' => 'Meetings',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'meetings',
|
||||
),
|
||||
'tasks' => array(
|
||||
'module' => 'Tasks',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'tasks',
|
||||
),
|
||||
'calls' => array(
|
||||
'module' => 'Calls',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'calls',
|
||||
),
|
||||
'notes' => array(
|
||||
'module' => 'Notes',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'notes',
|
||||
),
|
||||
'emails' => array(
|
||||
'module' => 'Emails',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'emails',
|
||||
),
|
||||
)
|
||||
),
|
||||
'leads' => array(
|
||||
'order' => 50,
|
||||
'module' => 'Leads',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'leads',
|
||||
'add_subpanel_data' => 'lead_id',
|
||||
'title_key' => 'LBL_LEADS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateLeadNameButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton',
|
||||
'popup_module' => 'Opportunities',
|
||||
'mode' => 'MultiSelect',
|
||||
),
|
||||
),
|
||||
),
|
||||
'contacts' => array(
|
||||
'order' => 30,
|
||||
'module' => 'Contacts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'subpanel_name' => 'ForOpportunities',
|
||||
'get_subpanel_data' => 'contacts',
|
||||
'add_subpanel_data' => 'contact_id',
|
||||
'title_key' => 'LBL_CONTACTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateAccountNameButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton',
|
||||
'popup_module' => 'Opportunities',
|
||||
'mode' => 'MultiSelect',
|
||||
'initial_filter_fields' => array('account_id' => 'account_id', 'account_name' => 'account_name'),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
'project' => array(
|
||||
'order' => 70,
|
||||
'module' => 'Project',
|
||||
'get_subpanel_data' => 'project',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_PROJECTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
86
modules/Opportunities/metadata/subpanels/ForAccounts.php
Executable file
86
modules/Opportunities/metadata/subpanels/ForAccounts.php
Executable file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Opportunities'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'name'=>array(
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_LIST_OPPORTUNITY_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '40%',
|
||||
),
|
||||
'sales_stage'=>array(
|
||||
'name' => 'sales_stage',
|
||||
'vname' => 'LBL_LIST_SALES_STAGE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'date_closed'=>array(
|
||||
'name' => 'date_closed',
|
||||
'vname' => 'LBL_LIST_DATE_CLOSED',
|
||||
'width' => '15%',
|
||||
),
|
||||
'amount_usdollar'=>array(
|
||||
'vname' => 'LBL_LIST_AMOUNT_USDOLLAR',
|
||||
'width' => '15%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Opportunities',
|
||||
'width' => '4%',
|
||||
),
|
||||
'currency_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
84
modules/Opportunities/metadata/subpanels/ForEmails.php
Executable file
84
modules/Opportunities/metadata/subpanels/ForEmails.php
Executable file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Opportunities'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'name'=>array(
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_LIST_OPPORTUNITY_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '50%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'Accounts',
|
||||
'width' => '31%',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
),
|
||||
'sales_stage'=>array(
|
||||
'name' => 'sales_stage',
|
||||
'vname' => 'LBL_LIST_SALES_STAGE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Opportunities',
|
||||
'width' => '4%',
|
||||
),
|
||||
'remove_button' => array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '4%',
|
||||
),
|
||||
'currency_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
100
modules/Opportunities/metadata/subpanels/default.php
Executable file
100
modules/Opportunities/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'Opportunities'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'name'=>array(
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_LIST_OPPORTUNITY_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '40%',
|
||||
),
|
||||
'account_name'=>array(
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'module' => 'Accounts',
|
||||
'width' => '31%',
|
||||
'target_record_key' => 'account_id',
|
||||
'target_module' => 'Accounts',
|
||||
),
|
||||
'sales_stage'=>array(
|
||||
'name' => 'sales_stage',
|
||||
'vname' => 'LBL_LIST_SALES_STAGE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'date_closed'=>array(
|
||||
'name' => 'date_closed',
|
||||
'vname' => 'LBL_LIST_DATE_CLOSED',
|
||||
'width' => '15%',
|
||||
),
|
||||
'amount_usdollar'=>array(
|
||||
'vname' => 'LBL_LIST_AMOUNT_USDOLLAR',
|
||||
'width' => '15%',
|
||||
),
|
||||
'assigned_user_name' => array (
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_LIST_ASSIGNED_TO_NAME',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'Opportunities',
|
||||
'width' => '4%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'Leads',
|
||||
'width' => '4%',
|
||||
),
|
||||
'currency_id'=>array(
|
||||
'usage'=>'query_only',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
109
modules/Opportunities/tpls/QuickCreate.tpl
Executable file
109
modules/Opportunities/tpls/QuickCreate.tpl
Executable file
@@ -0,0 +1,109 @@
|
||||
{*
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
*}
|
||||
|
||||
|
||||
<form name="opportunitiesQuickCreate" id="opportunitiesQuickCreate" method="POST" action="index.php">
|
||||
<input type="hidden" name="module" value="Opportunities">
|
||||
<input type="hidden" name="record" value="">
|
||||
<input type="hidden" name="contact_id" value="{$REQUEST.contact_id}">
|
||||
<input type="hidden" name="contact_name" value="{$REQUEST.contact_name}">
|
||||
<input type="hidden" name="email_id" value="{$REQUEST.email_id}">
|
||||
<input type="hidden" name="return_action" value="{$REQUEST.return_action}">
|
||||
<input type="hidden" name="return_module" value="{$REQUEST.return_module}">
|
||||
<input type="hidden" name="return_id" value="{$REQUEST.return_id}">
|
||||
<input type="hidden" name="action" value='Save'>
|
||||
<input type="hidden" name="duplicate_parent_id" value="{$REQUEST.duplicate_parent_id}">
|
||||
<input name='currency_id' type='hidden' value='{$CURRENCY_ID}'>
|
||||
<input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{$ASSIGNED_USER_ID}" />
|
||||
<input type="hidden" name="to_pdf" value='1'>
|
||||
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td align="left" style="padding-bottom: 2px;">
|
||||
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" type="submit" name="button" {$saveOnclick|default:"onclick=\"return check_form('OpportunitiesQuickCreate');\""} value=" {$APP.LBL_SAVE_BUTTON_LABEL} " >
|
||||
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" type="submit" name="button" {$cancelOnclick|default:"onclick=\"this.form.action.value='$RETURN_ACTION'; this.form.module.value='$RETURN_MODULE'; this.form.record.value='$RETURN_ID'\""} value=" {$APP.LBL_CANCEL_BUTTON_LABEL} ">
|
||||
<input title="{$APP.LBL_FULL_FORM_BUTTON_TITLE}" accessKey="{$APP.LBL_FULL_FORM_BUTTON_KEY}" class="button" type="submit" name="button" onclick="this.form.to_pdf.value='0';this.form.action.value='EditView'; this.form.module.value='Opportunities';" value=" {$APP.LBL_FULL_FORM_BUTTON_LABEL} "></td>
|
||||
<td align="right" nowrap><span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span> {$APP.NTC_REQUIRED}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="edit view">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="15%" scope="row"><slot>{$MOD.LBL_OPPORTUNITY_NAME} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td width="35%" ><slot><input name='name' type="text" tabindex='1' size='35' maxlength='50' value=""></slot></td>
|
||||
<td width="20%" scope="row"><slot>{$MOD.LBL_AMOUNT} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td width="30%" ><slot><input name='amount' tabindex='2' size='15' maxlength='25' type="text" value=''></slot></td>
|
||||
</tr><tr>
|
||||
<td scope="row"><slot>{$MOD.LBL_DATE_CLOSED} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td ><slot><input name='date_closed' onblur="parseDate(this, '{$CALENDAR_DATEFORMAT}');" id='jscal_field' type="text" tabindex='1' size='11' maxlength='10' value=""> <img src="{sugar_getimagepath file='jscalendar.gif'}" alt="{$APP.LBL_ENTER_DATE}" id="jscal_trigger" align="absmiddle"> <span class="dateFormat">{$USER_DATEFORMAT}</span></slot></td>
|
||||
<td scope="row"><slot>{$MOD.LBL_LEAD_SOURCE}</slot></td>
|
||||
<td ><slot><select tabindex='2' name='lead_source'>{$LEAD_SOURCE_OPTIONS}</select></slot></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row"><slot>{$MOD.LBL_SALES_STAGE} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td ><slot><select tabindex='1' name='sales_stage' id='opportunities_sales_stage'>{$SALES_STAGE_OPTIONS}</select></slot></td>
|
||||
<td scope="row"><slot>{$MOD.LBL_PROBABILITY}</slot></td>
|
||||
<td ><slot><input name='probability' id='opportunities_probability' tabindex='2' size='4' maxlength='3' type="text" value=''></slot></td>
|
||||
</tr><tr>
|
||||
<td scope="row"><slot>{$MOD.LBL_ACCOUNT_NAME} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td ><slot>{$REQUEST.parent_name}<input id='account_name' name='account_name' type="hidden" value='{$REQUEST.parent_name}'><input id='account_id' name='account_id' type="hidden" value='{$REQUEST.parent_id}'> </slot></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</slot></td></tr></table>
|
||||
</form>
|
||||
<script>
|
||||
{literal}
|
||||
Calendar.setup ({
|
||||
inputField : "jscal_field", ifFormat : "{/literal}{$CALENDAR_DATEFORMAT}{literal}", showsTime : false, button : "jscal_trigger", singleClick : true, step : 1, weekNumbers:false
|
||||
});
|
||||
prob_array = {/literal}{$prob_array}{literal}
|
||||
document.getElementById('opportunities_sales_stage').onchange = function() {
|
||||
if(typeof(document.getElementById('opportunities_sales_stage').value) != "undefined" && prob_array[document.getElementById('opportunities_sales_stage').value]) {
|
||||
document.getElementById('opportunities_probability').value = prob_array[document.getElementById('opportunities_sales_stage').value];
|
||||
}
|
||||
};
|
||||
{/literal}
|
||||
|
||||
{$additionalScripts}
|
||||
</script>
|
||||
422
modules/Opportunities/vardefs.php
Executable file
422
modules/Opportunities/vardefs.php
Executable file
@@ -0,0 +1,422 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
$dictionary['Opportunity'] = array('table' => 'opportunities','audited'=>true, 'unified_search' => true,'duplicate_merge'=>true,
|
||||
'comment' => 'An opportunity is the target of selling activities',
|
||||
'fields' => array (
|
||||
'name' =>
|
||||
array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_OPPORTUNITY_NAME',
|
||||
'type' => 'name',
|
||||
'dbType' => 'varchar',
|
||||
'len' => '50',
|
||||
'unified_search' => true,
|
||||
'comment' => 'Name of the opportunity',
|
||||
'merge_filter' => 'selected',
|
||||
'importable' => 'required',
|
||||
'required' => true,
|
||||
),
|
||||
'opportunity_type' =>
|
||||
array (
|
||||
'name' => 'opportunity_type',
|
||||
'vname' => 'LBL_TYPE',
|
||||
'type' => 'enum',
|
||||
'options'=> 'opportunity_type_dom',
|
||||
'len' => '255',
|
||||
'audited'=>true,
|
||||
'comment' => 'Type of opportunity (ex: Existing, New)',
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'account_name' =>
|
||||
array (
|
||||
'name' => 'account_name',
|
||||
'rname' => 'name',
|
||||
'id_name' => 'account_id',
|
||||
'vname' => 'LBL_ACCOUNT_NAME',
|
||||
'type' => 'relate',
|
||||
'table' => 'accounts',
|
||||
'join_name'=>'accounts',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Accounts',
|
||||
'dbType' => 'varchar',
|
||||
'link'=>'accounts',
|
||||
'len' => '255',
|
||||
'source'=>'non-db',
|
||||
'unified_search' => true,
|
||||
'required' => true,
|
||||
'importable' => 'required',
|
||||
'required' => true,
|
||||
),
|
||||
'account_id' =>
|
||||
array (
|
||||
'name' => 'account_id',
|
||||
'vname' => 'LBL_ACCOUNT_ID',
|
||||
'type' => 'id',
|
||||
'source'=>'non-db',
|
||||
'audited'=>true,
|
||||
),
|
||||
'campaign_id' =>
|
||||
array (
|
||||
'name' => 'campaign_id',
|
||||
'comment' => 'Campaign that generated lead',
|
||||
'vname'=>'LBL_CAMPAIGN_ID',
|
||||
'rname' => 'id',
|
||||
'type' => 'id',
|
||||
'dbType'=>'id',
|
||||
'table' => 'campaigns',
|
||||
'isnull' => 'true',
|
||||
'module' => 'Campaigns',
|
||||
//'dbType' => 'char',
|
||||
'reportable'=>false,
|
||||
'massupdate' => false,
|
||||
'duplicate_merge'=> 'disabled',
|
||||
),
|
||||
'campaign_name'=>
|
||||
array(
|
||||
'name'=>'campaign_name',
|
||||
'rname'=>'name',
|
||||
'id_name'=>'campaign_id',
|
||||
'vname'=>'LBL_CAMPAIGN',
|
||||
'type'=>'relate',
|
||||
'link' => 'campaign_opportunities',
|
||||
'isnull'=>'true',
|
||||
'table' => 'campaigns',
|
||||
'module'=>'Campaigns',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'campaign_opportunities' =>
|
||||
array (
|
||||
'name' => 'campaign_opportunities',
|
||||
'type' => 'link',
|
||||
'vname' => 'LBL_CAMPAIGN_OPPORTUNITY',
|
||||
'relationship' => 'campaign_opportunities',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'lead_source' =>
|
||||
array (
|
||||
'name' => 'lead_source',
|
||||
'vname' => 'LBL_LEAD_SOURCE',
|
||||
'type' => 'enum',
|
||||
'options' => 'lead_source_dom',
|
||||
'len' => '50',
|
||||
'comment' => 'Source of the opportunity',
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'amount' =>
|
||||
array (
|
||||
'name' => 'amount',
|
||||
'vname' => 'LBL_AMOUNT',
|
||||
//'function'=>array('vname'=>'getCurrencyType'),
|
||||
'type' => 'currency',
|
||||
// 'disable_num_format' => true,
|
||||
'dbType' => 'double',
|
||||
'comment' => 'Unconverted amount of the opportunity',
|
||||
'duplicate_merge'=>'disabled',
|
||||
'importable' => 'required',
|
||||
'required' => true,
|
||||
),
|
||||
'amount_usdollar' =>
|
||||
array (
|
||||
'name' => 'amount_usdollar',
|
||||
'vname' => 'LBL_AMOUNT_USDOLLAR',
|
||||
'type' => 'currency',
|
||||
'group'=>'amount',
|
||||
'dbType' => 'double',
|
||||
'disable_num_format' => true,
|
||||
'audited'=>true,
|
||||
'comment' => 'Formatted amount of the opportunity'
|
||||
),
|
||||
'currency_id' =>
|
||||
array (
|
||||
'name' => 'currency_id',
|
||||
'type' => 'id',
|
||||
'group'=>'currency_id',
|
||||
'vname' => 'LBL_CURRENCY',
|
||||
'function'=>array('name'=>'getCurrencyDropDown', 'returns'=>'html'),
|
||||
'reportable'=>false,
|
||||
'comment' => 'Currency used for display purposes'
|
||||
),
|
||||
'currency_name'=>
|
||||
array(
|
||||
'name'=>'currency_name',
|
||||
'rname'=>'name',
|
||||
'id_name'=>'currency_id',
|
||||
'vname'=>'LBL_CURRENCY_NAME',
|
||||
'type'=>'relate',
|
||||
'isnull'=>'true',
|
||||
'table' => 'currencies',
|
||||
'module'=>'Currencies',
|
||||
'source' => 'non-db',
|
||||
'function'=>array('name'=>'getCurrencyNameDropDown', 'returns'=>'html'),
|
||||
'studio' => 'false',
|
||||
'duplicate_merge' => 'disabled',
|
||||
),
|
||||
'currency_symbol'=>
|
||||
array(
|
||||
'name'=>'currency_symbol',
|
||||
'rname'=>'symbol',
|
||||
'id_name'=>'currency_id',
|
||||
'vname'=>'LBL_CURRENCY_SYMBOL',
|
||||
'type'=>'relate',
|
||||
'isnull'=>'true',
|
||||
'table' => 'currencies',
|
||||
'module'=>'Currencies',
|
||||
'source' => 'non-db',
|
||||
'function'=>array('name'=>'getCurrencySymbolDropDown', 'returns'=>'html'),
|
||||
'studio' => 'false',
|
||||
'duplicate_merge' => 'disabled',
|
||||
),
|
||||
'date_closed' =>
|
||||
array (
|
||||
'name' => 'date_closed',
|
||||
'vname' => 'LBL_DATE_CLOSED',
|
||||
'type' => 'date',
|
||||
'audited'=>true,
|
||||
'comment' => 'Expected or actual date the oppportunity will close',
|
||||
'importable' => 'required',
|
||||
'required' => true,
|
||||
),
|
||||
'next_step' =>
|
||||
array (
|
||||
'name' => 'next_step',
|
||||
'vname' => 'LBL_NEXT_STEP',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
'comment' => 'The next step in the sales process',
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'sales_stage' =>
|
||||
array (
|
||||
'name' => 'sales_stage',
|
||||
'vname' => 'LBL_SALES_STAGE',
|
||||
'type' => 'enum',
|
||||
'options' => 'sales_stage_dom',
|
||||
'len' => '255',
|
||||
'audited'=>true,
|
||||
'comment' => 'Indication of progression towards closure',
|
||||
'merge_filter' => 'enabled',
|
||||
'importable' => 'required',
|
||||
'required' => true,
|
||||
),
|
||||
'probability' =>
|
||||
array (
|
||||
'name' => 'probability',
|
||||
'vname' => 'LBL_PROBABILITY',
|
||||
'type' => 'int',
|
||||
'dbType' => 'double',
|
||||
'audited'=>true,
|
||||
'comment' => 'The probability of closure',
|
||||
'validation' => array('type' => 'range', 'min' => 0, 'max' => 100),
|
||||
'merge_filter' => 'enabled',
|
||||
),
|
||||
'accounts' =>
|
||||
array (
|
||||
'name' => 'accounts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'accounts_opportunities',
|
||||
'source'=>'non-db',
|
||||
'link_type'=>'one',
|
||||
'module'=>'Accounts',
|
||||
'bean_name'=>'Account',
|
||||
'vname'=>'LBL_ACCOUNTS',
|
||||
),
|
||||
'contacts' =>
|
||||
array (
|
||||
'name' => 'contacts',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunities_contacts',
|
||||
'source'=>'non-db',
|
||||
'module'=>'Contacts',
|
||||
'bean_name'=>'Contact',
|
||||
'rel_fields'=>array('contact_role'=>array('type'=>'enum', 'options'=>'opportunity_relationship_type_dom')),
|
||||
'vname'=>'LBL_CONTACTS',
|
||||
),
|
||||
'tasks' =>
|
||||
array (
|
||||
'name' => 'tasks',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunity_tasks',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_TASKS',
|
||||
),
|
||||
'notes' =>
|
||||
array (
|
||||
'name' => 'notes',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunity_notes',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_NOTES',
|
||||
),
|
||||
'meetings' =>
|
||||
array (
|
||||
'name' => 'meetings',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunity_meetings',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_MEETINGS',
|
||||
),
|
||||
'calls' =>
|
||||
array (
|
||||
'name' => 'calls',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunity_calls',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_CALLS',
|
||||
),
|
||||
'emails' =>
|
||||
array (
|
||||
'name' => 'emails',
|
||||
'type' => 'link',
|
||||
'relationship' => 'emails_opportunities_rel',/* reldef in emails */
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_EMAILS',
|
||||
),
|
||||
|
||||
'project' =>
|
||||
array (
|
||||
'name' => 'project',
|
||||
'type' => 'link',
|
||||
'relationship' => 'projects_opportunities',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_PROJECTS',
|
||||
),
|
||||
'leads' =>
|
||||
array (
|
||||
'name' => 'leads',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunity_leads',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_LEADS',
|
||||
),
|
||||
|
||||
'campaigns' =>
|
||||
array (
|
||||
'name' => 'campaigns',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunities_campaign',
|
||||
'module'=>'CampaignLog',
|
||||
'bean_name'=>'CampaignLog',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_CAMPAIGNS',
|
||||
),
|
||||
|
||||
'campaign_link' =>
|
||||
array (
|
||||
'name' => 'campaign_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunities_campaign',
|
||||
'vname' => 'LBL_CAMPAIGNS',
|
||||
'link_type' => 'one',
|
||||
'module'=>'Campaigns',
|
||||
'bean_name'=>'Campaign',
|
||||
'source'=>'non-db',
|
||||
),
|
||||
'currencies' =>
|
||||
array (
|
||||
'name' => 'currencies',
|
||||
'type' => 'link',
|
||||
'relationship' => 'opportunity_currencies',
|
||||
'source'=>'non-db',
|
||||
'vname'=>'LBL_CURRENCIES',
|
||||
),
|
||||
),
|
||||
'indices' => array (
|
||||
array(
|
||||
'name' => 'idx_opp_name',
|
||||
'type' => 'index',
|
||||
'fields' => array('name'),
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_opp_assigned',
|
||||
'type' => 'index',
|
||||
'fields' => array('assigned_user_id'),
|
||||
),
|
||||
),
|
||||
|
||||
'relationships' => array (
|
||||
'opportunity_calls' => array('lhs_module'=> 'Opportunities', 'lhs_table'=> 'opportunities', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Calls', 'rhs_table'=> 'calls', 'rhs_key' => 'parent_id',
|
||||
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
|
||||
'relationship_role_column_value'=>'Opportunities')
|
||||
,'opportunity_meetings' => array('lhs_module'=> 'Opportunities', 'lhs_table'=> 'opportunities', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Meetings', 'rhs_table'=> 'meetings', 'rhs_key' => 'parent_id',
|
||||
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
|
||||
'relationship_role_column_value'=>'Opportunities')
|
||||
,'opportunity_tasks' => array('lhs_module'=> 'Opportunities', 'lhs_table'=> 'opportunities', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Tasks', 'rhs_table'=> 'tasks', 'rhs_key' => 'parent_id',
|
||||
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
|
||||
'relationship_role_column_value'=>'Opportunities')
|
||||
,'opportunity_notes' => array('lhs_module'=> 'Opportunities', 'lhs_table'=> 'opportunities', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Notes', 'rhs_table'=> 'notes', 'rhs_key' => 'parent_id',
|
||||
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
|
||||
'relationship_role_column_value'=>'Opportunities')
|
||||
,'opportunity_emails' => array('lhs_module'=> 'Opportunities', 'lhs_table'=> 'opportunities', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Emails', 'rhs_table'=> 'emails', 'rhs_key' => 'parent_id',
|
||||
'relationship_type'=>'one-to-many', 'relationship_role_column'=>'parent_type',
|
||||
'relationship_role_column_value'=>'Opportunities')
|
||||
,'opportunity_leads' => array('lhs_module'=> 'Opportunities', 'lhs_table'=> 'opportunities', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Leads', 'rhs_table'=> 'leads', 'rhs_key' => 'opportunity_id',
|
||||
'relationship_type'=>'one-to-many')
|
||||
,'opportunity_currencies' => array('lhs_module'=> 'Opportunities', 'lhs_table'=> 'opportunities', 'lhs_key' => 'currency_id',
|
||||
'rhs_module'=> 'Currencies', 'rhs_table'=> 'currencies', 'rhs_key' => 'id',
|
||||
'relationship_type'=>'one-to-many')
|
||||
,'opportunities_assigned_user' =>
|
||||
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Opportunities', 'rhs_table'=> 'opportunities', 'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
,'opportunities_modified_user' =>
|
||||
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Opportunities', 'rhs_table'=> 'opportunities', 'rhs_key' => 'modified_user_id',
|
||||
'relationship_type'=>'one-to-many')
|
||||
|
||||
,'opportunities_created_by' =>
|
||||
array('lhs_module'=> 'Users', 'lhs_table'=> 'users', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Opportunities', 'rhs_table'=> 'opportunities', 'rhs_key' => 'created_by',
|
||||
'relationship_type'=>'one-to-many'),
|
||||
'opportunities_campaign' =>
|
||||
array('lhs_module'=> 'campaigns', 'lhs_table'=> 'campaigns', 'lhs_key' => 'id',
|
||||
'rhs_module'=> 'Opportunities', 'rhs_table'=> 'opportunities', 'rhs_key' => 'campaign_id',
|
||||
'relationship_type'=>'one-to-many'),
|
||||
)
|
||||
//This enables optimistic locking for Saves From EditView
|
||||
,'optimistic_locking'=>true,
|
||||
);
|
||||
VardefManager::createVardef('Opportunities','Opportunity', array('default', 'assignable',
|
||||
));
|
||||
?>
|
||||
74
modules/Opportunities/views/view.detail.php
Executable file
74
modules/Opportunities/views/view.detail.php
Executable file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: This file is used to override the default Meta-data DetailView behavior
|
||||
* to provide customization specific to the Campaigns module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
require_once('include/MVC/View/views/view.detail.php');
|
||||
|
||||
class OpportunitiesViewDetail extends ViewDetail {
|
||||
|
||||
function OpportunitiesViewDetail(){
|
||||
parent::ViewDetail();
|
||||
}
|
||||
|
||||
function display() {
|
||||
|
||||
$currency = new Currency();
|
||||
if(isset($this->bean->currency_id) && !empty($this->bean->currency_id))
|
||||
{
|
||||
$currency->retrieve($this->bean->currency_id);
|
||||
if( $currency->deleted != 1){
|
||||
$this->ss->assign('CURRENCY', $currency->iso4217 .' '.$currency->symbol);
|
||||
}else {
|
||||
$this->ss->assign('CURRENCY', $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol());
|
||||
}
|
||||
}else{
|
||||
$this->ss->assign('CURRENCY', $currency->getDefaultISO4217() .' '.$currency->getDefaultCurrencySymbol());
|
||||
}
|
||||
|
||||
parent::display();
|
||||
}
|
||||
}
|
||||
?>
|
||||
81
modules/Opportunities/views/view.edit.php
Executable file
81
modules/Opportunities/views/view.edit.php
Executable file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: This file is used to override the default Meta-data DetailView behavior
|
||||
* to provide customization specific to the Campaigns module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.edit.php');
|
||||
|
||||
class OpportunitiesViewEdit extends ViewEdit {
|
||||
|
||||
function OpportunitiesViewEdit(){
|
||||
parent::ViewEdit();
|
||||
$this->useForSubpanel = true;
|
||||
}
|
||||
|
||||
function display() {
|
||||
global $app_list_strings;
|
||||
$json = getJSONobj();
|
||||
$prob_array = $json->encode($app_list_strings['sales_probability_dom']);
|
||||
$prePopProb = '';
|
||||
if(empty($this->bean->id) && empty($_REQUEST['probability'])) {
|
||||
$prePopProb = 'document.getElementsByName(\'sales_stage\')[0].onchange();';
|
||||
}
|
||||
|
||||
$probability_script=<<<EOQ
|
||||
<script>
|
||||
prob_array = $prob_array;
|
||||
document.getElementsByName('sales_stage')[0].onchange = function() {
|
||||
if(typeof(document.getElementsByName('sales_stage')[0].value) != "undefined" && prob_array[document.getElementsByName('sales_stage')[0].value]) {
|
||||
document.getElementsByName('probability')[0].value = prob_array[document.getElementsByName('sales_stage')[0].value];
|
||||
}
|
||||
};
|
||||
$prePopProb
|
||||
</script>
|
||||
EOQ;
|
||||
|
||||
$this->ss->assign('PROBABILITY_SCRIPT', $probability_script);
|
||||
parent::display();
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user