init
This commit is contained in:
68
modules/Accounts/Account.js
Normal file
68
modules/Accounts/Account.js
Normal file
@@ -0,0 +1,68 @@
|
||||
/*********************************************************************************
|
||||
* 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 open_contact_popup(module_name,width,height,initial_filter,close_popup,hide_clear_button,popup_request_data,popup_mode,create,metadata)
|
||||
{window.document.popup_request_data=popup_request_data;window.document.close_popup=close_popup;URL='index.php?mode=MultiSelect&'
|
||||
+'module='+module_name
|
||||
+'&action=ContactAddressPopup';if(initial_filter!='')
|
||||
{URL+='&query=true'+initial_filter;}
|
||||
if(hide_clear_button)
|
||||
{URL+='&hide_clear_button=true';}
|
||||
windowName='popup_window';windowFeatures='width='+width
|
||||
+',height='+height
|
||||
+',resizable=1,scrollbars=1';if(popup_mode==''&&popup_mode=='undefined'){popup_mode='single';}
|
||||
URL+='&mode='+popup_mode;if(create==''&&create=='undefined'){create='false';}
|
||||
URL+='&create='+create;if(metadata!=''&&metadata!='undefined'){URL+='&metadata='+metadata;}
|
||||
win=window.open(URL,windowName,windowFeatures);if(window.focus)
|
||||
{win.focus();}
|
||||
return win;}
|
||||
function set_focus(){document.getElementById('name').focus();}
|
||||
|
||||
function addEvent(object,eventName,do_function) {
|
||||
if(typeof(object) == "string") object = document.getElementById(object);
|
||||
if(!object) { alert('No object in function addEvent!'); return; }
|
||||
if(object.addEventListener) {
|
||||
object.addEventListener(eventName, do_function, false);
|
||||
} else {
|
||||
object.attachEvent('on'+eventName, do_function);
|
||||
}
|
||||
}
|
||||
|
||||
addEvent(
|
||||
window,
|
||||
'load',
|
||||
function () {
|
||||
if (document.forms.EditView.record.value=='')
|
||||
document.getElementById("document_bank_account").options[0].selected=true;
|
||||
});
|
||||
895
modules/Accounts/Account.php
Normal file
895
modules/Accounts/Account.php
Normal file
@@ -0,0 +1,895 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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 Account SugarBean Account entity with the necessary
|
||||
* methods and variables.
|
||||
********************************************************************************/
|
||||
|
||||
require_once("include/SugarObjects/templates/company/Company.php");
|
||||
|
||||
// Account is used to store account information.
|
||||
class Account extends Company {
|
||||
var $field_name_map = array();
|
||||
// Stored fields
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $assigned_user_id;
|
||||
var $annual_revenue;
|
||||
var $billing_address_street;
|
||||
var $billing_address_city;
|
||||
var $billing_address_state;
|
||||
var $billing_address_country;
|
||||
var $billing_address_postalcode;
|
||||
|
||||
var $billing_address_street_2;
|
||||
var $billing_address_street_3;
|
||||
var $billing_address_street_4;
|
||||
|
||||
var $description;
|
||||
var $email1;
|
||||
var $email2;
|
||||
var $email_opt_out;
|
||||
var $invalid_email;
|
||||
var $employees;
|
||||
var $id;
|
||||
var $industry;
|
||||
var $name;
|
||||
var $ownership;
|
||||
var $parent_id;
|
||||
var $phone_alternate;
|
||||
var $phone_fax;
|
||||
var $phone_office;
|
||||
var $rating;
|
||||
var $shipping_address_street;
|
||||
var $shipping_address_city;
|
||||
var $shipping_address_state;
|
||||
var $shipping_address_country;
|
||||
var $shipping_address_postalcode;
|
||||
|
||||
var $shipping_address_street_2;
|
||||
var $shipping_address_street_3;
|
||||
var $shipping_address_street_4;
|
||||
|
||||
var $campaign_id;
|
||||
|
||||
var $sic_code;
|
||||
var $ticker_symbol;
|
||||
var $account_type;
|
||||
var $website;
|
||||
var $custom_fields;
|
||||
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $modified_by_name;
|
||||
|
||||
var $iln;
|
||||
|
||||
// These are for related fields
|
||||
var $opportunity_id;
|
||||
var $case_id;
|
||||
var $contact_id;
|
||||
var $task_id;
|
||||
var $note_id;
|
||||
var $meeting_id;
|
||||
var $call_id;
|
||||
var $email_id;
|
||||
var $member_id;
|
||||
var $parent_name;
|
||||
var $assigned_user_name;
|
||||
var $account_id = '';
|
||||
var $account_name = '';
|
||||
var $bug_id ='';
|
||||
var $module_dir = 'Accounts';
|
||||
var $emailAddress;
|
||||
|
||||
|
||||
var $table_name = "accounts";
|
||||
var $object_name = "Account";
|
||||
var $importable = true;
|
||||
var $new_schema = true;
|
||||
// This is used to retrieve related fields from form posts.
|
||||
var $additional_column_fields = Array('assigned_user_name', 'assigned_user_id', 'opportunity_id', 'bug_id', 'case_id', 'contact_id', 'task_id', 'note_id', 'meeting_id', 'call_id', 'email_id', 'parent_name', 'member_id'
|
||||
);
|
||||
var $relationship_fields = Array('opportunity_id'=>'opportunities', 'bug_id' => 'bugs', 'case_id'=>'cases',
|
||||
'contact_id'=>'contacts', 'task_id'=>'tasks', 'note_id'=>'notes',
|
||||
'meeting_id'=>'meetings', 'call_id'=>'calls', 'email_id'=>'emails','member_id'=>'members',
|
||||
'project_id'=>'project',
|
||||
);
|
||||
|
||||
//Meta-Data Framework fields
|
||||
var $push_billing;
|
||||
var $push_shipping;
|
||||
|
||||
function Account() {
|
||||
parent::Company();
|
||||
|
||||
$this->setupCustomFields('Accounts');
|
||||
|
||||
foreach ($this->field_defs as $field)
|
||||
{
|
||||
if(isset($field['name']))
|
||||
{
|
||||
$this->field_name_map[$field['name']] = $field;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//Email logic
|
||||
if (!empty($_REQUEST['parent_id']) && !empty($_REQUEST['parent_type']) && $_REQUEST['parent_type'] == 'Emails'
|
||||
&& !empty($_REQUEST['return_module']) && $_REQUEST['return_module'] == 'Emails') {
|
||||
$_REQUEST['parent_name'] = '';
|
||||
$_REQUEST['parent_id'] = '';
|
||||
}
|
||||
}
|
||||
|
||||
function get_summary_text()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
function get_contacts() {
|
||||
return $this->get_linked_beans('contacts','Contact');
|
||||
}
|
||||
|
||||
|
||||
|
||||
function clear_account_case_relationship($account_id='', $case_id='')
|
||||
{
|
||||
if (empty($case_id)) $where = '';
|
||||
else $where = " and id = '$case_id'";
|
||||
$query = "UPDATE cases SET account_name = '', account_id = '' WHERE account_id = '$account_id' AND deleted = 0 " . $where;
|
||||
$this->db->query($query,true,"Error clearing account to case relationship: ");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is used to provide backward compatibility with old data that was prefixed with http://
|
||||
* We now automatically prefix http://
|
||||
* @deprecated.
|
||||
*/
|
||||
function remove_redundant_http()
|
||||
{ /*
|
||||
if(preg_match("@http://@", $this->website))
|
||||
{
|
||||
$this->website = substr($this->website, 7);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
function fill_in_additional_list_fields()
|
||||
{
|
||||
parent::fill_in_additional_list_fields();
|
||||
// Fill in the assigned_user_name
|
||||
// $this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
|
||||
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields()
|
||||
{
|
||||
parent::fill_in_additional_detail_fields();
|
||||
|
||||
//rrs bug: 28184 - instead of removing this code altogether just adding this check to ensure that if the parent_name
|
||||
//is empty then go ahead and fill it.
|
||||
if(empty($this->parent_name) && !empty($this->id)){
|
||||
$query = "SELECT a1.name from accounts a1, accounts a2 where a1.id = a2.parent_id and a2.id = '$this->id' and a1.deleted=0";
|
||||
$result = $this->db->query($query,true," Error filling in additional detail fields: ");
|
||||
|
||||
// Get the id and the name.
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
|
||||
if($row != null)
|
||||
{
|
||||
$this->parent_name = $row['name'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->parent_name = '';
|
||||
}
|
||||
}
|
||||
|
||||
// Set campaign name if there is a campaign id
|
||||
if( !empty($this->campaign_id)){
|
||||
|
||||
$camp = new Campaign();
|
||||
$where = "campaigns.id='{$this->campaign_id}'";
|
||||
$campaign_list = $camp->get_full_list("campaigns.name", $where, true);
|
||||
$this->campaign_name = $campaign_list[0]->name;
|
||||
}
|
||||
|
||||
require_once("include/ECM/EcmFormatPhoneNumber/EcmFormatPhoneNumber.php");
|
||||
if($_REQUEST['action']=="DetailView"){
|
||||
$this->phone_office = EcmFormatPhoneNumber($this->phone_office, "Account", "Accounts", $this->id);
|
||||
$this->phone_alternate = EcmFormatPhoneNumber($this->phone_alternate, "Account", "Accounts", $this->id);
|
||||
}
|
||||
|
||||
//create link to google maps
|
||||
global $mod_strings;
|
||||
$billing = '<a target="new" href="https://maps.google.com/?q='.$this->billing_address_country.'+'.$this->billing_address_city.'+'.$this->billing_address_street.'">'.substr($mod_strings['LBL_BILLING_ADDRESS'],0,strlen($mod_strings['LBL_BILLING_ADDRESS'])-1).'</a>';
|
||||
$shippping = '<a target="new" href="https://maps.google.com/?q='.$this->shipping_address_country.'+'.$this->shipping_address_city.'+'.$this->shipping_address_street.'">'.substr($mod_strings['LBL_SHIPPING_ADDRESS'],0,strlen($mod_strings['LBL_SHIPPING_ADDRESS'])-1).'</a>';
|
||||
$this->maps = $billing.'<br>'.$shippping;
|
||||
}
|
||||
|
||||
function get_email_addresses($id,$module){
|
||||
|
||||
$w=mysql_query("select email_addresses.email_address as addr from email_addresses inner join email_addr_bean_rel on email_addresses.id=email_addr_bean_rel.email_address_id where email_addr_bean_rel.bean_module='".$module."' and email_addr_bean_rel.bean_id='".$id."' and email_addr_bean_rel.deleted='0'");
|
||||
while($r=mysql_fetch_array($w)){
|
||||
$addrs[]=$r['addr'];
|
||||
}
|
||||
return $addrs;
|
||||
}
|
||||
|
||||
function get_list_view_data(){
|
||||
|
||||
$temp_array = parent::get_list_view_data();
|
||||
|
||||
$temp_array["ENCODED_NAME"] = $this->name;
|
||||
|
||||
if(!empty($this->billing_address_state))
|
||||
{
|
||||
$temp_array["CITY"] = $this->billing_address_city . ', '. $this->billing_address_state;
|
||||
}
|
||||
else
|
||||
{
|
||||
$temp_array["CITY"] = $this->billing_address_city;
|
||||
}
|
||||
$temp_array["BILLING_ADDRESS_STREET"] = $this->billing_address_street;
|
||||
$temp_array["SHIPPING_ADDRESS_STREET"] = $this->shipping_address_street;
|
||||
|
||||
|
||||
require_once("include/ECM/EcmFormatPhoneNumber/EcmFormatPhoneNumber.php");
|
||||
if($_REQUEST['action']!="Popup"){
|
||||
$temp_array['PHONE_OFFICE'] = EcmFormatPhoneNumber($temp_array['PHONE_OFFICE'], "Account", "Accounts", $this->id);
|
||||
$temp_array['PHONE_ALTERNATE'] = EcmFormatPhoneNumber($temp_array['PHONE_ALTERNATE'], "Account", "Accounts", $this->id);
|
||||
}
|
||||
if($_REQUEST['action']!="Popup"){
|
||||
$temp_array['NAME']="<a target='_blank' href='index.php?module=Accounts&action=DetailView&record=".$this->id."'>".$this->name."</a>";
|
||||
}
|
||||
|
||||
return $temp_array;
|
||||
}
|
||||
/**
|
||||
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 = $this->db->quote($the_query_string);
|
||||
array_push($where_clauses, "accounts.name like '$the_query_string%'");
|
||||
if (is_numeric($the_query_string)) {
|
||||
array_push($where_clauses, "accounts.phone_alternate like '%$the_query_string%'");
|
||||
array_push($where_clauses, "accounts.phone_fax like '%$the_query_string%'");
|
||||
array_push($where_clauses, "accounts.phone_office like '%$the_query_string%'");
|
||||
}
|
||||
|
||||
$the_where = "";
|
||||
foreach($where_clauses as $clause)
|
||||
{
|
||||
if(!empty($the_where)) $the_where .= " or ";
|
||||
$the_where .= $clause;
|
||||
}
|
||||
|
||||
return $the_where;
|
||||
}
|
||||
|
||||
|
||||
function create_export_query(&$order_by, &$where, $relate_link_join='')
|
||||
{
|
||||
$custom_join = $this->getCustomJoin(true, true, $where);
|
||||
$custom_join['join'] .= $relate_link_join;
|
||||
$query = "SELECT
|
||||
accounts.*,email_addresses.email_address email_address,
|
||||
accounts.name as account_name,
|
||||
users.user_name as assigned_user_name ";
|
||||
$query .= $custom_join['select'];
|
||||
$query .= " FROM accounts ";
|
||||
$query .= "LEFT JOIN users
|
||||
ON accounts.assigned_user_id=users.id ";
|
||||
|
||||
//join email address table too.
|
||||
$query .= ' LEFT JOIN email_addr_bean_rel on accounts.id = email_addr_bean_rel.bean_id and email_addr_bean_rel.bean_module=\'Accounts\' and email_addr_bean_rel.deleted=0 and email_addr_bean_rel.primary_address=1 ';
|
||||
$query .= ' LEFT JOIN email_addresses on email_addresses.id = email_addr_bean_rel.email_address_id ' ;
|
||||
|
||||
$query .= $custom_join['join'];
|
||||
|
||||
$where_auto = "( accounts.deleted IS NULL OR accounts.deleted=0 )";
|
||||
|
||||
if($where != "")
|
||||
$query .= "where ($where) AND ".$where_auto;
|
||||
else
|
||||
$query .= "where ".$where_auto;
|
||||
|
||||
if(!empty($order_by))
|
||||
$query .= " ORDER BY ". $this->process_order_by($order_by, null);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function set_notification_body($xtpl, $account)
|
||||
{
|
||||
$xtpl->assign("ACCOUNT_NAME", $account->name);
|
||||
$xtpl->assign("ACCOUNT_TYPE", $account->account_type);
|
||||
$xtpl->assign("ACCOUNT_DESCRIPTION", $account->description);
|
||||
|
||||
return $xtpl;
|
||||
}
|
||||
|
||||
function bean_implements($interface){
|
||||
switch($interface){
|
||||
case 'ACL':return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function get_unlinked_email_query($type=array()) {
|
||||
|
||||
return get_unlinked_email_query($type, $this);
|
||||
}
|
||||
//start managing addresses
|
||||
function savePositions($pl) {
|
||||
global $current_user;
|
||||
$exists = array();
|
||||
foreach ($pl as $p) {
|
||||
if (!isset($p['name']) || $p['name']=='') continue;
|
||||
if (isset($p['id']) && $p['id']!='') {
|
||||
//update exists
|
||||
$q = "
|
||||
UPDATE account_addresses set
|
||||
name = '".addslashes($p['name'])."',
|
||||
date_modified = '".date("Y-m-d H:i:s")."',
|
||||
modified_user_id = '".$current_user->id."',
|
||||
street = '".addslashes($p['street'])."',
|
||||
postalcode = '".addslashes($p['postalcode'])."',
|
||||
city = '".addslashes($p['city'])."',
|
||||
country = '".addslashes($p['country'])."',
|
||||
position = '".addslashes($p['position'])."',
|
||||
phone = '".addslashes($p['phone'])."',
|
||||
fax = '".addslashes($p['fax'])."'
|
||||
WHERE id = '".$p['id']."'
|
||||
";
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $p['id'];
|
||||
} else {
|
||||
//insert new record
|
||||
$id = create_guid();
|
||||
$t = array(
|
||||
$id,
|
||||
$this->id,
|
||||
addslashes($p['name']),
|
||||
date("Y-m-d H:i:s"),
|
||||
date("Y-m-d H:i:s"),
|
||||
$current_user->id,
|
||||
$current_user->id,
|
||||
addslashes($p['street']),
|
||||
addslashes($p['postalcode']),
|
||||
addslashes($p['city']),
|
||||
addslashes($p['country']),
|
||||
addslashes($p['position']),
|
||||
'0',
|
||||
addslashes($p['phone']),
|
||||
addslashes($p['fax']),
|
||||
);
|
||||
$q = "INSERT INTO account_addresses VALUES ('".implode("','", $t)."')";
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $id;
|
||||
}
|
||||
}
|
||||
//delete old
|
||||
$GLOBALS['db']->query("UPDATE account_addresses SET deleted='1', modified_user_id='".$current_user->id."',date_modified = '".date("Y-m-d H:i:s")."' WHERE account_id='".$this->id."' AND id NOT IN ('".implode("','",$exists)."')");
|
||||
}
|
||||
function getPositionList($array = false) {
|
||||
if(isset($this->id) && $this->id != '') {
|
||||
$query = "SELECT * FROM account_addresses WHERE account_id='".$this->id."' AND deleted='0' ORDER BY position";
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
if($r) {
|
||||
|
||||
while($w = $this->db->fetchByAssoc($r)) {
|
||||
$return_array [] = $w;
|
||||
}
|
||||
$json = getJSONobj();
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
}
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
function showPositions(){
|
||||
$arr=$this->getPositionList(true);
|
||||
global $mod_strings;
|
||||
if(count($arr)>0){
|
||||
$table='
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="list view">
|
||||
<tr class="oddListRowS1">
|
||||
<th><b>'.$mod_strings['LBL_ADDRESS_POSITION'].'</b></td>
|
||||
<th><b>'.$mod_strings['LBL_ADDRESS_NAME'].'</b></td>
|
||||
<th><b>'.$mod_strings['LBL_ADDRESS_STREET'].'</b></td>
|
||||
<th><b>'.$mod_strings['LBL_ADDRESS_CITY'].'</b></td>
|
||||
<th><b>'.$mod_strings['LBL_ADDRESS_POSTALCODE'].'</b></td>
|
||||
<th><b>'.$mod_strings['LBL_ADDRESS_COUNTRY'].'</b></td>
|
||||
<th><b>'.$mod_strings['LBL_ADDRESS_PHONE'].'</b></td>
|
||||
<th><b>'.$mod_strings['LBL_ADDRESS_FAX'].'</b></td>
|
||||
</tr>
|
||||
';
|
||||
$i == 0;
|
||||
foreach($arr as $a){
|
||||
$i++;
|
||||
//create link to google map
|
||||
$name = '<a target="new" href="https://maps.google.com/?q='.$a['country'].'+'.$a['city'].'+'.$a['street'].'">'.$a['name'].'</a>';
|
||||
$table.='
|
||||
<tr class="oddListRowS1">
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$a['position'].'</td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$name.'</td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$a['street'].'</td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$a['city'].'</td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$a['postalcode'].'</td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$a['country'].'</td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$a['phone'].'</td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$a['fax'].'</td>
|
||||
';
|
||||
}
|
||||
$table.='</table>';
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
|
||||
function getAddresses($account_id) {
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$res = $db->query("SELECT id, name FROM account_addresses WHERE account_id='$account_id' AND deleted='0' ORDER BY position");
|
||||
|
||||
if ($res->num_rows==0) return 0;
|
||||
//echo "SELECT id, name FROM account_addresses WHERE account_id='$account_id' ORDER BY position";
|
||||
$options = '<select id="address_id" onchange="getAddress();">';
|
||||
$options .= '<option value=\'\'></option>';
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$options.='<option value="'.$row['id'].'">'.$row['name'].'</option>';
|
||||
}
|
||||
$options.='</select>';
|
||||
|
||||
return $options;
|
||||
}
|
||||
function getPayers($account_id) {
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$res = $db->query("SELECT id, name FROM account_addresses WHERE account_id='$account_id' AND deleted='0' ORDER BY position");
|
||||
|
||||
if ($res->num_rows==0) return 0;
|
||||
//echo "SELECT id, name FROM account_addresses WHERE account_id='$account_id' ORDER BY position";
|
||||
$options = '<select id="payer_id" onchange="getPayer();">';
|
||||
$options .= '<option value=\'\'></option>';
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$options.='<option value="'.$row['id'].'">'.$row['name'].'</option>';
|
||||
}
|
||||
$options.='</select>';
|
||||
|
||||
return $options;
|
||||
}
|
||||
function getAddress($id) {
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$row = $db->fetchByAssoc($db->query("SELECT a.name as description , a.street, a.postalcode, a.city,ac.to_vatid as nip,a.country FROM account_addresses a inner join accounts ac on ac.id=a.account_id WHERE a.id='$id'"));
|
||||
|
||||
$ret[] = $row;
|
||||
|
||||
return $ret;
|
||||
|
||||
}
|
||||
//end managing addresses
|
||||
function savePositions55($pl) {
|
||||
|
||||
global $current_user;
|
||||
$exists = array();
|
||||
foreach ($pl as $p) {
|
||||
|
||||
if (!isset($p['product_group']) || $p['product_group']=='') continue;
|
||||
|
||||
|
||||
if (isset($p['id']) && $p['id']!='') {
|
||||
|
||||
//update exists
|
||||
$q = "
|
||||
UPDATE ecmmailingcategories_relation set
|
||||
parent_id = '".addslashes($this->id)."',
|
||||
ecmmailingcategoriy_id= '".addslashes($p['cat_id'])."',
|
||||
available = '".addslashes($p['discount'])."',
|
||||
parent_type = 'Account',
|
||||
parent_name = '".addslashes($p['product_group'])."'
|
||||
WHERE id = '".$p['id']."'
|
||||
";
|
||||
|
||||
//$GLOBALS['db']->query("INSERT INTO log VALUES ('".addslashes($q)."')");
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $p['id'];
|
||||
|
||||
} else {
|
||||
//insert new record
|
||||
$id = create_guid();
|
||||
$t = array(
|
||||
$id,
|
||||
addslashes($p['cat_id']),
|
||||
'0',
|
||||
addslashes($p['discount']),
|
||||
$this->id,
|
||||
addslashes($p['product_group']),
|
||||
'Account'
|
||||
|
||||
);
|
||||
$q = "INSERT INTO ecmmailingcategories_relation VALUES ('".implode("','", $t)."')";
|
||||
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//delete old
|
||||
$GLOBALS['db']->query("UPDATE ecmmailingcategories_relation SET deleted='1' WHERE parent_id='".$this->id."' AND id NOT IN ('".implode("','",$exists)."')");
|
||||
}
|
||||
//start managing discounts
|
||||
function savePositions2($pl) {
|
||||
global $current_user;
|
||||
$exists = array();
|
||||
foreach ($pl as $p) {
|
||||
if (!isset($p['product_group']) || $p['product_group']=='') continue;
|
||||
if (!isset($p['discount']) || $p['discount']=='' || floatval($p['discount'])==0) continue;
|
||||
if (isset($p['id']) && $p['id']!='') {
|
||||
//update exists
|
||||
$q = "
|
||||
UPDATE accounts_discounts set
|
||||
date_modified = '".date("Y-m-d H:i:s")."',
|
||||
modified_user_id = '".$current_user->id."',
|
||||
account_id = '".addslashes($this->id)."',
|
||||
discount = '".addslashes($p['discount'])."',
|
||||
product_group = '".addslashes($p['product_group'])."'
|
||||
WHERE id = '".$p['id']."'
|
||||
";
|
||||
|
||||
//$GLOBALS['db']->query("INSERT INTO log VALUES ('".addslashes($q)."')");
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $p['id'];
|
||||
|
||||
} else {
|
||||
//insert new record
|
||||
$id = create_guid();
|
||||
$t = array(
|
||||
$id,
|
||||
$this->id,
|
||||
addslashes($p['product_group']),
|
||||
addslashes($p['discount']),
|
||||
date("Y-m-d H:i:s"),
|
||||
$current_user->id,
|
||||
'0'
|
||||
);
|
||||
$q = "INSERT INTO accounts_discounts VALUES ('".implode("','", $t)."')";
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $id;
|
||||
}
|
||||
|
||||
}
|
||||
//delete old
|
||||
$GLOBALS['db']->query("UPDATE accounts_discounts SET deleted='1', modified_user_id='".$current_user->id."',date_modified = '".date("Y-m-d H:i:s")."' WHERE account_id='".$this->id."' AND id NOT IN ('".implode("','",$exists)."')");
|
||||
}
|
||||
|
||||
function getPositionList2($array = false) {
|
||||
if(isset($this->id) && $this->id != '') {
|
||||
$query = "SELECT * FROM accounts_discounts WHERE account_id='".$this->id."' AND deleted='0'";
|
||||
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
if($r) {
|
||||
|
||||
while($w = $this->db->fetchByAssoc($r)) {
|
||||
$return_array [] = $w;
|
||||
}
|
||||
$json = getJSONobj();
|
||||
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
}
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
function showPositions2(){
|
||||
$arr=$this->getPositionList2(true);
|
||||
|
||||
global $mod_strings;
|
||||
if(count($arr)>0){
|
||||
$table='
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="list view" width="40%">
|
||||
<tr class="oddListRowS1">
|
||||
<th><b>'.$mod_strings['LBL_PRODUCT_GROUP'].'</b></td>
|
||||
<th><b>'.$mod_strings['LBL_DISCOUNT'].'</b></td>
|
||||
</tr>
|
||||
';
|
||||
$i == 0;
|
||||
foreach($arr as $a){
|
||||
$i++;
|
||||
$table.='
|
||||
<tr class="oddListRowS1">
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$a['product_group'].'</td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$a['discount'].'</td>
|
||||
|
||||
';
|
||||
}
|
||||
$table.='</table>';
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
|
||||
//start managing categories
|
||||
function savePositions3($pl) {
|
||||
global $current_user;
|
||||
$exists = array();
|
||||
|
||||
//$GLOBALS['db']->query("INSERT INTO log VALUES ('".addslashes(json_encode($pl))."')");
|
||||
foreach ($pl as $p) {
|
||||
if (!isset($p['ecmaccountcategory_id']) || $p['ecmaccountcategory_id']=='') continue;
|
||||
if (isset($p['id']) && $p['id']!='') {
|
||||
//update exists
|
||||
$q = "
|
||||
UPDATE ecmaccountcategories_bean set
|
||||
date_modified = '".date("Y-m-d H:i:s")."',
|
||||
modified_user_id = '".$current_user->id."',
|
||||
bean_id = '".addslashes($this->id)."',
|
||||
ecmaccountcategory_id = '".addslashes($p['ecmaccountcategory_id'])."'
|
||||
WHERE id = '".$p['id']."'
|
||||
";
|
||||
|
||||
//$GLOBALS['db']->query("INSERT INTO log VALUES ('".addslashes($q)."')");
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $p['id'];
|
||||
|
||||
} else {
|
||||
//insert new record
|
||||
$id = create_guid();
|
||||
$t = array(
|
||||
$id,
|
||||
addslashes($p['ecmaccountcategory_id']),
|
||||
$this->id,
|
||||
"Accounts",
|
||||
date("Y-m-d H:i:s"),
|
||||
date("Y-m-d H:i:s"),
|
||||
$current_user->id,
|
||||
$current_user->id,
|
||||
'0'
|
||||
);
|
||||
$q = "INSERT INTO ecmaccountcategories_bean VALUES ('".implode("','", $t)."')";
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $id;
|
||||
}
|
||||
|
||||
}
|
||||
//delete old
|
||||
$GLOBALS['db']->query("UPDATE ecmaccountcategories_bean SET deleted='1', modified_user_id='".$current_user->id."',date_modified = '".date("Y-m-d H:i:s")."' WHERE bean_id='".$this->id."' AND id NOT IN ('".implode("','",$exists)."')");
|
||||
}
|
||||
|
||||
function showPositions55(){
|
||||
$arr=$this->getPositionList55(true);
|
||||
|
||||
global $mod_strings;
|
||||
if(count($arr)>0){
|
||||
$table='
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="list view" width="40%">
|
||||
<tr class="oddListRowS1">
|
||||
<th><b>Nazwa grupy</b></td>
|
||||
<th><b>Aktywna</b></td>
|
||||
</tr>
|
||||
';
|
||||
$i == 0;
|
||||
foreach($arr as $a){
|
||||
$i++;
|
||||
|
||||
|
||||
$table.='
|
||||
<tr class="oddListRowS1">
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;"><a href="index.php?module=EcmMailingCategories&action=DetailView&record='.$a['cat_id'].'">'.$a['product_group'].'</a></td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.($a['discount']==1 ? 'Tak' : "Nie").'</td>
|
||||
|
||||
';
|
||||
}
|
||||
$table.='</table>';
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
|
||||
function getPositionList55($array = false) {
|
||||
if(isset($this->id) && $this->id != '') {
|
||||
$query = "SELECT * FROM ecmmailingcategories_relation WHERE parent_id='".$this->id."' AND deleted='0' AND parent_type='Account'";
|
||||
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
if($r) {
|
||||
|
||||
while($w = $this->db->fetchByAssoc($r)) {
|
||||
//get category name && assigned_file
|
||||
$n = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT name FROM ecmmailingcategories WHERE id='".$w['ecmmailingcategoriy_id']."'"));
|
||||
$w['product_group'] = $n['name'];
|
||||
$w['cat_id'] =$w['ecmmailingcategoriy_id'];
|
||||
$w['discount'] =$w['available'];
|
||||
$return_array [] = $w;
|
||||
|
||||
}
|
||||
$json = getJSONobj();
|
||||
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
}
|
||||
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
function getPositionList3($array = false) {
|
||||
if(isset($this->id) && $this->id != '') {
|
||||
$query = "SELECT * FROM ecmaccountcategories_bean WHERE bean_id='".$this->id."' AND deleted='0' AND bean_name='Accounts'";
|
||||
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
if($r) {
|
||||
|
||||
while($w = $this->db->fetchByAssoc($r)) {
|
||||
//get category name && assigned_file
|
||||
$n = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT name, assigned_file FROM ecmaccountcategories WHERE id='".$w['ecmaccountcategory_id']."'"));
|
||||
$w['ecmaccountcategory_name'] = $n['name'];
|
||||
$w['assigned_file'] = $n['assigned_file'];
|
||||
$return_array [] = $w;
|
||||
|
||||
}
|
||||
$json = getJSONobj();
|
||||
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
}
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
|
||||
function showPositions3(){
|
||||
$arr=$this->getPositionList3(true);
|
||||
|
||||
global $mod_strings;
|
||||
if(count($arr)>0){
|
||||
$table='
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="list view" width="40%">
|
||||
<tr class="oddListRowS1">
|
||||
<th><b>'.$mod_strings['LBL_CATEGORY_NAME'].'</b></td>
|
||||
<th><b>'.$mod_strings['LBL_CATEGORY_ASSIGNED_FILE'].'</b></td>
|
||||
</tr>
|
||||
';
|
||||
$i == 0;
|
||||
foreach($arr as $a){
|
||||
$i++;
|
||||
//assigned file
|
||||
if ($a['assigned_file']!="" && $a['assigned_file']) {
|
||||
$tmp = explode(".", $a['assigned_file']);
|
||||
if (end($tmp) == 'jpeg' || end($tmp) == 'jpg' || end($tmp) == 'png' || end($tmp) == 'bmp')
|
||||
$af = '<img src="modules/EcmAccountCategories/files/'.$a['assigned_file'].'"/>';
|
||||
else
|
||||
$af = '<a href="modules/EcmAccountCategories/files/'.$a['assigned_file'].'" target="new">'.$a['assigned_file'].'</a>';
|
||||
}
|
||||
$table.='
|
||||
<tr class="oddListRowS1">
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;"><a href="index.php?module=EcmAccountCategories&action=DetailView&record='.$a['ecmaccountcategory_id'].'">'.$a['ecmaccountcategory_name'].'</a></td>
|
||||
|
||||
<td valign="top" class="oddListRowS1" style="padding:5px !important;border-bottom:1px solid #cccccc;vertical-align:top;">'.$af.'</td>
|
||||
|
||||
';
|
||||
}
|
||||
$table.='</table>';
|
||||
}
|
||||
|
||||
return $table;
|
||||
}
|
||||
//end managing categories
|
||||
|
||||
function AddGoogleContact() {
|
||||
global $current_user;
|
||||
if (!$current_user->google_login || $current_user->google_login=='' || !$current_user->google_p || $current_user->google_p=='') return -1;
|
||||
|
||||
require_once 'Zend/Loader.php';
|
||||
Zend_Loader::loadClass('Zend_Gdata');
|
||||
Zend_Loader::loadClass('Zend_Gdata_ClientLogin');
|
||||
Zend_Loader::loadClass('Zend_Http_Client');
|
||||
Zend_Loader::loadClass('Zend_Gdata_Query');
|
||||
Zend_Loader::loadClass('Zend_Gdata_Feed');
|
||||
|
||||
try {
|
||||
// perform login and set protocol version to 3.0
|
||||
$client = Zend_Gdata_ClientLogin::getHttpClient($current_user->google_login, $current_user->google_p, 'cp');
|
||||
|
||||
$gdata = new Zend_Gdata($client);
|
||||
$gdata->setMajorProtocolVersion(3);
|
||||
|
||||
//return serialize($gdata);
|
||||
|
||||
// create new entry
|
||||
$doc = new DOMDocument();
|
||||
$doc->formatOutput = true;
|
||||
$entry = $doc->createElement('atom:entry');
|
||||
$entry->setAttributeNS('http://www.w3.org/2000/xmlns/' , 'xmlns:atom', 'http://www.w3.org/2005/Atom');
|
||||
$entry->setAttributeNS('http://www.w3.org/2000/xmlns/' ,'xmlns:gd', 'http://schemas.google.com/g/2005');
|
||||
$doc->appendChild($entry);
|
||||
|
||||
// add name element
|
||||
$name = $doc->createElement('gd:name');
|
||||
$entry->appendChild($name);
|
||||
$fullName = $doc->createElement('gd:fullName', $this->name);
|
||||
$name->appendChild($fullName);
|
||||
|
||||
// add email element
|
||||
$email = $doc->createElement('gd:email');
|
||||
$email->setAttribute('address' ,$this->emailAddress->getPrimaryAddress($this));
|
||||
$email->setAttribute('rel' ,'http://schemas.google.com/g/2005#home');
|
||||
$entry->appendChild($email);
|
||||
|
||||
// add org name element
|
||||
$org = $doc->createElement('gd:organization');
|
||||
$org->setAttribute('rel' ,'http://schemas.google.com/g/2005#work');
|
||||
$entry->appendChild($org);
|
||||
$orgName = $doc->createElement('gd:orgName', $this->name);
|
||||
$org->appendChild($orgName);
|
||||
|
||||
if ($this->phone_office) {
|
||||
$phone = $doc->createElement('gd:phoneNumber', $this->phone_office);
|
||||
$phone->setAttribute('rel' ,'http://schemas.google.com/g/2005#work');
|
||||
$entry->appendChild($phone);
|
||||
//$phoneName = $doc->createElement('gd:phoneNumberName', $this->phone_office);
|
||||
//$phone->appendChild($phoneName);
|
||||
}
|
||||
// insert entry
|
||||
$entryResult = $gdata->insertEntry($doc->saveXML(), 'https://www.google.com/m8/feeds/contacts/default/full');
|
||||
|
||||
return 1;
|
||||
} catch (Exception $e) {
|
||||
//return 4;
|
||||
return $e->getMessage();
|
||||
//return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
569
modules/Accounts/AccountFormBase.php
Normal file
569
modules/Accounts/AccountFormBase.php
Normal file
@@ -0,0 +1,569 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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: base form for account
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
class AccountFormBase{
|
||||
|
||||
|
||||
function checkForDuplicates($prefix){
|
||||
require_once('include/formbase.php');
|
||||
|
||||
$focus = new Account();
|
||||
$query = '';
|
||||
$baseQuery = 'select id, name, website, billing_address_city from accounts where deleted!=1 and ';
|
||||
if(!empty($_POST[$prefix.'name'])){
|
||||
$query = $baseQuery ." name like '".$_POST[$prefix.'name']."%'";
|
||||
}
|
||||
|
||||
if(!empty($_POST[$prefix.'billing_address_city']) || !empty($_POST[$prefix.'shipping_address_city'])){
|
||||
|
||||
$temp_query = '';
|
||||
if(!empty($_POST[$prefix.'billing_address_city'])){
|
||||
if(empty($temp_query)){
|
||||
$temp_query = " billing_address_city like '".$_POST[$prefix.'billing_address_city']."%'";
|
||||
}else {
|
||||
$temp_query .= "or billing_address_city like '".$_POST[$prefix.'billing_address_city']."%'";
|
||||
}
|
||||
}
|
||||
if(!empty($_POST[$prefix.'shipping_address_city'])){
|
||||
if(empty($temp_query)){
|
||||
$temp_query = " shipping_address_city like '".$_POST[$prefix.'shipping_address_city']."%'";
|
||||
}else {
|
||||
$temp_query .= "or shipping_address_city like '".$_POST[$prefix.'shipping_address_city']."%'";
|
||||
}
|
||||
}
|
||||
if(empty($query)){
|
||||
$query .= $baseQuery;
|
||||
}else{
|
||||
$query .= ' AND ';
|
||||
}
|
||||
$query .= ' ('. $temp_query . ' ) ';
|
||||
|
||||
}
|
||||
|
||||
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='Accounts'){
|
||||
if(!ACLController::checkAccess('Accounts', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
global $action;
|
||||
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;
|
||||
if ($action != 'ShowDuplicates')
|
||||
{
|
||||
$form = "<form action='index.php' method='post' id='dupAccounts' name='dupAccounts'><input type='hidden' name='selectedAccount' value=''>";
|
||||
$form .= '<table width="100%"><tr><td>'.$mod_strings['MSG_DUPLICATE']. '</td></tr><tr><td height="20"></td></tr></table>';
|
||||
unset($_POST['selectedAccount']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$form = '<table width="100%"><tr><td>'.$mod_strings['MSG_SHOW_DUPLICATES']. '</td></tr><tr><td height="20"></td></tr></table>';
|
||||
}
|
||||
|
||||
if(isset($_POST['return_action']) && $_POST['return_action'] == 'SubPanelViewer') {
|
||||
$_POST['return_action'] = 'DetailView';
|
||||
}
|
||||
|
||||
if(isset($_POST['return_action']) && $_POST['return_action'] == 'DetailView' && empty($_REQUEST['return_id'])) {
|
||||
unset($_POST['return_action']);
|
||||
}
|
||||
|
||||
$form .= "<table width='100%' cellpadding='0' cellspacing='0' class='list view' border='0'><tr class='pagination'><td colspan='$cols'><table width='100%' cellspacing='0' cellpadding='0' border='0'><tr><td>";
|
||||
// handle buttons
|
||||
if ($action == 'ShowDuplicates') {
|
||||
$return_action = 'ListView'; // cn: bug 6658 - hardcoded return action break popup -> create -> duplicate -> cancel
|
||||
$return_action = (isset($_REQUEST['return_action']) && !empty($_REQUEST['return_action'])) ? $_REQUEST['return_action'] : $return_action;
|
||||
$form .= "<input type='hidden' name='selectedAccount' id='selectedAccount' value=''><input title='${app_strings['LBL_SAVE_BUTTON_TITLE']}' accessKey='${app_strings['LBL_SAVE_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value=' ${app_strings['LBL_SAVE_BUTTON_LABEL']} '>\n";
|
||||
|
||||
if (!empty($_REQUEST['return_module']) && !empty($_REQUEST['return_action']) && !empty($_REQUEST['return_id']))
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.module.value='".$_REQUEST['return_module']."';this.form.action.value='".$_REQUEST['return_action']."';this.form.record.value='".$_REQUEST['return_id']."'\" type='submit' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
|
||||
else if (!empty($_POST['return_module']) && !empty($_POST['return_action']))
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.module.value='".$_POST['return_module']."';this.form.action.value='". $_POST['return_action']."';\" type='submit' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
|
||||
else
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' accessKey='${app_strings['LBL_CANCEL_BUTTON_KEY']}' class='button' onclick=\"this.form.action.value='ListView';\" type='submit' type='submit' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
|
||||
} else {
|
||||
$form .= "<input type='submit' class='button' name='ContinueAccount' value='${mod_strings['LNK_NEW_ACCOUNT']}'>\n";
|
||||
}
|
||||
$form .= "</td></tr></table></td></tr><tr>";
|
||||
if ($action != 'ShowDuplicates')
|
||||
{
|
||||
$form .= "<th> </th>";
|
||||
}
|
||||
require_once('include/formbase.php');
|
||||
|
||||
$form .= getPostToForm();
|
||||
if(isset($rows[0])){
|
||||
foreach ($rows[0] as $key=>$value){
|
||||
if($key != 'id'){
|
||||
|
||||
$form .= "<th>". $mod_strings[$mod_strings['db_'.$key]]. "</th>";
|
||||
}}
|
||||
|
||||
$form .= "</tr>";
|
||||
}
|
||||
|
||||
$rowColor = 'oddListRowS1';
|
||||
foreach($rows as $row){
|
||||
|
||||
$form .= "<tr class='$rowColor'>";
|
||||
if ($action != 'ShowDuplicates')
|
||||
{
|
||||
$form .= "<td width='1%' nowrap><a href='javascript:void(0)' onclick='document.dupAccounts.selectedAccount.value=\"${row['id']}\"; document.dupAccounts.submit(); '>[${app_strings['LBL_SELECT_BUTTON_LABEL']}]</a> </td>\n";
|
||||
}
|
||||
foreach ($row as $key=>$value){
|
||||
if($key != 'id'){
|
||||
if(isset($_POST['popup']) && $_POST['popup']==true){
|
||||
$form .= "<td scope='row'><a href='javascript:void(0)' onclick=\"window.opener.location='index.php?module=Accounts&action=DetailView&record=${row['id']}'\">$value</a></td>\n";
|
||||
}
|
||||
else
|
||||
$form .= "<td><a target='_blank' href='index.php?module=Accounts&action=DetailView&record=${row['id']}'>$value</a></td>\n";
|
||||
|
||||
}}
|
||||
|
||||
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>";
|
||||
|
||||
// handle buttons
|
||||
if ($action == 'ShowDuplicates') {
|
||||
$return_action = 'ListView'; // cn: bug 6658 - hardcoded return action break popup -> create -> duplicate -> cancel
|
||||
$return_action = (isset($_REQUEST['return_action']) && !empty($_REQUEST['return_action'])) ? $_REQUEST['return_action'] : $return_action;
|
||||
$form .= "<input type='hidden' name='selectedAccount' id='selectedAccount' value=''><input title='${app_strings['LBL_SAVE_BUTTON_TITLE']}' class='button' onclick=\"this.form.action.value='Save';\" type='submit' name='button' value=' ${app_strings['LBL_SAVE_BUTTON_LABEL']} '>\n";
|
||||
|
||||
if (!empty($_REQUEST['return_module']) && !empty($_REQUEST['return_action']) && !empty($_REQUEST['return_id']))
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' class='button' onclick=\"this.form.module.value='".$_REQUEST['return_module']."';this.form.action.value='".$_REQUEST['return_action']."';this.form.record.value='".$_REQUEST['return_id']."'\" type='submit' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
|
||||
else if (!empty($_POST['return_module']) && !empty($_POST['return_action']))
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' class='button' onclick=\"this.form.module.value='".$_POST['return_module']."';this.form.action.value='". $_POST['return_action']."';\" type='submit' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
|
||||
else
|
||||
$form .= "<input title='${app_strings['LBL_CANCEL_BUTTON_TITLE']}' class='button' onclick=\"this.form.action.value='ListView';\" type='submit' name='button' value=' ${app_strings['LBL_CANCEL_BUTTON_LABEL']} '>";
|
||||
} else {
|
||||
$form .= "<input type='submit' class='button' name='ContinueAccount' value='${mod_strings['LNK_NEW_ACCOUNT']}'></form>\n";
|
||||
}
|
||||
$form .= "</td></tr></table></td></tr></table>";
|
||||
return $form;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getForm($prefix, $mod='', $form=''){
|
||||
if(!ACLController::checkAccess('Accounts', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}else global $mod_strings;
|
||||
global $app_strings;
|
||||
$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}AccountSave" onSubmit="return check_form('${prefix}AccountSave');" method="POST" action="index.php">
|
||||
<input type="hidden" name="${prefix}module" value="Accounts">
|
||||
<input type="hidden" name="${prefix}action" value="Save">
|
||||
EOQ;
|
||||
$the_form .= $this->getFormBody($prefix, $mod, $prefix."AccountSave");
|
||||
$the_form .= <<<EOQ
|
||||
<p><input title="$lbl_save_button_title" accessKey="$lbl_save_button_key" class="button" type="submit" name="button" value=" $lbl_save_button_label " ></p>
|
||||
</form>
|
||||
|
||||
EOQ;
|
||||
$the_form .= get_left_form_footer();
|
||||
$the_form .= get_validate_record_js();
|
||||
|
||||
return $the_form;
|
||||
}
|
||||
|
||||
|
||||
function getFormBody($prefix,$mod='', $formname=''){
|
||||
if(!ACLController::checkAccess('Accounts', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
global $mod_strings;
|
||||
$temp_strings = $mod_strings;
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}
|
||||
global $app_strings;
|
||||
global $current_user;
|
||||
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$lbl_account_name = $mod_strings['LBL_ACCOUNT_NAME'];
|
||||
$lbl_phone = $mod_strings['LBL_PHONE'];
|
||||
$lbl_website = $mod_strings['LBL_WEBSITE'];
|
||||
$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'];
|
||||
$user_id = $current_user->id;
|
||||
|
||||
$form = <<<EOQ
|
||||
<p><input type="hidden" name="record" value="">
|
||||
<input type="hidden" name="email1" value="">
|
||||
<input type="hidden" name="email2" value="">
|
||||
<input type="hidden" name="assigned_user_id" value='${user_id}'>
|
||||
<input type="hidden" name="action" value="Save">
|
||||
EOQ;
|
||||
$form .= "$lbl_account_name <span class='required'>$lbl_required_symbol</span><br><input name='name' type='text' value=''><br>";
|
||||
$form .= "$lbl_phone<br><input name='phone_office' type='text' value=''><br>";
|
||||
$form .= "$lbl_website<br><input name='website' type='text' value='http://'><br>";
|
||||
$form .='</p>';
|
||||
|
||||
|
||||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new Account());
|
||||
$javascript->addRequiredFields($prefix);
|
||||
$form .=$javascript->getScript();
|
||||
$mod_strings = $temp_strings;
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getWideFormBody($prefix, $mod='',$formname='', $contact=''){
|
||||
if(!ACLController::checkAccess('Accounts', 'edit', true)){
|
||||
return '';
|
||||
}
|
||||
|
||||
if(empty($contact)){
|
||||
$contact = new Contact();
|
||||
}
|
||||
global $mod_strings;
|
||||
$temp_strings = $mod_strings;
|
||||
if(!empty($mod)){
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, $mod);
|
||||
}
|
||||
global $app_strings;
|
||||
global $current_user;
|
||||
$account = new Account();
|
||||
|
||||
$lbl_required_symbol = $app_strings['LBL_REQUIRED_SYMBOL'];
|
||||
$lbl_account_name = $mod_strings['LBL_ACCOUNT_NAME'];
|
||||
$lbl_phone = $mod_strings['LBL_PHONE'];
|
||||
$lbl_website = $mod_strings['LBL_WEBSITE'];
|
||||
if (isset($contact->assigned_user_id)) {
|
||||
$user_id=$contact->assigned_user_id;
|
||||
} else {
|
||||
$user_id = $current_user->id;
|
||||
}
|
||||
|
||||
//Retrieve Email address and set email1, email2
|
||||
$sugarEmailAddress = new SugarEmailAddress();
|
||||
$sugarEmailAddress->handleLegacyRetrieve($contact);
|
||||
if(!isset($contact->email1)){
|
||||
$contact->email1 = '';
|
||||
}
|
||||
if(!isset($contact->email2)){
|
||||
$contact->email2 = '';
|
||||
}
|
||||
if(!isset($contact->email_opt_out)){
|
||||
$contact->email_opt_out = '';
|
||||
}
|
||||
$form="";
|
||||
$default_desc="";
|
||||
if (!empty($contact->description)) {
|
||||
$default_desc=$contact->description;
|
||||
}
|
||||
$form .= <<<EOQ
|
||||
<input type="hidden" name="${prefix}record" value="">
|
||||
<input type="hidden" name="${prefix}phone_fax" value="{$contact->phone_fax}">
|
||||
<input type="hidden" name="${prefix}phone_other" value="{$contact->phone_other}">
|
||||
<input type="hidden" name="${prefix}email1" value="{$contact->email1}">
|
||||
<input type="hidden" name="${prefix}email2" value="{$contact->email2}">
|
||||
<input type='hidden' name='${prefix}billing_address_street' value='{$contact->primary_address_street}'><input type='hidden' name='${prefix}billing_address_city' value='{$contact->primary_address_city}'><input type='hidden' name='${prefix}billing_address_state' value='{$contact->primary_address_state}'><input type='hidden' name='${prefix}billing_address_postalcode' value='{$contact->primary_address_postalcode}'><input type='hidden' name='${prefix}billing_address_country' value='{$contact->primary_address_country}'>
|
||||
<input type='hidden' name='${prefix}shipping_address_street' value='{$contact->alt_address_street}'><input type='hidden' name='${prefix}shipping_address_city' value='{$contact->alt_address_city}'><input type='hidden' name='${prefix}shipping_address_state' value='{$contact->alt_address_state}'><input type='hidden' name='${prefix}shipping_address_postalcode' value='{$contact->alt_address_postalcode}'><input type='hidden' name='${prefix}shipping_address_country' value='{$contact->alt_address_country}'>
|
||||
<input type="hidden" name="${prefix}assigned_user_id" value='${user_id}'>
|
||||
<input type='hidden' name='${prefix}do_not_call' value='{$contact->do_not_call}'>
|
||||
<input type='hidden' name='${prefix}email_opt_out' value='{$contact->email_opt_out}'>
|
||||
<table width='100%' border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td width="20%" nowrap scope="row">$lbl_account_name <span class="required">$lbl_required_symbol</span></td>
|
||||
<TD width="80%" nowrap scope="row">{$mod_strings['LBL_DESCRIPTION']}</TD>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap ><input name='{$prefix}name' type="text" value="$contact->account_name"></td>
|
||||
<TD rowspan="5" ><textarea name='{$prefix}description' rows='6' cols='50' >$default_desc</textarea></TD>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap scope="row">$lbl_phone</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap ><input name='{$prefix}phone_office' type="text" value="$contact->phone_work"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap scope="row">$lbl_website</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap ><input name='{$prefix}website' type="text" value="http://"></td>
|
||||
</tr>
|
||||
EOQ;
|
||||
//carry forward custom lead fields common to accounts during Lead Conversion
|
||||
$tempAccount = new Account();
|
||||
if (method_exists($contact, 'convertCustomFieldsForm')) $contact->convertCustomFieldsForm($form, $tempAccount, $prefix);
|
||||
unset($tempAccount);
|
||||
$form .= <<<EOQ
|
||||
</TABLE>
|
||||
EOQ;
|
||||
|
||||
|
||||
$javascript = new javascript();
|
||||
$javascript->setFormName($formname);
|
||||
$javascript->setSugarBean(new Account());
|
||||
$javascript->addRequiredFields($prefix);
|
||||
$form .=$javascript->getScript();
|
||||
$mod_strings = $temp_strings;
|
||||
return $form;
|
||||
}
|
||||
|
||||
|
||||
function handleSave($prefix,$redirect=true, $useRequired=false){
|
||||
|
||||
|
||||
require_once('include/formbase.php');
|
||||
|
||||
$focus = new Account();
|
||||
|
||||
if($useRequired && !checkRequired($prefix, array_keys($focus->required_fields))){
|
||||
return null;
|
||||
}
|
||||
$focus = populateFromPost($prefix, $focus);
|
||||
|
||||
if (isset($GLOBALS['check_notify'])) {
|
||||
$check_notify = $GLOBALS['check_notify'];
|
||||
}
|
||||
else {
|
||||
$check_notify = FALSE;
|
||||
}
|
||||
|
||||
if (empty($_POST['record']) && empty($_POST['dup_checked'])) {
|
||||
$duplicateAccounts = $this->checkForDuplicates($prefix);
|
||||
if(isset($duplicateAccounts)){
|
||||
$location='module=Accounts&action=ShowDuplicates';
|
||||
$get = '';
|
||||
|
||||
// Bug 25311 - Add special handling for when the form specifies many-to-many relationships
|
||||
if(isset($_POST['relate_to']) && !empty($_POST['relate_to'])) {
|
||||
$get .= '&Accountsrelate_to='.$_POST['relate_to'];
|
||||
}
|
||||
if(isset($_POST['relate_id']) && !empty($_POST['relate_id'])) {
|
||||
$get .= '&Accountsrelate_id='.$_POST['relate_id'];
|
||||
}
|
||||
|
||||
//add all of the post fields to redirect get string
|
||||
foreach ($focus->column_fields as $field)
|
||||
{
|
||||
if (!empty($focus->$field) && !is_object($focus->$field))
|
||||
{
|
||||
$get .= "&Accounts$field=".urlencode($focus->$field);
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($focus->additional_column_fields as $field)
|
||||
{
|
||||
if (!empty($focus->$field))
|
||||
{
|
||||
$get .= "&Accounts$field=".urlencode($focus->$field);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($focus->hasCustomFields()) {
|
||||
foreach($focus->field_defs as $name=>$field) {
|
||||
if (!empty($field['source']) && $field['source'] == 'custom_fields')
|
||||
{
|
||||
$get .= "&Accounts$name=".urlencode($focus->$name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
$emailAddress = new SugarEmailAddress();
|
||||
$get .= $emailAddress->getFormBaseURL($focus);
|
||||
|
||||
|
||||
|
||||
//create list of suspected duplicate account id's in redirect get string
|
||||
$i=0;
|
||||
foreach ($duplicateAccounts as $account)
|
||||
{
|
||||
$get .= "&duplicate[$i]=".$account['id'];
|
||||
$i++;
|
||||
}
|
||||
|
||||
//add return_module, return_action, and return_id to redirect get string
|
||||
$get .= '&return_module=';
|
||||
if(!empty($_POST['return_module'])) $get .= $_POST['return_module'];
|
||||
else $get .= 'Accounts';
|
||||
$get .= '&return_action=';
|
||||
if(!empty($_POST['return_action'])) $get .= $_POST['return_action'];
|
||||
//else $get .= 'DetailView';
|
||||
if(!empty($_POST['return_id'])) $get .= '&return_id='.$_POST['return_id'];
|
||||
if(!empty($_POST['popup'])) $get .= '&popup='.$_POST['popup'];
|
||||
if(!empty($_POST['create'])) $get .= '&create='.$_POST['create'];
|
||||
|
||||
$_SESSION['SHOW_DUPLICATES'] = $get;
|
||||
//now redirect the post to modules/Accounts/ShowDuplicates.php
|
||||
if (!empty($_POST['is_ajax_call']) && $_POST['is_ajax_call'] == '1')
|
||||
{
|
||||
ob_clean();
|
||||
$json = getJSONobj();
|
||||
echo $json->encode(array('status' => 'dupe', 'get' => $location));
|
||||
}
|
||||
else if(!empty($_REQUEST['ajax_load']))
|
||||
{
|
||||
echo "<script>SUGAR.ajaxUI.loadContent('index.php?$location');</script>";
|
||||
}
|
||||
else {
|
||||
if(!empty($_POST['to_pdf']))
|
||||
$location .= '&to_pdf='.$_POST['to_pdf'];
|
||||
header("Location: index.php?$location");
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
if ($focus->shop_user!='none')
|
||||
$focus->website_update = 1;
|
||||
|
||||
//save addresses
|
||||
$focus->savePositions($_POST['position_list']);
|
||||
//save discounts
|
||||
$focus->savePositions2($_POST['position_list2']);
|
||||
//save categories
|
||||
$focus->savePositions3($_POST['position_list3']);
|
||||
$focus->savePositions55($_POST['position_list55']);
|
||||
|
||||
$focus->to_vatid_unformated = str_replace("-","", $focus->to_vatid);
|
||||
$focus->save($check_notify);
|
||||
$return_id = $focus->id;
|
||||
|
||||
$GLOBALS['log']->debug("Saved record with id of ".$return_id);
|
||||
|
||||
|
||||
if (!empty($_POST['is_ajax_call']) && $_POST['is_ajax_call'] == '1') {
|
||||
$json = getJSONobj();
|
||||
echo $json->encode(array('status' => 'success',
|
||||
'get' => ''));
|
||||
$trackerManager = TrackerManager::getInstance();
|
||||
$timeStamp = TimeDate::getInstance()->nowDb();
|
||||
if($monitor = $trackerManager->getMonitor('tracker')){
|
||||
$monitor->setValue('action', 'detailview');
|
||||
$monitor->setValue('user_id', $GLOBALS['current_user']->id);
|
||||
$monitor->setValue('module_name', 'Accounts');
|
||||
$monitor->setValue('date_modified', $timeStamp);
|
||||
$monitor->setValue('visible', 1);
|
||||
|
||||
if (!empty($this->bean->id)) {
|
||||
$monitor->setValue('item_id', $return_id);
|
||||
$monitor->setValue('item_summary', $focus->get_summary_text());
|
||||
}
|
||||
$trackerManager->saveMonitor($monitor, true, true);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
if(isset($_POST['popup']) && $_POST['popup'] == 'true') {
|
||||
$get = '&module=';
|
||||
if(!empty($_POST['return_module'])) $get .= $_POST['return_module'];
|
||||
else $get .= 'Accounts';
|
||||
$get .= '&action=';
|
||||
if(!empty($_POST['return_action'])) $get .= $_POST['return_action'];
|
||||
else $get .= 'Popup';
|
||||
if(!empty($_POST['return_id'])) $get .= '&return_id='.$_POST['return_id'];
|
||||
if(!empty($_POST['popup'])) $get .= '&popup='.$_POST['popup'];
|
||||
if(!empty($_POST['create'])) $get .= '&create='.$_POST['create'];
|
||||
if(!empty($_POST['to_pdf'])) $get .= '&to_pdf='.$_POST['to_pdf'];
|
||||
$get .= '&name=' . $focus->name;
|
||||
$get .= '&query=true';
|
||||
header("Location: index.php?$get");
|
||||
return;
|
||||
}
|
||||
if($redirect){
|
||||
handleRedirect($return_id,'Accounts');
|
||||
}else{
|
||||
return $focus;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
69
modules/Accounts/AccountsQuickCreate.php
Executable file
69
modules/Accounts/AccountsQuickCreate.php
Executable file
@@ -0,0 +1,69 @@
|
||||
<?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 AccountsQuickCreate extends QuickCreate {
|
||||
|
||||
var $javascript;
|
||||
|
||||
function process() {
|
||||
global $current_user, $timedate, $app_list_strings, $current_language, $mod_strings;
|
||||
$mod_strings = return_module_language($current_language, 'Accounts');
|
||||
|
||||
parent::process();
|
||||
|
||||
if($this->viaAJAX) { // override for ajax call
|
||||
$this->ss->assign('saveOnclick', "onclick='if(check_form(\"accountsQuickCreate\")) return SUGAR.subpanelUtils.inlineSave(this.form.id, \"accounts\"); else return false;'");
|
||||
$this->ss->assign('cancelOnclick', "onclick='return SUGAR.subpanelUtils.cancelCreate(\"subpanel_accounts\")';");
|
||||
}
|
||||
|
||||
$this->ss->assign('viaAJAX', $this->viaAJAX);
|
||||
|
||||
$this->javascript = new javascript();
|
||||
$this->javascript->setFormName('accountsQuickCreate');
|
||||
|
||||
$focus = new Account();
|
||||
$this->javascript->setSugarBean($focus);
|
||||
$this->javascript->addAllFields('');
|
||||
|
||||
$this->ss->assign('additionalScripts', $this->javascript->getScript(false));
|
||||
}
|
||||
}
|
||||
?>
|
||||
9
modules/Accounts/AddGoogleContact.php
Normal file
9
modules/Accounts/AddGoogleContact.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
if (!$_REQUEST['record'] || $_REQUEST['record']=='') {
|
||||
echo '5'; return;
|
||||
}
|
||||
|
||||
$a = new Account();
|
||||
$a->retrieve($_REQUEST['record']);
|
||||
echo $a->AddGoogleContact();
|
||||
return;
|
||||
306
modules/Accounts/Addresses.js
Normal file
306
modules/Accounts/Addresses.js
Normal file
@@ -0,0 +1,306 @@
|
||||
//addresses
|
||||
function saveItems(){
|
||||
document.getElementById('position_list').value = ItemsList(true);
|
||||
}
|
||||
function doRequest(where,post,doFunction,error) {
|
||||
|
||||
this.Display = function(result) { doFunction(result.responseText); }
|
||||
|
||||
this.Fail = function(result){ if(error) alert(error);}
|
||||
|
||||
YAHOO.util.Connect.asyncRequest('POST',where,{success:this.Display,failure:this.Fail},post);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function changeValidateRequired(formname,name,required) {
|
||||
|
||||
for(var i=0; i<validate[formname].length; i++)
|
||||
|
||||
if(validate[formname][i][0] == name) { validate[formname][i][2] = required; break; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function addEvent(object,eventName,do_function) {
|
||||
if(typeof(object) == "string") object = document.getElementById(object);
|
||||
if(!object) { alert('No object in function addEvent!'); return; }
|
||||
if(object.addEventListener) {
|
||||
object.addEventListener(eventName, do_function, false);
|
||||
} else {
|
||||
object.attachEvent('on'+eventName, do_function);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var tbody_;
|
||||
var ItemListSave;
|
||||
var ItemListClear;
|
||||
var ItemListFil;
|
||||
var FillText;
|
||||
|
||||
addEvent(
|
||||
window,
|
||||
'load',
|
||||
function() {
|
||||
var paramsTable = new paramsMT('itemsTable');
|
||||
paramsTable.onCreateRow = function(row) {
|
||||
row.newPos = false;
|
||||
row.noAddNew = true;
|
||||
row.ondblclick = function() {}
|
||||
row.onSelect = function() {
|
||||
//for(var i=0; i<this.myTable.colCount(); i++)
|
||||
//this.cells.item(i).change(!this.newPos);
|
||||
//this.cells.item(0).change(true);
|
||||
}
|
||||
|
||||
row.onDeselect = function() {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
paramsTable.onCreateCell = function(cell) {
|
||||
|
||||
var i = cell.index;
|
||||
cell.change = function(select) {};
|
||||
if(i == 0) {
|
||||
cell.setData = function(data) {
|
||||
if(data.position) cell.firstChild.value = data.position;
|
||||
if (data.id)
|
||||
cell.getElementsByTagName('input')[1].value = data.id;
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.position = cell.firstChild.value;
|
||||
data.id = cell.getElementsByTagName('input')[1].value;
|
||||
}
|
||||
//cell.select = function() { this.selectNext(); }
|
||||
//cell.selectNext = function() { var row = this.parentNode.selectNext(); row.select(); row.cells.item(i).select(); };
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','text');
|
||||
edit.setAttribute('readonly','readonly');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','hidden');
|
||||
edit.setAttribute('readonly','readonly');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
}
|
||||
if(i == 1) {
|
||||
cell.setData = function(data) {
|
||||
if(data.name) {
|
||||
cell.firstChild.value = data.name;
|
||||
}
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.name = cell.firstChild.value;
|
||||
}
|
||||
|
||||
cell.onDeselect = function() {
|
||||
ERROR = false;
|
||||
var data = new Object();
|
||||
this.getData(data);
|
||||
if(!ERROR) {
|
||||
data.name = data.name;
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
||||
//cell.select = function() { this.selectNext(); }
|
||||
//cell.selectNext = function() { var row = this.parentNode.selectNext(); row.select(); row.cells.item(i).select(); };
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','text');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
}
|
||||
if(i == 2) {
|
||||
cell.setData = function(data) {
|
||||
if (data.street)
|
||||
cell.getElementsByTagName('input')[0].value = data.street;
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.street = cell.firstChild.value;
|
||||
}
|
||||
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','text');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
|
||||
}
|
||||
if(i == 3) {
|
||||
cell.setData = function(data) {
|
||||
if(data.city) cell.firstChild.value = data.city;
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.city = cell.firstChild.value;
|
||||
}
|
||||
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','text');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
}
|
||||
if(i == 4) {
|
||||
cell.setData = function(data) {
|
||||
if(data.postalcode) cell.firstChild.value = data.postalcode;
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.postalcode = cell.firstChild.value;
|
||||
}
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','text');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
}
|
||||
if(i == 5) {
|
||||
cell.setData = function(data) {
|
||||
if(data.country) cell.firstChild.value = data.country;
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.country = cell.firstChild.value;
|
||||
}
|
||||
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','text');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
}
|
||||
if(i == 6) {
|
||||
cell.setData = function(data) {
|
||||
if(data.phone) cell.firstChild.value = data.phone;
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.phone = cell.firstChild.value;
|
||||
}
|
||||
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','text');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
}
|
||||
if(i == 7) {
|
||||
cell.setData = function(data) {
|
||||
if(data.fax) cell.firstChild.value = data.fax;
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.fax = cell.firstChild.value;
|
||||
}
|
||||
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','text');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
}
|
||||
if(i == 8) {
|
||||
var img;
|
||||
|
||||
cell.style.padding="auto auto auto auto";
|
||||
//insert
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_INSERT_NEW_ROW']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/insertrow.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() {
|
||||
this.parentNode.myTable.addRow(this.parentNode.parentNode.index+1);
|
||||
refreshPositionIndex();
|
||||
};
|
||||
|
||||
//delete
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_DELETE_ROW']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/deleterow.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() { this.parentNode.parentNode.deleteRow(); refreshPositionIndex();};
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
|
||||
cell.appendChild(document.createElement('br'));
|
||||
//move up
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_MOVE_ROW_UP']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/moverowup.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() { this.parentNode.parentNode.moveUp(); refreshPositionIndex();};
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
//move down
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_MOVE_ROW_DOWN']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/moverowdown.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() { this.parentNode.parentNode.moveDown();refreshPositionIndex(); }
|
||||
cell.appendChild(img);
|
||||
}
|
||||
}
|
||||
|
||||
refreshPositionIndex = function() {
|
||||
for(var i=0; i<paramsTable.rowCount(); i++) {
|
||||
var data = paramsTable.row(i).getData();
|
||||
data.position = i+1;
|
||||
paramsTable.row(i).setData(data);
|
||||
}
|
||||
}
|
||||
ItemsList = function(json) {
|
||||
var data = '';
|
||||
for(var i=0; i<paramsTable.rowCount(); i++) {
|
||||
data = data + '||||' + JSON.stringifyNoSecurity(paramsTable.row(i).getData());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
if(paramsTable.rowCount() == 0) {paramsTable.addRow(); refreshPositionIndex();};
|
||||
paramsTable.onSetCellData = function(row,cell,data) {
|
||||
if(cell.innerHTML == '') cell.innerHTML = ' ';
|
||||
}
|
||||
|
||||
ItemListSave = function(json,el) {
|
||||
var data = new Object();
|
||||
var tmp;
|
||||
for(var i=0; i<paramsTable.rowCount(); i++) {
|
||||
data[i.toString()] = paramsTable.row(i).getData();
|
||||
}
|
||||
paramsOptions = data;
|
||||
var r = JSON.stringifyNoSecurity(paramsOptions);
|
||||
doRequest(
|
||||
'index.php',
|
||||
'module=Accounts&action=price_conditionSave&to_pdf=1¶mslist='+r+'&record='+document.forms.EditView.record.value,
|
||||
function(result) {
|
||||
if(result.indexOf("Saved") >= 0) alert("Zapisano!"); else alert("Błąd podczas zapisywania!");
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
ItemListClear = function(noNew,save) {
|
||||
if(typeof(save)=="string") ItemListSave(null,save);
|
||||
while(paramsTable.rowCount()>0) paramsTable.row(0).deleteRow(noNew);
|
||||
refreshPositionIndex();
|
||||
}
|
||||
|
||||
ItemListFill = function() {
|
||||
var pl;
|
||||
pl = document.getElementById('position_list').value;
|
||||
if(pl && pl != '') {
|
||||
try {
|
||||
pl = eval(pl);
|
||||
for(x in pl) { var pl_row = pl[x]; if (pl_row.template=='') continue; paramsTable.addRow().setData(pl_row); }
|
||||
} catch(err) { pl = null; };
|
||||
}
|
||||
refreshPositionIndex();
|
||||
}
|
||||
|
||||
ItemListClear();
|
||||
ItemListFill();
|
||||
}
|
||||
);
|
||||
191
modules/Accounts/Categories.js
Normal file
191
modules/Accounts/Categories.js
Normal file
@@ -0,0 +1,191 @@
|
||||
//categories
|
||||
function saveItems3(){
|
||||
document.getElementById('position_list3').value = ItemsList3(true);
|
||||
}
|
||||
function doRequest(where,post,doFunction,error) {
|
||||
this.Display = function(result) { doFunction(result.responseText); }
|
||||
this.Fail = function(result){ if(error) alert(error);}
|
||||
YAHOO.util.Connect.asyncRequest('POST',where,{success:this.Display,failure:this.Fail},post);
|
||||
}
|
||||
|
||||
|
||||
function addEvent(object,eventName,do_function) {
|
||||
if(typeof(object) == "string") object = document.getElementById(object);
|
||||
if(!object) { alert('No object in function addEvent!'); return; }
|
||||
if(object.addEventListener) {
|
||||
object.addEventListener(eventName, do_function, false);
|
||||
} else {
|
||||
object.attachEvent('on'+eventName, do_function);
|
||||
}
|
||||
}
|
||||
|
||||
var tbody_;
|
||||
var ItemListSave3;
|
||||
var ItemListClear3;
|
||||
var ItemListFil3;
|
||||
var FillText;
|
||||
|
||||
addEvent(
|
||||
window,
|
||||
'load',
|
||||
function() {
|
||||
var paramsTable3 = new paramsMT('itemsTable3');
|
||||
paramsTable3.onCreateRow = function(row) {
|
||||
row.newPos = false;
|
||||
row.noAddNew = true;
|
||||
row.ondblclick = function() {}
|
||||
row.onSelect = function() {
|
||||
}
|
||||
row.onDeselect = function() {
|
||||
}
|
||||
}
|
||||
|
||||
paramsTable3.onCreateCell = function(cell) {
|
||||
|
||||
var i = cell.index;
|
||||
if(i == 0) {
|
||||
|
||||
cell.setData = function(data) {
|
||||
console.log(data);
|
||||
if(data.ecmaccountcategory_name) {
|
||||
cell.firstChild.value = data.ecmaccountcategory_name;
|
||||
|
||||
cell.getElementsByTagName('input')[1].value = data.ecmaccountcategory_id;
|
||||
if (data.id)
|
||||
cell.getElementsByTagName('input')[2].value = data.id;
|
||||
}
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.ecmaccountcategory_name = cell.firstChild.value;
|
||||
data.ecmaccountcategory_id = cell.getElementsByTagName('input')[1].value;
|
||||
data.id = cell.getElementsByTagName('input')[2].value;
|
||||
}
|
||||
|
||||
cell.onSelect = function() {
|
||||
var cn = this.getElementsByTagName('input');
|
||||
cn[0].name = 'name_p';
|
||||
cn[0].id = 'name_p';
|
||||
|
||||
cn[1].name = 'id_p';
|
||||
cn[1].id = 'id_p';
|
||||
}
|
||||
cell.onDeselect = function() {
|
||||
ERROR = false;
|
||||
var data = new Object();
|
||||
this.getData(data);
|
||||
if(!ERROR) {
|
||||
this.setData(data);
|
||||
}
|
||||
|
||||
var cn = this.getElementsByTagName('input');
|
||||
cn[0].name = '';
|
||||
cn[0].id = '';
|
||||
|
||||
cn[1].name = '';
|
||||
cn[1].id = '';
|
||||
}
|
||||
//cell.select = function() { this.selectNext(); }
|
||||
//cell.selectNext = function() { var row = this.parentNode.selectNext(); row.select(); row.cells.item(i).select(); };
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','text');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','hidden');
|
||||
edit.setAttribute('readonly','readonly');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','hidden');
|
||||
edit.setAttribute('readonly','readonly');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
var img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_IMG_SEARCH']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/search.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() {
|
||||
var ecmpopup = open_popup( "EcmAccountCategories", 600, 400, "", true, false, {"call_back_function":"set_return","form_name":"EditView","field_to_name_array":{"id":"id_p","name":"name_p"}}, "single", true );
|
||||
setTimeout(function(){ecmpopup.focus();},200);
|
||||
}
|
||||
cell.appendChild(img);
|
||||
}
|
||||
if(i == 1) {
|
||||
var img;
|
||||
|
||||
cell.style.padding="auto auto auto auto";
|
||||
//insert
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_INSERT_NEW_ROW']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/insertrow.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() {
|
||||
this.parentNode.myTable.addRow(this.parentNode.parentNode.index+1);
|
||||
refreshPositionIndex();
|
||||
};
|
||||
|
||||
//delete
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_DELETE_ROW']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/deleterow.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() { this.parentNode.parentNode.deleteRow(); refreshPositionIndex();};
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
|
||||
cell.appendChild(document.createElement('br'));
|
||||
//move up
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_MOVE_ROW_UP']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/moverowup.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() { this.parentNode.parentNode.moveUp(); refreshPositionIndex();};
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
//move down
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_MOVE_ROW_DOWN']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/moverowdown.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() { this.parentNode.parentNode.moveDown();refreshPositionIndex(); }
|
||||
cell.appendChild(img);
|
||||
}
|
||||
}
|
||||
ItemsList3 = function(json) {
|
||||
var data = '';
|
||||
for(var i=0; i<paramsTable3.rowCount(); i++) {
|
||||
data = data + '||||' + JSON.stringifyNoSecurity(paramsTable3.row(i).getData());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
if(paramsTable3.rowCount() == 0) {paramsTable3.addRow();};
|
||||
paramsTable3.onSetCellData = function(row,cell,data) {
|
||||
if(cell.innerHTML == '') cell.innerHTML = ' ';
|
||||
}
|
||||
|
||||
ItemListFill3 = function() {
|
||||
var pl;
|
||||
pl = document.getElementById('position_list3').value;
|
||||
console.log(pl);
|
||||
if(pl && pl != '') {
|
||||
try {
|
||||
pl = eval(pl);
|
||||
for(x in pl) { var pl_row = pl[x]; if (pl_row.template=='') continue; paramsTable3.addRow().setData(pl_row); }
|
||||
} catch(err) { pl = null; };
|
||||
}
|
||||
}
|
||||
|
||||
ItemListClear3 = function(noNew,save) {
|
||||
if(typeof(save)=="string") ItemListSave(null,save);
|
||||
while(paramsTable3.rowCount()>0) paramsTable3.row(0).deleteRow(noNew);
|
||||
}
|
||||
|
||||
ItemListClear3();
|
||||
ItemListFill3();
|
||||
}
|
||||
);
|
||||
98
modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.data.php
Executable file
98
modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.data.php
Executable file
@@ -0,0 +1,98 @@
|
||||
<?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['MyAccountsDashlet']['searchFields'] = array('date_entered' => array('default' => ''),
|
||||
'account_type' => array('default' => ''),
|
||||
'industry' => array('default' => ''),
|
||||
'billing_address_country' => array('default'=>''),
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name,
|
||||
'label' => 'LBL_ASSIGNED_TO'));
|
||||
$dashletData['MyAccountsDashlet']['columns'] = array('name' => array('width' => '40',
|
||||
'label' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'link' => true,
|
||||
'default' => true),
|
||||
'website' => array('width' => '8',
|
||||
'label' => 'LBL_WEBSITE',
|
||||
'default' => true),
|
||||
'phone_office' => array('width' => '15',
|
||||
'label' => 'LBL_LIST_PHONE',
|
||||
'default' => true),
|
||||
'phone_fax' => array('width' => '8',
|
||||
'label' => 'LBL_PHONE_FAX'),
|
||||
'phone_alternate' => array('width' => '8',
|
||||
'label' => 'LBL_OTHER_PHONE'),
|
||||
'billing_address_city' => array('width' => '8',
|
||||
'label' => 'LBL_BILLING_ADDRESS_CITY'),
|
||||
'billing_address_street' => array('width' => '8',
|
||||
'label' => 'LBL_BILLING_ADDRESS_STREET'),
|
||||
'billing_address_state' => array('width' => '8',
|
||||
'label' => 'LBL_BILLING_ADDRESS_STATE'),
|
||||
'billing_address_postalcode' => array('width' => '8',
|
||||
'label' => 'LBL_BILLING_ADDRESS_POSTALCODE'),
|
||||
'billing_address_country' => array('width' => '8',
|
||||
'label' => 'LBL_BILLING_ADDRESS_COUNTRY',
|
||||
'default' => true),
|
||||
'shipping_address_city' => array('width' => '8',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_CITY'),
|
||||
'shipping_address_street' => array('width' => '8',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_STREET'),
|
||||
'shipping_address_state' => array('width' => '8',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_STATE'),
|
||||
'shipping_address_postalcode' => array('width' => '8',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_POSTALCODE'),
|
||||
'shipping_address_country' => array('width' => '8',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_COUNTRY'),
|
||||
'email1' => array('width' => '8',
|
||||
'label' => 'LBL_EMAIL_ADDRESS_PRIMARY'),
|
||||
'account_name' => array('width' => '15',
|
||||
'label' => 'LBL_MEMBER_OF',
|
||||
'sortable' => false),
|
||||
'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'),
|
||||
);
|
||||
?>
|
||||
47
modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.meta.php
Executable file
47
modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.meta.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".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['MyAccountsDashlet'] = array('module' => 'Accounts',
|
||||
'title' => translate('LBL_HOMEPAGE_TITLE', 'Accounts'),
|
||||
'description' => 'A customizable view into Accounts',
|
||||
'category' => 'Module Views',
|
||||
'hidden' => true);
|
||||
?>
|
||||
78
modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.php
Executable file
78
modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.php
Executable file
@@ -0,0 +1,78 @@
|
||||
<?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 MyAccountsDashlet extends DashletGeneric {
|
||||
function MyAccountsDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
require('modules/Accounts/Dashlets/MyAccountsDashlet/MyAccountsDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'Accounts');
|
||||
|
||||
$this->searchFields = $dashletData['MyAccountsDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['MyAccountsDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new Account();
|
||||
}
|
||||
|
||||
/**
|
||||
* Overrides the generic process to include custom logic for email addresses,
|
||||
* since they are no longer stored in a list view friendly manner.
|
||||
* (A record may have an undetermined number of email addresses).
|
||||
*
|
||||
* @param array $lvsParams
|
||||
*/
|
||||
|
||||
function process($lvsParams = array()) {
|
||||
if (isset($this->displayColumns) && array_search('email1', $this->displayColumns) !== false) {
|
||||
$lvsParams['custom_select'] = ', email_address as email1';
|
||||
$lvsParams['custom_from'] = "LEFT JOIN email_addr_bean_rel eabr ON eabr.deleted = 0 AND bean_module = 'Accounts' "
|
||||
. "AND eabr.bean_id = accounts.id AND primary_address = 1 "
|
||||
. "LEFT JOIN email_addresses ea ON ea.deleted = 0 AND ea.id = eabr.email_address_id";
|
||||
}
|
||||
parent::process($lvsParams);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
185
modules/Accounts/Discounts.js
Normal file
185
modules/Accounts/Discounts.js
Normal file
@@ -0,0 +1,185 @@
|
||||
//addresses
|
||||
function saveItems2(){
|
||||
document.getElementById('position_list2').value = ItemsList2(true);
|
||||
}
|
||||
function doRequest(where,post,doFunction,error) {
|
||||
this.Display = function(result) { doFunction(result.responseText); }
|
||||
this.Fail = function(result){ if(error) alert(error);}
|
||||
YAHOO.util.Connect.asyncRequest('POST',where,{success:this.Display,failure:this.Fail},post);
|
||||
}
|
||||
|
||||
|
||||
function addEvent(object,eventName,do_function) {
|
||||
if(typeof(object) == "string") object = document.getElementById(object);
|
||||
if(!object) { alert('No object in function addEvent!'); return; }
|
||||
if(object.addEventListener) {
|
||||
object.addEventListener(eventName, do_function, false);
|
||||
} else {
|
||||
object.attachEvent('on'+eventName, do_function);
|
||||
}
|
||||
}
|
||||
|
||||
var tbody_;
|
||||
var ItemListSave2;
|
||||
var ItemListClear2;
|
||||
var ItemListFil2;
|
||||
var FillText;
|
||||
|
||||
addEvent(
|
||||
window,
|
||||
'load',
|
||||
function() {
|
||||
var paramsTable2 = new paramsMT('itemsTable2');
|
||||
paramsTable2.onCreateRow = function(row) {
|
||||
row.newPos = false;
|
||||
row.noAddNew = true;
|
||||
row.ondblclick = function() {}
|
||||
row.onSelect = function() {
|
||||
}
|
||||
row.onDeselect = function() {
|
||||
}
|
||||
}
|
||||
|
||||
paramsTable2.onCreateCell = function(cell) {
|
||||
|
||||
var i = cell.index;
|
||||
cell.change = function(select) {};
|
||||
if(i == 0) {
|
||||
cell.setData = function(data) {
|
||||
if(data.product_group) {
|
||||
cell.firstChild.value = data.product_group;
|
||||
if (data.id)
|
||||
cell.getElementsByTagName('input')[1].value = data.id;
|
||||
}
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.product_group = cell.firstChild.value;
|
||||
data.id = cell.getElementsByTagName('input')[1].value;
|
||||
}
|
||||
|
||||
cell.onDeselect = function() {
|
||||
ERROR = false;
|
||||
var data = new Object();
|
||||
this.getData(data);
|
||||
if(!ERROR) {
|
||||
data.product_group = data.product_group;
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
||||
//cell.select = function() { this.selectNext(); }
|
||||
//cell.selectNext = function() { var row = this.parentNode.selectNext(); row.select(); row.cells.item(i).select(); };
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','text');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','hidden');
|
||||
edit.setAttribute('readonly','readonly');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
}
|
||||
if(i == 1) {
|
||||
cell.setData = function(data) {
|
||||
if (data.discount)
|
||||
cell.getElementsByTagName('input')[0].value = NumberToUserFormatNumber(data.discount);
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.discount = UserFormatNumberToNumber(cell.firstChild.value);
|
||||
}
|
||||
|
||||
cell.onDeselect = function() {
|
||||
ERROR = false;
|
||||
var data = new Object();
|
||||
this.getData(data);
|
||||
if(!ERROR) {
|
||||
data.discount = data.discount;
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
||||
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type','text');
|
||||
edit.setAttribute('tabIndex',1);
|
||||
edit.className = 'inputs';
|
||||
edit.value = NumberToUserFormatNumber(0);
|
||||
cell.appendChild(edit);
|
||||
|
||||
}
|
||||
if(i == 2) {
|
||||
var img;
|
||||
|
||||
cell.style.padding="auto auto auto auto";
|
||||
//insert
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_INSERT_NEW_ROW']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/insertrow.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() {
|
||||
this.parentNode.myTable.addRow(this.parentNode.parentNode.index+1);
|
||||
refreshPositionIndex();
|
||||
};
|
||||
|
||||
//delete
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_DELETE_ROW']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/deleterow.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() { this.parentNode.parentNode.deleteRow(); refreshPositionIndex();};
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
|
||||
cell.appendChild(document.createElement('br'));
|
||||
//move up
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_MOVE_ROW_UP']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/moverowup.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() { this.parentNode.parentNode.moveUp(); refreshPositionIndex();};
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
//move down
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt',MOD['LBL_MOVE_ROW_DOWN']);
|
||||
img.setAttribute('src','modules/EcmQuotes/images/moverowdown.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() { this.parentNode.parentNode.moveDown();refreshPositionIndex(); }
|
||||
cell.appendChild(img);
|
||||
}
|
||||
}
|
||||
ItemsList2 = function(json) {
|
||||
var data = '';
|
||||
for(var i=0; i<paramsTable2.rowCount(); i++) {
|
||||
data = data + '||||' + JSON.stringifyNoSecurity(paramsTable2.row(i).getData());
|
||||
}
|
||||
return data;
|
||||
}
|
||||
if(paramsTable2.rowCount() == 0) {paramsTable2.addRow();};
|
||||
paramsTable2.onSetCellData = function(row,cell,data) {
|
||||
if(cell.innerHTML == '') cell.innerHTML = ' ';
|
||||
}
|
||||
|
||||
ItemListFill2 = function() {
|
||||
var pl;
|
||||
pl = document.getElementById('position_list2').value;
|
||||
console.log(pl);
|
||||
if(pl && pl != '') {
|
||||
try {
|
||||
pl = eval(pl);
|
||||
for(x in pl) { var pl_row = pl[x]; if (pl_row.template=='') continue; paramsTable2.addRow().setData(pl_row); }
|
||||
} catch(err) { pl = null; };
|
||||
}
|
||||
}
|
||||
|
||||
ItemListClear2 = function(noNew,save) {
|
||||
if(typeof(save)=="string") ItemListSave(null,save);
|
||||
while(paramsTable2.rowCount()>0) paramsTable2.row(0).deleteRow(noNew);
|
||||
}
|
||||
|
||||
ItemListClear2();
|
||||
ItemListFill2();
|
||||
}
|
||||
);
|
||||
57
modules/Accounts/EditView.php
Normal file
57
modules/Accounts/EditView.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
$pl = $this->bean->getPositionList();
|
||||
$this->ss->assign('POSITION_LIST', $pl);
|
||||
|
||||
$pl2 = $this->bean->getPositionList2();
|
||||
$this->ss->assign('POSITION_LIST2', $pl2);
|
||||
|
||||
$pl3 = $this->bean->getPositionList3();
|
||||
$this->ss->assign('POSITION_LIST3', $pl3);
|
||||
|
||||
$pl55 = $this->bean->getPositionList55();
|
||||
|
||||
$this->ss->assign('POSITION_LIST55', $pl55);
|
||||
|
||||
global $mod_strings;
|
||||
$json = getJSONobj();
|
||||
|
||||
//opt
|
||||
$file = 'modules/EcmGroupSales/EcmGroupSale.php';
|
||||
if(file_exists($file)) {
|
||||
$cc = array();
|
||||
require_once($file);
|
||||
$cc = EcmGroupSale::loadSettings();
|
||||
}
|
||||
|
||||
$OPT = array();
|
||||
$OPT['row_item_height'] = $cc['row_item_height'];
|
||||
$OPT['row_item_height_selected'] = $cc['row_item_height_selected'];
|
||||
$OPT['rows_on_item_list'] = $cc['rows_on_item_list'];
|
||||
$OPT['position_table_height'] = $OPT['row_item_height']*$OPT['rows_on_item_list']+40+$OPT['rows_on_item_list']*4;
|
||||
$OPT['quick_product_item_adding'] = $cc['quick_product_item_adding'];
|
||||
|
||||
global $current_user;
|
||||
|
||||
$tmp = $current_user->getPreference('num_grp_sep');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_number_grouping_seperator'];
|
||||
$OPT['sep_1000'] = $tmp;
|
||||
|
||||
$tmp = $current_user->getPreference('dec_sep');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_decimal_seperator'];
|
||||
$OPT['dec_sep'] = $tmp;
|
||||
|
||||
$tmp = $current_user->getPreference('default_currency_significant_digits');
|
||||
if(!isset($tmp) || $tmp == '' || $tmp == NULL) $tmp = $sugar_config['default_currency_significant_digits'];
|
||||
$OPT['dec_len'] = $tmp;
|
||||
|
||||
echo '
|
||||
<script language="javascript">
|
||||
var OPT = '.str_replace('"','\"',$json->encode($OPT)).';
|
||||
var MOD = '.str_replace('"','\"',$json->encode($mod_strings)).';
|
||||
|
||||
</script>';
|
||||
|
||||
global $app_strings;
|
||||
$this->ss->assign('LBL_SAVE', $app_strings['LBL_SAVE_BUTTON_LABEL']);
|
||||
|
||||
322
modules/Accounts/MailingGroups.js
Normal file
322
modules/Accounts/MailingGroups.js
Normal file
@@ -0,0 +1,322 @@
|
||||
//addresses
|
||||
function saveItems55() {
|
||||
document.getElementById('position_list55').value = ItemsList55(true);
|
||||
}
|
||||
function doRequest(where, post, doFunction, error) {
|
||||
this.Display = function(result) {
|
||||
doFunction(result.responseText);
|
||||
}
|
||||
this.Fail = function(result) {
|
||||
if (error)
|
||||
alert(error);
|
||||
}
|
||||
YAHOO.util.Connect.asyncRequest('POST', where, {
|
||||
success : this.Display,
|
||||
failure : this.Fail
|
||||
}, post);
|
||||
}
|
||||
|
||||
function addEvent(object, eventName, do_function) {
|
||||
if (typeof (object) == "string")
|
||||
object = document.getElementById(object);
|
||||
if (!object) {
|
||||
alert('No object in function addEvent!');
|
||||
return;
|
||||
}
|
||||
if (object.addEventListener) {
|
||||
object.addEventListener(eventName, do_function, false);
|
||||
} else {
|
||||
object.attachEvent('on' + eventName, do_function);
|
||||
}
|
||||
}
|
||||
|
||||
var tbody_;
|
||||
var ItemListSave2;
|
||||
var ItemListClear2;
|
||||
var ItemListFil2;
|
||||
var FillText;
|
||||
|
||||
addEvent(
|
||||
window,
|
||||
'load',
|
||||
function() {
|
||||
var paramsTable2 = new paramsMT('itemsTable55');
|
||||
paramsTable2.onCreateRow = function(row) {
|
||||
row.newPos = false;
|
||||
row.noAddNew = true;
|
||||
row.ondblclick = function() {
|
||||
}
|
||||
row.onSelect = function() {
|
||||
}
|
||||
row.onDeselect = function() {
|
||||
}
|
||||
}
|
||||
|
||||
paramsTable2.onCreateCell = function(cell) {
|
||||
|
||||
var i = cell.index;
|
||||
cell.change = function(select) {
|
||||
};
|
||||
if (i == 0) {
|
||||
cell.setData = function(data) {
|
||||
console.log(data);
|
||||
if(data.product_group) {
|
||||
cell.firstChild.value = data.product_group;
|
||||
|
||||
cell.getElementsByTagName('input')[1].value = data.cat_id;
|
||||
if (data.id)
|
||||
cell.getElementsByTagName('input')[2].value = data.id;
|
||||
}
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
data.product_group = cell.firstChild.value;
|
||||
data.cat_id = cell.getElementsByTagName('input')[1].value;
|
||||
data.id = cell.getElementsByTagName('input')[2].value;
|
||||
}
|
||||
|
||||
cell.onDeselect = function() {
|
||||
ERROR = false;
|
||||
var data = new Object();
|
||||
this.getData(data);
|
||||
if (!ERROR) {
|
||||
this.setData(data);
|
||||
}
|
||||
|
||||
var cn = this.getElementsByTagName('input');
|
||||
cn[0].name = '';
|
||||
cn[0].id = '';
|
||||
|
||||
cn[1].name = '';
|
||||
cn[1].id = '';
|
||||
}
|
||||
cell.onSelect = function() {
|
||||
var cn = this.getElementsByTagName('input');
|
||||
cn[0].name = 'name_mailinggroup';
|
||||
cn[0].id = 'name_mailinggroup';
|
||||
|
||||
cn[1].name = 'id_mailinggroup';
|
||||
cn[1].id = 'id_mailinggroup';
|
||||
}
|
||||
// cell.select = function() { this.selectNext(); }
|
||||
// cell.selectNext = function() { var row =
|
||||
// this.parentNode.selectNext(); row.select();
|
||||
// row.cells.item(i).select(); };
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type', 'text');
|
||||
edit.setAttribute('tabIndex', 1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type', 'hidden');
|
||||
edit.setAttribute('readonly', 'readonly');
|
||||
edit.setAttribute('tabIndex', 1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type', 'hidden');
|
||||
edit.setAttribute('readonly', 'readonly');
|
||||
edit.setAttribute('tabIndex', 1);
|
||||
edit.className = 'inputs';
|
||||
cell.appendChild(edit);
|
||||
var img = document.createElement('img');
|
||||
img.setAttribute('alt', 'Search');
|
||||
img.setAttribute('src',
|
||||
'modules/EcmQuotes/images/search.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
if(module_sugar_grp1=='Accounts'){
|
||||
var formType='Accounts';
|
||||
}
|
||||
if(module_sugar_grp1=='Leads'){
|
||||
var formType='Accounts';
|
||||
}
|
||||
if(module_sugar_grp1=='Contacts'){
|
||||
var formType='Contacts';
|
||||
}
|
||||
if(module_sugar_grp1=='ContactLeads'){
|
||||
var formType='Contacts';
|
||||
}
|
||||
|
||||
img.onclick = function() {
|
||||
var ecmpopup = open_popup("EcmMailingCategories", 600,
|
||||
400, "&type_advanced="+formType, true, false, {
|
||||
"call_back_function" : "set_return",
|
||||
"form_name" : "EditView",
|
||||
"field_to_name_array" : {
|
||||
"id" : "id_mailinggroup",
|
||||
"name" : "name_mailinggroup"
|
||||
}
|
||||
}, "single", true);
|
||||
setTimeout(function() {
|
||||
ecmpopup.focus();
|
||||
}, 200);
|
||||
}
|
||||
cell.appendChild(img);
|
||||
}
|
||||
if (i == 1) {
|
||||
cell.setData = function(data) {
|
||||
if (data.discount!=1){
|
||||
|
||||
cell.getElementsByTagName('input')[0].checked = false;
|
||||
}
|
||||
|
||||
};
|
||||
cell.getData = function(data) {
|
||||
|
||||
data.discount = UserFormatNumberToNumber(cell.firstChild.value);
|
||||
}
|
||||
|
||||
cell.onDeselect = function() {
|
||||
|
||||
ERROR = false;
|
||||
var data = new Object();
|
||||
this.getData(data);
|
||||
if (!ERROR) {
|
||||
data.discount = data.discount;
|
||||
this.setData(data);
|
||||
}
|
||||
}
|
||||
|
||||
var edit = document.createElement('input');
|
||||
edit.setAttribute('type', 'checkbox');
|
||||
edit.setAttribute('tabIndex', 1);
|
||||
edit.className = 'inputs';
|
||||
edit.checked = true;
|
||||
edit.value = 1;
|
||||
cell.appendChild(edit);
|
||||
|
||||
}
|
||||
if (i == 2) {
|
||||
var img;
|
||||
|
||||
cell.style.padding = "auto auto auto auto";
|
||||
// insert
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt','ADD');
|
||||
img.setAttribute('src',
|
||||
'modules/EcmQuotes/images/insertrow.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() {
|
||||
this.parentNode.myTable
|
||||
.addRow(this.parentNode.parentNode.index + 1);
|
||||
refreshPositionIndex();
|
||||
};
|
||||
|
||||
// delete
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt', 'DELETE');
|
||||
img.setAttribute('src',
|
||||
'modules/EcmQuotes/images/deleterow.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() {
|
||||
this.parentNode.parentNode.deleteRow();
|
||||
refreshPositionIndex();
|
||||
};
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
|
||||
cell.appendChild(document.createElement('br'));
|
||||
// move up
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt','UP');
|
||||
img.setAttribute('src',
|
||||
'modules/EcmQuotes/images/moverowup.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() {
|
||||
this.parentNode.parentNode.moveUp();
|
||||
refreshPositionIndex();
|
||||
};
|
||||
cell.appendChild(img);
|
||||
cell.appendChild(document.createTextNode(" "));
|
||||
// move down
|
||||
img = document.createElement('img');
|
||||
img.setAttribute('alt', 'DOWN');
|
||||
img.setAttribute('src',
|
||||
'modules/EcmQuotes/images/moverowdown.gif');
|
||||
img.style.cursor = 'pointer';
|
||||
img.onclick = function() {
|
||||
this.parentNode.parentNode.moveDown();
|
||||
refreshPositionIndex();
|
||||
}
|
||||
cell.appendChild(img);
|
||||
}
|
||||
}
|
||||
ItemsList55 = function(json) {
|
||||
var data = '';
|
||||
for (var i = 0; i < paramsTable2.rowCount(); i++) {
|
||||
var a=0;
|
||||
var data2=new Object();
|
||||
$(paramsTable2.row(i)).find("td input").each(function() {
|
||||
if(a==3){
|
||||
if($(this).prop("checked")==true){
|
||||
data2.discount=1;
|
||||
} else {
|
||||
data2.discount=0;
|
||||
}
|
||||
}
|
||||
if(a==0){
|
||||
|
||||
data2.product_group=$(this).val();
|
||||
|
||||
}
|
||||
if(a==1){
|
||||
|
||||
data2.cat_id=$(this).val();
|
||||
|
||||
}
|
||||
if(a==2){
|
||||
|
||||
data2.id=$(this).val();
|
||||
|
||||
}
|
||||
|
||||
a++;
|
||||
});
|
||||
data = data
|
||||
+ '||||'
|
||||
+ JSON.stringifyNoSecurity(data2);
|
||||
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
if (paramsTable2.rowCount() == 0) {
|
||||
paramsTable2.addRow();
|
||||
}
|
||||
;
|
||||
paramsTable2.onSetCellData = function(row, cell, data) {
|
||||
if (cell.innerHTML == '')
|
||||
cell.innerHTML = ' ';
|
||||
}
|
||||
|
||||
ItemListFill2 = function() {
|
||||
var pl;
|
||||
pl = document.getElementById('position_list55').value;
|
||||
console.log(pl);
|
||||
if (pl && pl != '') {
|
||||
try {
|
||||
pl = eval(pl);
|
||||
for (x in pl) {
|
||||
var pl_row = pl[x];
|
||||
if (pl_row.template == '')
|
||||
continue;
|
||||
paramsTable2.addRow().setData(pl_row);
|
||||
}
|
||||
} catch (err) {
|
||||
pl = null;
|
||||
}
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
ItemListClear2 = function(noNew, save) {
|
||||
if (typeof (save) == "string")
|
||||
ItemListSave(null, save);
|
||||
while (paramsTable2.rowCount() > 0)
|
||||
paramsTable2.row(0).deleteRow(noNew);
|
||||
}
|
||||
|
||||
ItemListClear2();
|
||||
ItemListFill2();
|
||||
});
|
||||
53
modules/Accounts/Menu.php
Executable file
53
modules/Accounts/Menu.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?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;
|
||||
|
||||
|
||||
if(ACLController::checkAccess('Accounts', 'edit', true))$module_menu[]=Array("index.php?module=Accounts&action=EditView&return_module=Accounts&return_action=index", $mod_strings['LNK_NEW_ACCOUNT'],"CreateAccounts", 'Accounts');
|
||||
|
||||
if(ACLController::checkAccess('Accounts', 'list', true))$module_menu[]=Array("index.php?module=Accounts&action=index&return_module=Accounts&return_action=DetailView", $mod_strings['LNK_ACCOUNT_LIST'],"Accounts", 'Accounts');
|
||||
if(ACLController::checkAccess('Accounts', 'import', true))$module_menu[]=Array("index.php?module=Import&action=Step1&import_module=Accounts&return_module=Accounts&return_action=index", $mod_strings['LNK_IMPORT_ACCOUNTS'],"Import", 'Accounts');
|
||||
if(ACLController::checkAccess('Accounts', 'import', true))$module_menu[]=Array("index.php?module=Accounts&action=voip_test", "VOIP STATUS","VOIP STATUS", 'Accounts');
|
||||
?>
|
||||
135
modules/Accounts/MoveAccount.php
Normal file
135
modules/Accounts/MoveAccount.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
ini_set('display_errors',1);
|
||||
$db=$GLOBALS['db'];
|
||||
function escape($value) {
|
||||
$return = '';
|
||||
for($i = 0; $i < strlen($value); ++$i) {
|
||||
$char = $value[$i];
|
||||
$ord = ord($char);
|
||||
if($char !== "'" && $char !== "\"" && $char !== '\\' && $ord >= 32 && $ord <= 126)
|
||||
$return .= $char;
|
||||
else
|
||||
$return .= '\\x' . dechex($ord);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
if($_GET['record']!=''){
|
||||
// id nie jest puste? jedziemy i szukamy accountsa ...
|
||||
$r=$db->query("select contact_id,id,date_modified,deleted from accounts_contacts where account_id='".$_GET['record']."'");
|
||||
|
||||
if($r->num_rows>0){
|
||||
// o jest kontakt!
|
||||
while($row=$db->fetchByAssoc($r)){
|
||||
// wybieranie ścierwa
|
||||
$ct=$db->query("select * from contacts where id='".$row['contact_id']."'");
|
||||
|
||||
while($row2=$db->fetchByAssoc($ct)){
|
||||
|
||||
// przenoszenie ścierwa ...
|
||||
$db->query("delete from contactleads where id='".$row2['id']."'");
|
||||
$db->query("INSERT INTO `contactleads` VALUES('".implode("','",array_map('escape', $row2))."')");
|
||||
|
||||
// echo "INSERT INTO `contacts` VALUES('".implode("','",$row2)."')";
|
||||
// usuwanie starego ścierwa ...
|
||||
$db->query("delete from contacts where id='".$row2['id']."'");
|
||||
// szukanie emaili...
|
||||
$mail=$db->query("select * from email_addr_bean_rel where bean_id='".$row2['id']."'");
|
||||
if($mail->num_rows>0){
|
||||
// o jest email!
|
||||
while($mu=$db->fetchByAssoc($mail)){
|
||||
// podmianka relacji na kontakt
|
||||
$db->query("update email_addr_bean_rel set bean_module='contacts' where id='".$mu['id']."'");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// die();
|
||||
// asasa$$$
|
||||
$l=$db->query("select * from accounts where id='".$_GET['record']."'");
|
||||
$pola=array();
|
||||
$wartosci=array();
|
||||
while($daj=$db->fetchByAssoc($l)){
|
||||
|
||||
|
||||
foreach ($daj as $pole=>$wartosc){
|
||||
if($pole=='account_type')$pole='lead_type';
|
||||
if($pole=='ecmprice_id')continue;
|
||||
if($pole=='website_update')continue;
|
||||
if($pole=='document_recipient_code')continue;
|
||||
if($pole=='document_parent_order_no')continue;
|
||||
if($pole=='document_delivery_address')continue;
|
||||
if($pole=='invoice_to_ownership')continue;
|
||||
if($pole=='document_parent_iln')continue;
|
||||
if($pole=='document_parent_nip')continue;
|
||||
if($pole=='document_shipping_iln')continue;
|
||||
if($pole=='document_shipping_nip')continue;
|
||||
if($pole=='document_bank_account')continue;
|
||||
if($pole=='document_parent_code')continue;
|
||||
if($pole=='document_ean')continue;
|
||||
$pola[]=$pole;
|
||||
$wartosci[]=$wartosc;
|
||||
}
|
||||
$r=$db->query("select * from leads where id='".$_GET['record']."'");
|
||||
if($r->num_rows==1)$db->query("delete from leads where id='".$_GET['record']."'");
|
||||
$db->query("INSERT INTO `leads` (".implode(",",$pola).") VALUES ('".implode("','",$wartosci)."')");
|
||||
|
||||
$db->query("update accounts set deleted='1' where id='".$daj['id']."'");
|
||||
|
||||
}
|
||||
// notatki
|
||||
$n1=$db->query("select * from notes where parent_id='".$_GET['record']."'");
|
||||
|
||||
if($n1->num_rows>0){
|
||||
|
||||
while($nt=$db->fetchByAssoc($n1)){
|
||||
$db->query("update notes set parent_type='Accounts' where id='".$nt['id']."'");
|
||||
}
|
||||
}
|
||||
// przenoszenie emaila
|
||||
$mail=$db->query("select * from email_addr_bean_rel where bean_id='".$_GET['record']."'");
|
||||
if($mail->num_rows>0){
|
||||
// o jest email!
|
||||
while($mu=$db->fetchByAssoc($mail)){
|
||||
// podmianka relacji na kontrahenta
|
||||
$db->query("update email_addr_bean_rel set bean_module='Accounts' where bean_id='".$_GET['record']."'");
|
||||
}
|
||||
}
|
||||
$mail=$db->query("select * from ecmaccountcategories_bean where bean_id='".$_GET['record']."'");
|
||||
if($mail->num_rows>0){
|
||||
// o jest email!
|
||||
while($mu=$db->fetchByAssoc($mail)){
|
||||
// podmianka relacji na kontrahenta
|
||||
$db->query("update ecmaccountcategories_bean set bean_name='Accounts' where bean_id='".$_GET['record']."'");
|
||||
}
|
||||
}
|
||||
// relacja kontrahent kontakt
|
||||
$rr=$db->query("SELECT * FROM accounts_contacts where account_id='".$_GET['record']."'");
|
||||
if($rr->num_rows>0){
|
||||
// o jest email!
|
||||
while($re=$db->fetchByAssoc($rr)){
|
||||
$re['deleted']='0';
|
||||
|
||||
$db->query("delete from leads_contactleads where lead_id='".$re['id']."'");
|
||||
$db->query("INSERT INTO `leads_contactleads` VALUES('".implode("','",$re)."')");
|
||||
$db->query("delete from accounts_contacts where account_id='".$_GET['record']."'");
|
||||
}
|
||||
}
|
||||
|
||||
// relacja adresy
|
||||
$ad=$db->query("SELECT * FROM account_addresses where account_id='".$_GET['record']."'");
|
||||
if($ad->num_rows>0){
|
||||
// o jest email!
|
||||
while($re=$db->fetchByAssoc($ad)){
|
||||
// podmianka relacji na kontrahenta
|
||||
$db->query("delete from lead_addresses where lead_id='".$re['id']."'");
|
||||
$db->query("INSERT INTO `lead_addresses` VALUES('".implode("','",$re)."')");
|
||||
|
||||
$db->query("delete from account_addresses where account_id='".$_GET['record']."'");
|
||||
}
|
||||
}
|
||||
// szukanie kontaktów
|
||||
|
||||
header("Location: index.php?module=Leads&action=DetailView&record=".$_GET['record']);
|
||||
}
|
||||
?>
|
||||
2308
modules/Accounts/MyTable.js
Normal file
2308
modules/Accounts/MyTable.js
Normal file
File diff suppressed because it is too large
Load Diff
139
modules/Accounts/Popup_picker.html
Executable file
139
modules/Accounts/Popup_picker.html
Executable file
@@ -0,0 +1,139 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* 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".
|
||||
********************************************************************************/
|
||||
-->
|
||||
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: SearchHeader -->
|
||||
<script type="text/javascript" src="include/JSON.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/popup_helper.js?s={SUGAR_VERSION}&c={JS_CUSTOM_VERSION}"></script>
|
||||
|
||||
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="edit view">
|
||||
<tr>
|
||||
<td>
|
||||
<form action="index.php" method="post" name="popup_query_form" id="popup_query_form">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td scope="row" nowrap="nowrap">{MOD.LBL_ACCOUNT_NAME}</td>
|
||||
<td nowrap="nowrap"><input type="text" size="20" name="name" value="{NAME}" /></td>
|
||||
<td scope="row" nowrap="nowrap">{MOD.LBL_CITY}</td>
|
||||
<td nowrap="nowrap"><input type="text" size="20" name="billing_address_city" value="{BILLING_ADDRESS_CITY}" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row" nowrap="nowrap">{MOD.LBL_PHONE_OFFICE}</td>
|
||||
<td nowrap="nowrap"><input type="text" size="20" name="phone_office" value="{PHONE_OFFICE}" /></td>
|
||||
<td>
|
||||
</td>
|
||||
<td width="20%" align="right">
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="action" value="Popup" />
|
||||
<input type="hidden" name="query" value="true" />
|
||||
<input type="hidden" name="func_name" value="" />
|
||||
<input type="hidden" name="request_data" value="{request_data}" />
|
||||
<input type="hidden" name="populate_parent" value="false" />
|
||||
<input type="hidden" name="hide_clear_button" value="true" />
|
||||
<input type="hidden" name="record_id" value="" />
|
||||
<input type="submit" name="button" class="button"
|
||||
title="{APP.LBL_SEARCH_BUTTON_TITLE}"
|
||||
accessKey="{APP.LBL_SEARCH_BUTTON_KEY}"
|
||||
value="{APP.LBL_SEARCH_BUTTON_LABEL}" />
|
||||
<input type="hidden" name="mode" value="{MULTI_SELECT}" />
|
||||
<input type="hidden" name="create" value="{CREATE}">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
/* initialize the popup request from the parent */
|
||||
|
||||
if(window.document.forms['popup_query_form'].request_data.value == "")
|
||||
{
|
||||
window.document.forms['popup_query_form'].request_data.value
|
||||
= JSON.stringify(window.opener.get_popup_request_data());
|
||||
}
|
||||
-->
|
||||
</script>
|
||||
|
||||
<p>
|
||||
<div id='addformlink'>{CREATEBUTTON}</div>
|
||||
<div id='addform' style='display:none;position:relative;z-index:2;left:0px;top:0px;'>
|
||||
<form name="AccountSave" onsubmit="return check_form('AccountSave');" method="post" action="index.php">
|
||||
{ADDFORMHEADER}
|
||||
<table cellpadding="0" cellspacing="0" border="0" width="100%" class="edit view">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr><td>
|
||||
<input type="hidden" name="module" value="{MODULE_NAME}" />
|
||||
<input type="hidden" name="action" value="Popup" />
|
||||
<input type="hidden" name="doAction" value="save" />
|
||||
<input type="hidden" name="query" value="true" />
|
||||
{ADDFORM}
|
||||
</td></tr>
|
||||
</table></td></tr></table>
|
||||
</form>
|
||||
</div>
|
||||
</p>
|
||||
|
||||
<!-- END: SearchHeader -->
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="list view">
|
||||
<!-- BEGIN: list_nav_row -->
|
||||
{PAGINATION}
|
||||
<!-- END: list_nav_row -->
|
||||
<tr height="20">
|
||||
<th scope="col" nowrap="nowrap">{CHECKALL}</th>
|
||||
<th scope="col" width="45%"><a href="{ORDER_BY}name">{MOD.LBL_LIST_ACCOUNT_NAME}{arrow_start}{name_arrow}{arrow_end}</a></th>
|
||||
<th scope="col" width="35%"><a href="{ORDER_BY}BILLING_ADDRESS_CITY">{MOD.LBL_LIST_CITY}{arrow_start}{BILLING_ADDRESS_CITY_arrow}{arrow_end}</a></th>
|
||||
<th scope="col" width="30%"><a href="{ORDER_BY}PHONE_OFFICE">{MOD.LBL_PHONE_OFFICE}{arrow_start}{PHONE_OFFICE_arrow}{arrow_end}</a></th>
|
||||
</tr>
|
||||
<!-- BEGIN: row -->
|
||||
<tr height="20" class="{ROW_COLOR}S1">
|
||||
<td valign='top'>{PREROW}</td>
|
||||
<td scope='row' valign="top"><{TAG_TYPE} href="#" onclick="send_back('Accounts','{ACCOUNT.ID}');" >{ACCOUNT.NAME}</{TAG_TYPE}></td>
|
||||
<td valign="top">{ACCOUNT.CITY}</td>
|
||||
<td valign="top">{ACCOUNT.PHONE_OFFICE}</td>
|
||||
</tr>
|
||||
|
||||
<!-- END: row -->
|
||||
{PAGINATION}
|
||||
</table>
|
||||
{ASSOCIATED_JAVASCRIPT_DATA}
|
||||
<!-- END: main -->
|
||||
94
modules/Accounts/Save.php
Normal file
94
modules/Accounts/Save.php
Normal file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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: Saves an Account record and then redirects the browser to the
|
||||
* defined return URL.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$json = getJSONobj();
|
||||
$pll = array();
|
||||
$exp=explode("||||",$_POST['position_list']);
|
||||
foreach($exp as $ep){
|
||||
if($ep){
|
||||
$pll[] = $json->decode(htmlspecialchars_decode($ep));
|
||||
}
|
||||
}
|
||||
$_POST['position_list'] = $pll;
|
||||
|
||||
$pll = array();
|
||||
$exp=explode("||||",$_POST['position_list2']);
|
||||
foreach($exp as $ep){
|
||||
if($ep){
|
||||
$pll[] = $json->decode(htmlspecialchars_decode($ep));
|
||||
}
|
||||
}
|
||||
$_POST['position_list2'] = $pll;
|
||||
|
||||
//categories
|
||||
$pll = array();
|
||||
$exp=explode("||||",$_POST['position_list3']);
|
||||
foreach($exp as $ep){
|
||||
if($ep){
|
||||
$pll[] = $json->decode(htmlspecialchars_decode($ep));
|
||||
}
|
||||
}
|
||||
$_POST['position_list3'] = $pll;
|
||||
|
||||
global $current_user;
|
||||
|
||||
|
||||
//categories
|
||||
$pll = array();
|
||||
$exp=explode("||||",$_POST['position_list55']);
|
||||
foreach($exp as $ep){
|
||||
if($ep){
|
||||
$pll[] = $json->decode(htmlspecialchars_decode($ep));
|
||||
}
|
||||
}
|
||||
$_POST['position_list55'] = $pll;
|
||||
|
||||
|
||||
require_once('modules/Accounts/AccountFormBase.php');
|
||||
$accountForm = new AccountFormBase();
|
||||
$prefix = empty($_REQUEST['dup_checked']) ? '' : 'Accounts';
|
||||
$accountForm->handleSave($prefix, true, false);
|
||||
|
||||
?>
|
||||
72
modules/Accounts/ShowDuplicates.html
Executable file
72
modules/Accounts/ShowDuplicates.html
Executable file
@@ -0,0 +1,72 @@
|
||||
<!--
|
||||
/*********************************************************************************
|
||||
* 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/Contacts/EditView.html,v 1.22 2004/07/16 04:04:42 sugarclint Exp {APP.LBL_CURRENCY_SYM}
|
||||
********************************************************************************/
|
||||
-->
|
||||
<!-- BEGIN: main -->
|
||||
<!-- BEGIN: error -->
|
||||
<span class="color">{ERROR}</span>
|
||||
<!-- END: error -->
|
||||
|
||||
<form action='index.php' method='post' name='Save'>
|
||||
<input type="hidden" name="module" value="Accounts">
|
||||
<input type="hidden" name="return_module" value="{RETURN_MODULE}">
|
||||
<input type="hidden" name="return_action" value="{RETURN_ACTION}">
|
||||
<input type="hidden" name="return_id" value="{RETURN_ID}">
|
||||
<input type="hidden" name="dup_checked" value="true">
|
||||
<input type="hidden" name="action" value="">
|
||||
{INPUT_FIELDS}
|
||||
<p>
|
||||
<table class='{TABLECLASS}' cellpadding="0" cellspacing="0" width="100%" border="0" >
|
||||
<tr><td>
|
||||
<table cellpadding="0" cellspacing="0" width="100%" border="0">
|
||||
<tr>
|
||||
<td valign='top' align='left' border='0' class="{CLASS}">
|
||||
<h4 class="{CLASS}">{FORMHEADER}</h4>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign='top' align='left'>
|
||||
{FORMBODY}{FORMFOOTER}{POSTFORM}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
</p>
|
||||
|
||||
<!-- END: main -->
|
||||
147
modules/Accounts/ShowDuplicates.php
Executable file
147
modules/Accounts/ShowDuplicates.php
Executable file
@@ -0,0 +1,147 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
|
||||
// retrieve $_POST values out of the $_SESSION variable - placed in there by AccountFormBase to avoid the length limitations on URLs implicit with GETS
|
||||
//$GLOBALS['log']->debug('ShowDuplicates.php: _POST = '.print_r($_SESSION['SHOW_DUPLICATES'],true));
|
||||
parse_str($_SESSION['SHOW_DUPLICATES'],$_POST);
|
||||
unset($_SESSION['SHOW_DUPLICATES']);
|
||||
//$GLOBALS['log']->debug('ShowDuplicates.php: _POST = '.print_r($_POST,true));
|
||||
|
||||
global $app_strings;
|
||||
global $app_list_strings;
|
||||
|
||||
$error_msg = '';
|
||||
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'Accounts');
|
||||
echo get_module_title($mod_strings['LBL_MODULE_NAME'], $mod_strings['LBL_MODULE_NAME'].": ".$mod_strings['LBL_SAVE_ACCOUNT'], true);
|
||||
$xtpl=new XTemplate ('modules/Accounts/ShowDuplicates.html');
|
||||
$xtpl->assign("MOD", $mod_strings);
|
||||
$xtpl->assign("APP", $app_strings);
|
||||
$xtpl->assign("PRINT_URL", "index.php?".$GLOBALS['request_string']);
|
||||
$xtpl->assign("MODULE", $_REQUEST['module']);
|
||||
if ($error_msg != '')
|
||||
{
|
||||
$xtpl->assign("ERROR", $error_msg);
|
||||
$xtpl->parse("main.error");
|
||||
}
|
||||
|
||||
if((isset($_REQUEST['popup']) && $_REQUEST['popup'] == 'true') ||(isset($_POST['popup']) && $_POST['popup']==true)) insert_popup_header($theme);
|
||||
|
||||
|
||||
$account = new Account();
|
||||
require_once('modules/Accounts/AccountFormBase.php');
|
||||
$accountForm = new AccountFormBase();
|
||||
$GLOBALS['check_notify'] = FALSE;
|
||||
|
||||
$query = 'select id, name, website, billing_address_city from accounts where deleted=0 ';
|
||||
$duplicates = $_POST['duplicate'];
|
||||
$count = count($duplicates);
|
||||
if ($count > 0)
|
||||
{
|
||||
$query .= "and (";
|
||||
$first = true;
|
||||
foreach ($duplicates as $duplicate_id)
|
||||
{
|
||||
if (!$first) $query .= ' OR ';
|
||||
$first = false;
|
||||
$query .= "id='$duplicate_id' ";
|
||||
}
|
||||
$query .= ')';
|
||||
}
|
||||
|
||||
$duplicateAccounts = array();
|
||||
|
||||
$db = DBManagerFactory::getInstance();
|
||||
$result = $db->query($query);
|
||||
$i=-1;
|
||||
while(($row=$db->fetchByAssoc($result)) != null) {
|
||||
$i++;
|
||||
$duplicateAccounts[$i] = $row;
|
||||
}
|
||||
|
||||
$xtpl->assign('FORMBODY', $accountForm->buildTableForm($duplicateAccounts, 'Accounts'));
|
||||
|
||||
$input = '';
|
||||
foreach ($account->column_fields as $field)
|
||||
{
|
||||
if (!empty($_POST['Accounts'.$field])) {
|
||||
$value = urldecode($_POST['Accounts'.$field]);
|
||||
$input .= "<input type='hidden' name='$field' value='{$value}'>\n";
|
||||
}
|
||||
}
|
||||
foreach ($account->additional_column_fields as $field)
|
||||
{
|
||||
if (!empty($_POST['Accounts'.$field])) {
|
||||
$value = urldecode($_POST['Accounts'.$field]);
|
||||
$input .= "<input type='hidden' name='$field' value='{$value}'>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$emailAddress = new SugarEmailAddress();
|
||||
$input .= $emailAddress->getEmailAddressWidgetDuplicatesView($account);
|
||||
|
||||
$get = '';
|
||||
if(!empty($_POST['return_module'])) $xtpl->assign('RETURN_MODULE', $_POST['return_module']);
|
||||
else $get .= "Accounts";
|
||||
$get .= "&return_action=";
|
||||
if(!empty($_POST['return_action'])) $xtpl->assign('RETURN_ACTION', $_POST['return_action']);
|
||||
else $get .= "DetailView";
|
||||
if(!empty($_POST['return_id'])) $xtpl->assign('RETURN_ID', $_POST['return_id']);
|
||||
|
||||
if(!empty($_POST['popup']))
|
||||
$input .= '<input type="hidden" name="popup" value="'.$_POST['popup'].'">';
|
||||
else
|
||||
$input .= '<input type="hidden" name="popup" value="false">';
|
||||
|
||||
if(!empty($_POST['to_pdf']))
|
||||
$input .= '<input type="hidden" name="to_pdf" value="'.$_POST['to_pdf'].'">';
|
||||
else
|
||||
$input .= '<input type="hidden" name="to_pdf" value="false">';
|
||||
|
||||
if(!empty($_POST['create']))
|
||||
$input .= '<input type="hidden" name="create" value="'.$_POST['create'].'">';
|
||||
else
|
||||
$input .= '<input type="hidden" name="create" value="false">';
|
||||
|
||||
$xtpl->assign('INPUT_FIELDS',$input);
|
||||
$xtpl->parse('main');
|
||||
$xtpl->out('main');
|
||||
|
||||
|
||||
?>
|
||||
11
modules/Accounts/controller.php
Normal file
11
modules/Accounts/controller.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
class CustomAccountsController extends SugarController
|
||||
{
|
||||
public function action_showMap() {
|
||||
if ( !empty($_REQUEST['uid']) ) {
|
||||
header('Location: index.php?module=Accounts&action=showMap');
|
||||
}
|
||||
sugar_die('');
|
||||
}
|
||||
}
|
||||
207
modules/Accounts/copy_accounts.php
Normal file
207
modules/Accounts/copy_accounts.php
Normal file
@@ -0,0 +1,207 @@
|
||||
<?php
|
||||
|
||||
$db=$GLOBALS['db'];
|
||||
|
||||
$not_in =
|
||||
"UPPER(name) NOT LIKE 'MARCPOL%' AND
|
||||
UPPER(name) NOT LIKE 'KAUFLAND%' AND
|
||||
UPPER(name) NOT LIKE 'EURO%NET%' AND
|
||||
UPPER(name) NOT LIKE 'CARREFOUR%' AND
|
||||
UPPER(name) NOT LIKE 'MEDIA EXPERT%' AND
|
||||
UPPER(name) NOT LIKE 'AMAZON%' AND
|
||||
UPPER(name) NOT LIKE '%CZERWONA%' AND
|
||||
UPPER(name) NOT LIKE 'AGD MARKET%' AND
|
||||
UPPER(name) NOT LIKE 'DROGERIA NATURA%' AND
|
||||
UPPER(name) NOT LIKE 'POLOMARKET%' AND
|
||||
UPPER(name) NOT LIKE 'NORAUTO%'";
|
||||
|
||||
$acc = $db->query("SELECT * FROM accounts WHERE deleted='0' AND ".$not_in." order by date_entered");
|
||||
|
||||
$accounts = array();
|
||||
|
||||
while ($a = $db->fetchByAssoc($acc)) {
|
||||
$docs = false;
|
||||
$doc = $db->query("SELECT id FROM ecminvoiceouts where parent_id='".$a['id']."'");
|
||||
if ($doc->num_rows>0) {
|
||||
$docs = true;
|
||||
//echo $a['name'].' FV<br>';
|
||||
} else $no_inv = true;
|
||||
$doc = $db->query("SELECT id FROM ecmpurchaseorders where parent_id='".$a['id']."'");
|
||||
if ($doc->num_rows>0) {
|
||||
$docs = true;
|
||||
//echo $a['name'].' PO<br>';
|
||||
}
|
||||
$doc = $db->query("SELECT id FROM documents where parent_id='".$a['id']."'");
|
||||
if ($doc->num_rows>0) {
|
||||
$docs = true;
|
||||
//echo $a['name'].' DMS<br>';
|
||||
}
|
||||
$doc = $db->query("SELECT id FROM ecmsales where parent_id='".$a['id']."'");
|
||||
if ($doc->num_rows>0) {
|
||||
$so = true;
|
||||
//echo $a['name'].' ZS<br>';
|
||||
}
|
||||
$doc = $db->query("SELECT id FROM ecmstockdocouts where parent_id='".$a['id']."'");
|
||||
if ($doc->num_rows>0) {
|
||||
$docs = true;
|
||||
//echo $a['name'].' WZ<br>';
|
||||
} else $no_wz = true;
|
||||
$doc = $db->query("SELECT id FROM ecmstockdocins where parent_id='".$a['id']."'");
|
||||
if ($doc->num_rows>0) {
|
||||
$docs = true;
|
||||
//echo $a['name'].' PZ<br>';
|
||||
}
|
||||
|
||||
if ($docs) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($no_inv && $no_wz && $so) {
|
||||
echo $a['name'].'<br>';
|
||||
$accounts[] = $a['id'];
|
||||
}
|
||||
|
||||
}
|
||||
echo sizeof($accounts);
|
||||
return;
|
||||
|
||||
foreach ($accounts as $id) {
|
||||
// copyAccount($id);
|
||||
/*
|
||||
$res = $db->query("SELECT * FROM ecmaccountcategories_bean WHERE bean_id='$id'");
|
||||
if ($res->num_rows > 0) {
|
||||
$a = new Account();
|
||||
$a->retrieve($id);
|
||||
echo $a->name.'<br>';
|
||||
unset($a);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
function copyAccount($id) {
|
||||
$db=$GLOBALS['db'];
|
||||
$_GET['record'] = $id;
|
||||
if($_GET['record']!=''){
|
||||
// id nie jest puste? jedziemy i szukamy leadsa ...
|
||||
$r=$db->query("select contact_id,id,date_modified,deleted from accounts_contacts where account_id='".$_GET['record']."' and deleted='0'");
|
||||
if($r->num_rows>0){
|
||||
while($row=$db->fetchByAssoc($r)){
|
||||
$ct=$db->query("select * from contacts where id='".$row['contact_id']."' and deleted='0'");
|
||||
while($row2=$db->fetchByAssoc($ct)){
|
||||
$db->query("update accounts_contacts set deleted='1' where id='".$row2['id']."' and deleted='0'");
|
||||
$mail=$db->query("select * from email_addr_bean_rel where bean_id='".$row2['id']."' and deleted='0'");
|
||||
if($mail->num_rows>0){
|
||||
while($mu=$db->fetchByAssoc($mail)){
|
||||
$db->query("update email_addr_bean_rel set bean_module='Contacts' where id='".$mu['id']."' and deleted='0'");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$l=$db->query("select * from accounts where id='".$_GET['record']."' and deleted='0'");
|
||||
$l2=$db->query("describe leads");
|
||||
$pola2=array();
|
||||
while($daj2=$db->fetchByAssoc($l2)){
|
||||
$pola2[]=$daj2['Field'];
|
||||
}
|
||||
$pola=array();
|
||||
$wartosci=array();
|
||||
while($daj=$db->fetchByAssoc($l)){
|
||||
foreach ($daj as $pole=>$wartosc){
|
||||
if($pole=='account_type')$pole='lead_type';
|
||||
if(in_array($pole,$pola2)==false)continue;
|
||||
if($pole=='ecmprice_id')continue;
|
||||
if($pole=='website_update')continue;
|
||||
if($pole=='document_recipient_code')continue;
|
||||
if($pole=='document_parent_order_no')continue;
|
||||
if($pole=='document_delivery_address')continue;
|
||||
if($pole=='invoice_to_ownership')continue;
|
||||
if($pole=='shop_number')continue;
|
||||
if($pole=='krs')continue;
|
||||
if($pole=='regon')continue;
|
||||
if($pole=='document_parent_iln' || $pole=='document_shipping_iln' || $pole=='document_bank_account' || $pole=='document_parent_code' || $pole=='document_ean')continue;
|
||||
$pola[]=$pole;
|
||||
$wartosci[]=$wartosc;
|
||||
}
|
||||
$db->query("INSERT INTO `leads` (".implode(",",$pola).") VALUES ('".implode("','",$wartosci)."')");
|
||||
$db->query("update accounts set deleted='1' where id='".$daj['id']."'");
|
||||
}
|
||||
// notatki
|
||||
$n1=$db->query("select * from notes where parent_id='".$_GET['record']."' and deleted='0'");
|
||||
if($n1->num_rows>0){
|
||||
while($nt=$db->fetchByAssoc($n1)){
|
||||
$db->query("update notes set parent_type='Leads' where id='".$nt['id']."'");
|
||||
}
|
||||
}
|
||||
//oferty
|
||||
$n1=$db->query("select * from ecmquotes where parent_id='".$_GET['record']."' and deleted='0'");
|
||||
if($n1->num_rows>0){
|
||||
while($nt=$db->fetchByAssoc($n1)){
|
||||
$db->query("update ecmquotes set parent_type='Leads' where id='".$nt['id']."'");
|
||||
}
|
||||
}
|
||||
//calls
|
||||
$n1=$db->query("select * from calls where parent_id='".$_GET['record']."' and deleted='0'");
|
||||
if($n1->num_rows>0){
|
||||
while($nt=$db->fetchByAssoc($n1)){
|
||||
$db->query("update calls set parent_type='Leads' where id='".$nt['id']."'");
|
||||
}
|
||||
}
|
||||
//tasks
|
||||
$n1=$db->query("select * from tasks where parent_id='".$_GET['record']."' and deleted='0'");
|
||||
if($n1->num_rows>0){
|
||||
while($nt=$db->fetchByAssoc($n1)){
|
||||
$db->query("update tasks set parent_type='Leads' where id='".$nt['id']."'");
|
||||
}
|
||||
}
|
||||
//meetings
|
||||
$n1=$db->query("select * from meetings where parent_id='".$_GET['record']."' and deleted='0'");
|
||||
if($n1->num_rows>0){
|
||||
while($nt=$db->fetchByAssoc($n1)){
|
||||
$db->query("update meetings set parent_type='Leads' where id='".$nt['id']."'");
|
||||
}
|
||||
}
|
||||
//kategorie kontaktów
|
||||
$n1=$db->query("select * from ecmaccountcategories_bean where bean_id='".$_GET['record']."' and deleted='0'");
|
||||
if($n1->num_rows>0){
|
||||
while($nt=$db->fetchByAssoc($n1)){
|
||||
$db->query("update ecmaccountcategories_bean set bean_name='Leads' where id='".$nt['id']."'");
|
||||
}
|
||||
}
|
||||
// przenoszenie emaila
|
||||
$mail=$db->query("select * from email_addr_bean_rel where bean_id='".$_GET['record']."' and deleted='0'");
|
||||
if($mail->num_rows>0){
|
||||
// o jest email!
|
||||
while($mu=$db->fetchByAssoc($mail)){
|
||||
// podmianka relacji na kontrahenta
|
||||
$db->query("update email_addr_bean_rel set bean_module='Leads' where bean_id='".$_GET['record']."'");
|
||||
}
|
||||
}
|
||||
// relacja kontrahent kontakt
|
||||
$rr=$db->query("SELECT * FROM accounts_contacts where account_id='".$_GET['record']."' and deleted='0'");
|
||||
if($rr->num_rows>0){
|
||||
// o jest email!
|
||||
while($re=$db->fetchByAssoc($rr)){
|
||||
// podmianka relacji na kontrahenta
|
||||
$db->query("INSERT INTO `leads_contactleads` VALUES('".implode("','",$re)."')");
|
||||
$db->query("update accounts_contacts set deleted='1' where lead_id='".$_GET['record']."'");
|
||||
}
|
||||
}
|
||||
// relacja adresy
|
||||
$ad=$db->query("SELECT * FROM account_addresses where account_id='".$_GET['record']."' and deleted='0'");
|
||||
if($ad->num_rows>0){
|
||||
// o jest email!
|
||||
while($re=$db->fetchByAssoc($ad)){
|
||||
// podmianka relacji na kontrahenta
|
||||
$db->query("INSERT INTO `lead_addresses` VALUES('".implode("','",$re)."')");
|
||||
$db->query("update account_addresses set deleted='1' where account_id='".$_GET['record']."'");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
93
modules/Accounts/field_arrays.php
Executable file
93
modules/Accounts/field_arrays.php
Executable file
@@ -0,0 +1,93 @@
|
||||
<?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['Account'] = array ('column_fields' => Array(
|
||||
"annual_revenue"
|
||||
,"billing_address_street"
|
||||
,"billing_address_city"
|
||||
,"billing_address_state"
|
||||
,"billing_address_postalcode"
|
||||
,"billing_address_country"
|
||||
,"date_entered"
|
||||
,"date_modified"
|
||||
,"modified_user_id"
|
||||
,"assigned_user_id"
|
||||
,"description"
|
||||
,"email1"
|
||||
,"email2"
|
||||
,"employees"
|
||||
,"id"
|
||||
,"industry"
|
||||
,"name"
|
||||
,"ownership"
|
||||
,"parent_id"
|
||||
,"phone_alternate"
|
||||
,"phone_fax"
|
||||
,"phone_office"
|
||||
,"rating"
|
||||
,"shipping_address_street"
|
||||
,"shipping_address_city"
|
||||
,"shipping_address_state"
|
||||
,"shipping_address_postalcode"
|
||||
,"shipping_address_country"
|
||||
,"sic_code"
|
||||
,"ticker_symbol"
|
||||
,"account_type"
|
||||
,"website"
|
||||
, "created_by"
|
||||
),
|
||||
'list_fields' => Array('id', 'name', 'website', 'phone_office', 'assigned_user_name', 'assigned_user_id'
|
||||
, 'billing_address_street'
|
||||
, 'billing_address_city'
|
||||
, 'billing_address_state'
|
||||
, 'billing_address_postalcode'
|
||||
, 'billing_address_country'
|
||||
, 'shipping_address_street'
|
||||
, 'shipping_address_city'
|
||||
, 'shipping_address_state'
|
||||
, 'shipping_address_postalcode'
|
||||
, 'shipping_address_country'
|
||||
),
|
||||
'required_fields' => array("name"=>1),
|
||||
);
|
||||
?>
|
||||
10
modules/Accounts/getAddress.php
Normal file
10
modules/Accounts/getAddress.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
include_once("modules/Accounts/Account.php");
|
||||
$a=new Account();
|
||||
if ($_GET['id']) {
|
||||
$id = $_GET['id'];
|
||||
|
||||
$json = getJSONobj();
|
||||
echo $json->encode($a->getAddress($id));
|
||||
} else echo 0;
|
||||
?>
|
||||
8
modules/Accounts/getAddresses.php
Normal file
8
modules/Accounts/getAddresses.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
include_once("modules/Accounts/Account.php");
|
||||
$a=new Account();
|
||||
if ($_GET['account_id']) {
|
||||
$account_id = $_GET['account_id'];
|
||||
echo $a->getAddresses($account_id);
|
||||
} else echo 0;
|
||||
?>
|
||||
43
modules/Accounts/javascript/showMap.js
Normal file
43
modules/Accounts/javascript/showMap.js
Normal file
@@ -0,0 +1,43 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
var mapProp = {
|
||||
center : new google.maps.LatLng(52.05, 19.45),
|
||||
zoom : 6,
|
||||
mapTypeId : google.maps.MapTypeId.ROADMAP
|
||||
};
|
||||
var map = new google.maps.Map(document
|
||||
.getElementById("googleMapContainer"), mapProp);
|
||||
|
||||
var markers = JSON.parse(b64_to_utf8($('#googleMapMarkers')
|
||||
.val()));
|
||||
$.each(markers, function(index, m) {
|
||||
var marker = new google.maps.Marker({
|
||||
position : new google.maps.LatLng(m.lat, m.lng),
|
||||
url : '/',
|
||||
animation : google.maps.Animation.DROP,
|
||||
customInfo : m.info,
|
||||
title : m.title,
|
||||
map : map
|
||||
});
|
||||
google.maps.event.addListener(marker, 'click',
|
||||
markerClickFunction);
|
||||
});
|
||||
|
||||
function markerClickFunction() {
|
||||
infowindow = new google.maps.InfoWindow({
|
||||
content : this.customInfo
|
||||
});
|
||||
infowindow.open(map, this);
|
||||
closeInfoWindow(infowindow);
|
||||
}
|
||||
function closeInfoWindow(infoWindow) {
|
||||
setTimeout(function() {
|
||||
infoWindow.close();
|
||||
}, 8000);
|
||||
}
|
||||
});
|
||||
|
||||
function b64_to_utf8(str) {
|
||||
return decodeURIComponent(escape(window.atob(str)));
|
||||
}
|
||||
247
modules/Accounts/language/en_us.lang.php
Normal file
247
modules/Accounts/language/en_us.lang.php
Normal file
@@ -0,0 +1,247 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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 (
|
||||
//add mz
|
||||
'LBL_KRS' => 'KRS',
|
||||
'LBL_REGON' => 'REGON',
|
||||
'LBL_SHOP_NUMBER' => 'Shop number',
|
||||
'LBL_DOCUMENT_BANK_ACCOUNT' => 'Bank account',
|
||||
'LBL_PANEL_DOC_SETTINGS' => 'Document settings',
|
||||
'LBL_INVOICE_TO_OWNERSHIP' => 'Invoice to ownership',
|
||||
'LBL_DOCUMENT_DELIVERY_ADDRESS' => 'Required delivery address',
|
||||
'LBL_DOCUMENT_RECIPIENT_CODE' => 'Required recipient code',
|
||||
'LBL_DOCUMENT_PARENT_ORDER_NO' => 'Required buyer order number',
|
||||
'LBL_DOCUMENT_PARENT_ILN' => 'Required ILN number',
|
||||
'LBL_DOCUMENT_SHIPPING_ILN' => 'Required shipping ILN number',
|
||||
'LBL_DOCUMENT_PARENT_NIP' => 'Required VATID number',
|
||||
'LBL_DOCUMENT_SHIPPING_NIP' => 'Required shipping VATID number',
|
||||
'LBL_DOCUMENT_PARENT_CODE' => 'Required account recipient code',
|
||||
'LBL_DOCUMENT_EAN' => 'Required EAN',
|
||||
'LBL_PRICE' => 'Default price',
|
||||
'LBL_PRIORITY' => 'Priority',
|
||||
'LBL_ASSIGNED_CATEGORIES' => 'Assigned categories',
|
||||
'LBL_STREET' => 'Street',
|
||||
'LBL_EMAIL_ADDRESS' => 'E-mail',
|
||||
'LBL_SHOP_PANEL' => 'Shop online',
|
||||
'LBL_SHOP_USER' => 'Shop user',
|
||||
'LBL_PRICEBOOK' => 'Online Shop Pricebook',
|
||||
'LBL_ECMQUOTES_SUBPANEL_TITLE' => 'Quotes',
|
||||
'LBL_ECMSALES_SUBPANEL_TITLE' => 'Sales',
|
||||
'LBL_ECMINVOICEOUTS_SUBPANEL_TITLE' => 'Invoices',
|
||||
'LBL_PANEL_DELIVERY_ADDRESSES' => 'Delivery addresses',
|
||||
'LBL_ADDRESS_NAME' => 'Name',
|
||||
'LBL_ADDRESS_POSITION' => 'Pos.',
|
||||
'LBL_ADDRESS_STREET' => 'Street',
|
||||
'LBL_ADDRESS_CITY' => 'City',
|
||||
'LBL_ADDRESS_POSTALCODE' => 'Postalcode',
|
||||
'LBL_ADDRESS_COUNTRY' => 'Country',
|
||||
'LBL_ADDRESS_PHONE' => 'Phone',
|
||||
'LBL_ADDRESS_FAX' => 'Fax',
|
||||
'LBL_PAYMENTCONDITION_NAME' => 'Payment Conditions',
|
||||
'LBL_DELIVERYCONDITION_NAME' => 'Delivery Conditions',
|
||||
'LBL_PANEL_DISCOUNTS' => 'Discounts',
|
||||
'LBL_PRODUCT_GROUP' => 'Products group',
|
||||
'LBL_DISCOUNT' => 'Disciunt (%)',
|
||||
'LBL_TO_VATID' => 'VAT ID',
|
||||
'LBL_SUPPLIER_CODE' => 'Supplier code',
|
||||
'LBL_ILN' => 'Iln',
|
||||
'LBL_AUTO_INVOICE' => 'Auto invoice',
|
||||
'LBL_SAVE_TO_GOOGLE' => 'Save to my Google Contacts',
|
||||
'LBL_GOOGLE_ERROR' => 'No Google Account informations (See User pereferences)',
|
||||
'LBL_MAPS' => 'Maps',
|
||||
'LBL_CURRENCY' => 'Currency',
|
||||
'LBL_INVOICE_TYPE' => 'Invoice type',
|
||||
'LBL_PANEL_CATEGORIES' => 'Categories',
|
||||
'LBL_CATEGORY_NAME' => 'Category',
|
||||
'LBL_CATEGORY_ASSIGNED_FILE' => 'Assigned file',
|
||||
//end mz
|
||||
// DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_name' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'db_website' => 'LBL_LIST_WEBSITE',
|
||||
'db_billing_address_city' => 'LBL_LIST_CITY',
|
||||
// END DON'T CONVERT
|
||||
'LBL_DOCUMENTS_SUBPANEL_TITLE' => 'Documents',
|
||||
// Dashlet Categories
|
||||
'LBL_CHARTS' => 'Charts',
|
||||
'LBL_DEFAULT' => 'Views',
|
||||
'LBL_MISC' => 'Misc',
|
||||
'LBL_UTILS' => 'Utils',
|
||||
// END Dashlet Categories
|
||||
|
||||
'ACCOUNT_REMOVE_PROJECT_CONFIRM' => 'Are you sure you want to remove this account from the project?',
|
||||
'ERR_DELETE_RECORD' => 'You must specify a record number in order to delete the account.',
|
||||
'LBL_ACCOUNT_INFORMATION' => 'Overview',
|
||||
'LBL_ACCOUNT_NAME' => 'Account Name:',
|
||||
'LBL_ACCOUNT' => 'Account:',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Activities',
|
||||
'LBL_ADDRESS_INFORMATION' => 'Address Information',
|
||||
'LBL_ANNUAL_REVENUE' => 'Annual Revenue:',
|
||||
'LBL_ANY_ADDRESS' => 'Any Address:',
|
||||
'LBL_ANY_EMAIL' => 'Any Email:',
|
||||
'LBL_ANY_PHONE' => 'Any Phone:',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Assigned to:',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned User:',
|
||||
'LBL_BILLING_ADDRESS_CITY' => 'Billing City:',
|
||||
'LBL_BILLING_ADDRESS_COUNTRY' => 'Billing Country:',
|
||||
'LBL_BILLING_ADDRESS_POSTALCODE' => 'Billing Postal Code:',
|
||||
'LBL_BILLING_ADDRESS_STATE' => 'Billing State:',
|
||||
'LBL_BILLING_ADDRESS_STREET_2' =>'Billing Street 2',
|
||||
'LBL_BILLING_ADDRESS_STREET_3' =>'Billing Street 3',
|
||||
'LBL_BILLING_ADDRESS_STREET_4' =>'Billing Street 4',
|
||||
'LBL_BILLING_ADDRESS_STREET' => 'Billing Street:',
|
||||
'LBL_BILLING_ADDRESS' => 'Billing Address:',
|
||||
'LBL_BUG_FORM_TITLE' => 'Accounts',
|
||||
'LBL_BUGS_SUBPANEL_TITLE' => 'Bugs',
|
||||
'LBL_CALLS_SUBPANEL_TITLE' => 'Calls',
|
||||
'LBL_CAMPAIGN_ID' => 'Campaign ID',
|
||||
'LBL_CASES_SUBPANEL_TITLE' => 'Cases',
|
||||
'LBL_CITY' => 'City:',
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE' => 'Contacts',
|
||||
'LBL_COUNTRY' => 'Country:',
|
||||
'LBL_DATE_ENTERED' => 'Date Created:',
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified:',
|
||||
'LBL_MODIFIED_ID'=>'Modified By Id',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Accounts',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Description Information',
|
||||
'LBL_DESCRIPTION' => 'Description:',
|
||||
'LBL_DUPLICATE' => 'Possible Duplicate Account',
|
||||
'LBL_EMAIL' => 'Email Address:',
|
||||
'LBL_EMAIL_OPT_OUT' => 'Email Opt Out:',
|
||||
'LBL_EMAIL_ADDRESSES' => 'Email Addresses',
|
||||
'LBL_EMPLOYEES' => 'Employees:',
|
||||
'LBL_FAX' => 'Fax:',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'History',
|
||||
'LBL_HOMEPAGE_TITLE' => 'My Accounts',
|
||||
'LBL_INDUSTRY' => 'Industry:',
|
||||
'LBL_INVALID_EMAIL'=>'Invalid Email:',
|
||||
'LBL_INVITEE' => 'Contacts',
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Leads',
|
||||
'LBL_LIST_ACCOUNT_NAME' => 'Name',
|
||||
'LBL_LIST_CITY' => 'City',
|
||||
'LBL_LIST_CONTACT_NAME' => 'Contact Name',
|
||||
'LBL_LIST_EMAIL_ADDRESS' => 'Email Address',
|
||||
'LBL_LIST_FORM_TITLE' => 'Account List',
|
||||
'LBL_LIST_PHONE' => 'Phone',
|
||||
'LBL_LIST_STATE' => 'State',
|
||||
'LBL_LIST_WEBSITE' => 'Website',
|
||||
'LBL_MEETINGS_SUBPANEL_TITLE' => 'Meetings',
|
||||
'LBL_MEMBER_OF' => 'Member of:',
|
||||
'LBL_MEMBER_ORG_FORM_TITLE' => 'Member Organizations',
|
||||
'LBL_MEMBER_ORG_SUBPANEL_TITLE'=>'Member Organizations',
|
||||
'LBL_MODULE_NAME' => 'Accounts',
|
||||
'LBL_MODULE_TITLE' => 'Accounts: Home',
|
||||
'LBL_MODULE_ID'=> 'Accounts',
|
||||
'LBL_NAME'=>'Name:',
|
||||
'LBL_NEW_FORM_TITLE' => 'New Account',
|
||||
'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Opportunities',
|
||||
'LBL_OTHER_EMAIL_ADDRESS' => 'Other Email:',
|
||||
'LBL_OTHER_PHONE' => 'Other Phone:',
|
||||
'LBL_OWNERSHIP' => 'Ownership:',
|
||||
'LBL_PARENT_ACCOUNT_ID' => 'Parent Account ID',
|
||||
'LBL_PHONE_ALT' => 'Alternate Phone:',
|
||||
'LBL_PHONE_FAX' => 'Phone Fax:',
|
||||
'LBL_PHONE_OFFICE' => 'Office Phone:',
|
||||
'LBL_PHONE' => 'Phone:',
|
||||
'LBL_POSTAL_CODE' => 'Postal Code:',
|
||||
'LBL_PRODUCTS_TITLE'=>'Products',
|
||||
'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projects',
|
||||
'LBL_PUSH_BILLING' => 'Push Billing',
|
||||
'LBL_PUSH_CONTACTS_BUTTON_LABEL' => 'Copy to Contacts',
|
||||
'LBL_PUSH_CONTACTS_BUTTON_TITLE' => 'Copy...',
|
||||
'LBL_PUSH_SHIPPING' => 'Push Shipping',
|
||||
'LBL_RATING' => 'Rating:',
|
||||
'LBL_SAVE_ACCOUNT' => 'Save Account',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Account Search',
|
||||
'LBL_SHIPPING_ADDRESS_CITY' => 'Shipping City:',
|
||||
'LBL_SHIPPING_ADDRESS_COUNTRY' => 'Shipping Country:',
|
||||
'LBL_SHIPPING_ADDRESS_POSTALCODE' => 'Shipping Postal Code:',
|
||||
'LBL_SHIPPING_ADDRESS_STATE' => 'Shipping State:',
|
||||
'LBL_SHIPPING_ADDRESS_STREET_2' => 'Shipping Street 2',
|
||||
'LBL_SHIPPING_ADDRESS_STREET_3' => 'Shipping Street 3',
|
||||
'LBL_SHIPPING_ADDRESS_STREET_4' => 'Shipping Street 4',
|
||||
'LBL_SHIPPING_ADDRESS_STREET' => 'Shipping Street:',
|
||||
'LBL_SHIPPING_ADDRESS' => 'Shipping Address:',
|
||||
'LBL_SIC_CODE' => 'SIC Code:',
|
||||
'LBL_STATE' => 'State:',
|
||||
'LBL_TASKS_SUBPANEL_TITLE' => 'Tasks',
|
||||
'LBL_TEAMS_LINK'=>'Teams',
|
||||
'LBL_TICKER_SYMBOL' => 'Ticker Symbol:',
|
||||
'LBL_TYPE' => 'Type:',
|
||||
'LBL_USERS_ASSIGNED_LINK'=>'Assigned Users',
|
||||
'LBL_USERS_CREATED_LINK'=>'Created By Users',
|
||||
'LBL_USERS_MODIFIED_LINK'=>'Modified Users',
|
||||
'LBL_VIEW_FORM_TITLE' => 'Account View',
|
||||
'LBL_WEBSITE' => 'Website:',
|
||||
'LBL_CREATED_ID'=>'Created By Id',
|
||||
'LBL_CAMPAIGNS' =>'Campaigns',
|
||||
'LNK_ACCOUNT_LIST' => 'View Accounts',
|
||||
'LNK_NEW_ACCOUNT' => 'Create Account',
|
||||
'LNK_IMPORT_ACCOUNTS' => 'Import Accounts',
|
||||
'MSG_DUPLICATE' => 'The account record you are about to create might be a duplicate of an account record that already exists. Account records containing similar names are listed below.<br>Click Create Account to continue creating this new account, or select an existing account listed below.',
|
||||
'MSG_SHOW_DUPLICATES' => 'The account record you are about to create might be a duplicate of an account record that already exists. Account records containing similar names are listed below.<br>Click Save to continue creating this new account, or click Cancel to return to the module without creating the account.',
|
||||
'NTC_COPY_BILLING_ADDRESS' => 'Copy billing address to shipping address',
|
||||
'NTC_COPY_BILLING_ADDRESS2' => 'Copy to shipping',
|
||||
'NTC_COPY_SHIPPING_ADDRESS' => 'Copy shipping address to billing address',
|
||||
'NTC_COPY_SHIPPING_ADDRESS2' => 'Copy to billing',
|
||||
'NTC_DELETE_CONFIRMATION' => 'Are you sure you want to delete this record?',
|
||||
'NTC_REMOVE_ACCOUNT_CONFIRMATION' => 'Are you sure you want to remove this record?',
|
||||
'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Are you sure you want to remove this record as a member organization?',
|
||||
'LBL_ASSIGNED_USER_NAME' => 'Assigned to:',
|
||||
'LBL_PROSPECT_LIST' => 'Prospect List',
|
||||
'LBL_ACCOUNTS_SUBPANEL_TITLE'=>'Accounts',
|
||||
'LBL_PROJECT_SUBPANEL_TITLE' => 'Projects',
|
||||
'LBL_COPY' => 'Copy' /*for 508 compliance fix*/,
|
||||
//For export labels
|
||||
'LBL_ACCOUNT_TYPE' => 'Account Type',
|
||||
'LBL_CAMPAIGN_ID' => 'Campaign ID',
|
||||
'LBL_PARENT_ID' => 'Parent ID',
|
||||
'LBL_PHONE_ALTERNATE' => 'Phone Alternate',
|
||||
'LBL_EXPORT_ASSIGNED_USER_NAME' => 'Assigned User Name',
|
||||
// SNIP
|
||||
'LBL_CONTACT_HISTORY_SUBPANEL_TITLE' => 'Related Contacts\' Emails',
|
||||
'LBL_ECMPAYMENTS_PANEL' => 'Payment States',
|
||||
);
|
||||
?>
|
||||
47
modules/Accounts/language/pl_pl.help.DetailView.html
Executable file
47
modules/Accounts/language/pl_pl.help.DetailView.html
Executable file
@@ -0,0 +1,47 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2007 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Strona szczegółów konta klienta</h1>
|
||||
|
||||
<p>Zobacz szczegoły dotyczące konta klienta, takie jak adres, powiązane działania, historia i temtay. Możesz tworzyć i zarządzać dowolnymi informacjami, z właściwego dla nich panelu.</p>
|
||||
<ul>
|
||||
<li>Aby edytować informacje o kliencie, kliknij<span class="helpButton">Edytuj</span>, wprowadź niezbędne dane i kliknij <span class="helpButton">Zachowaj</span>. </li>
|
||||
<li>Aby skopiować dane do innego klienta, kliknij <span class="helpButton">Duplikuj</span>. Możesz także modyfikować rekordy i zapisywać je jako inne. System wyświetla nowe rekordy w liście klientów na stronie głównej modułu.</li>
|
||||
<li>To delete an account, click <span class="helpButton">Delete</span>.</li>
|
||||
<li>Aby wyszukać i połączyć zduplikowane rekordy klientów, kliknij <span class="helpButton">Znajdź duplikaty</span>.</li>
|
||||
<li>Aby śledzić zmiany dotyczące konta klienta w czasie, kliknij link<span class="helpButton">Zobacz dziennik zmian</span>.</li>
|
||||
82
modules/Accounts/language/pl_pl.help.EditView.html
Executable file
82
modules/Accounts/language/pl_pl.help.EditView.html
Executable file
@@ -0,0 +1,82 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2007 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Klienci</h1>
|
||||
<p>Aby utworzyć nowe konto klienta, wprowadź następujące informacje:</p>
|
||||
|
||||
<span class="helpButton">Informacje o kliencie:</span>
|
||||
<ul>
|
||||
<li><span class="helpButton">Nazwa:</span>. Wprowadź nazwę dla nowego konta klienta.</li>
|
||||
<li><span class="helpButton">Telefon.</span> Wpisz numer telefonu organizacji.</li>
|
||||
<li><span class="helpButton">Fax</span>. Wpisz numer faxu organizacji.</li>
|
||||
<li><span class="helpButton">Inny telefon</span>. Wprowadź dodatkowy numer telefonu klienta, jeśli istnieje.</li>
|
||||
<li><span class="helpButton">Email</span>. Wprowadź adres poczty elektronicznej dla organizacji.</li>
|
||||
<li><span class="helpButton">Inny Email</span>. Wprowadź dodatkowy adres poczty elektronicznej dla organizacji.</li>
|
||||
<li><span class="helpButton">WWW</span>. Wpisz adres strony internetowej klienta.</li>
|
||||
<li><span class="helpButton">Symbol unikalny:</span>. Nadaj unikalny numer konta klientowi.</li>
|
||||
<li><span class="helpButton">Jest własnością (członkiem)</span>. Wprowadź nazwy kont organizacji powiązanej z tworzonym kontem.</li>
|
||||
<li><span class="helpButton">Pracownicy</span>. Podaj liczbę pracowników organizacji.</li>
|
||||
<li><span class="helpButton">Właściciel</span>. Określ informacje o właścicielu.</li>
|
||||
<li><span class="helpButton">Rating</span>. Określ rating organizacji w brażny.</li>
|
||||
<li><span class="helpButton">Branża</span>. Wybierz z listy rozwijalnej sektor przemysłu do którego zalicza się klient.</li>
|
||||
<li><span class="helpButton">Typ</span>. Określ kategorię klienta, taką jak Klient lub Partner.</li>
|
||||
<li><span class="helpButton">Rocznye przychody</span>. Określ roczne przychody dla organizacji.</li>
|
||||
|
||||
<li><span class="helpButton">Zespół</span>. Wprowadź nazwę zespołu, który ma prawo do wglądu do konta. Aby wybrać istniejący zespół, kliknij <span class="helpButton">wybierz</span>, I wybierz odpowiedni zespół z listy.</li>
|
||||
|
||||
<li><span class="helpButton">Przydzielone do </span>. Wprowadź nazwę użytkownika, który jest odpowiedzialny za kontakty z tym klientem. Aby wybrać istniejącego użytkownika, naciśnij przycisk <span class="helpButton">Wybierz</span>, i wybierz osobę z listy użytkowników. Domyślnie, rekord jest przydzielony do Ciebie.<li>
|
||||
</ul>
|
||||
|
||||
<p><span class="helpButton">Informacje adresowe:</span></p>
|
||||
<ul>
|
||||
<li><span class="helpButton">Adres faktur./span>. Adres główny siedziby klineta (adres do fakturowania).</li>
|
||||
<li><span class="helpButton">Miasto</span>. Nazwa miasta.</li>
|
||||
<li><span class="helpButton">Województwo</span>. Województwo, w którym jest miasto z siedzibą klienta.</li>
|
||||
<li><span class="helpButton">Kod pocztowy</span>. Kod pocztowy adresu klienta.</li>
|
||||
<li><span class="helpButton">Kraj</span>. Kraj, w którym mieści się siedziba klienta.</li>
|
||||
<li><span class="helpButton">Adres dostawy</span>. Adres dostawy do klienta. Użyj strzałek >> aby skopiować dane z pól adresu fakturowania.</li> Aby skopiować dane z jednej sekcji do drugiej, wystarczy wprowadzić dane tylko w jednej sekcji.
|
||||
</ul>
|
||||
<p><span class="helpButton">Adres(y) email:</span>
|
||||
<br>Wprowadź jedne lub więcej adresów poczty elektronicznej dla organizjacji i Twoich kontaktów i grup docelowych kampanii. Jeżeli któryś z nich jest niewłaściwy, zaznacz pole <span class="helpButton">Niepoprawny</span>, aby to uwidocznić. If you sent out campaign emails this contact and the individual chose to opt-out of receiving them, select <span class="helpButton">Opted Out</span>.
|
||||
|
||||
<p><span class="helpButton">Opis</span>.
|
||||
<br>Napisz krótką informację o kliencie.</p>
|
||||
|
||||
<p>Kliknij <span class="helpButton">Zapisz</span> aby zachować dane o nowym kliencie; kliknij <span class="helpButton">Skasuj</span> aby oupścić formularz, bez zapisywania danych.</p>
|
||||
|
||||
|
||||
68
modules/Accounts/language/pl_pl.help.index.html
Executable file
68
modules/Accounts/language/pl_pl.help.index.html
Executable file
@@ -0,0 +1,68 @@
|
||||
<!--
|
||||
|
||||
/*********************************************************************************
|
||||
* The contents of this file are subject to the SugarCRM Enterprise Subscription
|
||||
* Agreement ("License") which can be viewed at
|
||||
* http://www.sugarcrm.com/crm/products/sugar-enterprise-eula.html
|
||||
* By installing or using this file, You have unconditionally agreed to the
|
||||
* terms and conditions of the License, and You may not use this file except in
|
||||
* compliance with the License. Under the terms of the license, You shall not,
|
||||
* among other things: 1) sublicense, resell, rent, lease, redistribute, assign
|
||||
* or otherwise transfer Your rights to the Software, and 2) use the Software
|
||||
* for timesharing or service bureau purposes such as hosting the Software for
|
||||
* commercial gain and/or for the benefit of a third party. Use of the Software
|
||||
* may be subject to applicable fees and any use of the Software without first
|
||||
* paying applicable fees is strictly prohibited. You do not have the right to
|
||||
* remove SugarCRM copyrights from the source code or user interface.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* Your Warranty, Limitations of liability and Indemnity are expressly stated
|
||||
* in the License. Please refer to the License for the specific language
|
||||
* governing these rights and limitations under the License. Portions created
|
||||
* by SugarCRM are Copyright (C) 2004-2008 SugarCRM, Inc.; All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
-->
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
|
||||
|
||||
<h1>Klienci</h1>
|
||||
|
||||
<p>
|
||||
Modułu Klienci używa się podczas tworzenia i zarządzania kontami Klientów dla Twojej organizacji.</p>
|
||||
<p>Strona główna modułu wyświetla następujące informacje:</p>
|
||||
<ul>
|
||||
<li>Subpanel wyszukiwania, gdzie możesz wprowadzić nazwę klienta, aby wyszukać konkretne konto,</li>
|
||||
<ul>
|
||||
<li>Aby wyszukać tylko konta przydzielone do Ciebie, wybierz <span class="helpButton">Tylko moje elementy</span>.</li>
|
||||
<li>Aby przeprowadzić zaawansowane wyszukiwanie, użyj dodatkowych pól, klikając na zakładce <span class="helpButton">Wyszukiwanie zaawansowane</span>.</li>
|
||||
<li>Aby stworzyć i zapisać własne wyglądy wyszukiwania i wyniki, kliknij na link <span class="helpButton">Zapisz wyniki wyszukiwania i wygląd</span> na zakładce Wyszukiwanie zaawansowane.
|
||||
Aby obejrzeć kolumnę w wynikach wyszukiwania, przenieś ją do listy <b>Wyświetl kolumny</b>, używająć lewej strzałki. Możesz również zmienić sposób, wyświetlania się rezultatów od rosnącej na malejącą. Wprowadź nazwę dla wyników wyszukiwania w polu <b>Zapisz wynik wyszukiawania jako </b> and click <span class="helpButton">Zapisz</span>.</li>
|
||||
<p>
|
||||
</ul>
|
||||
<li>Lista aktualnych kont klientów, wraz z połączonymi informacjami, takimi jak nazwy i numery telefonow.</li>
|
||||
<li>Aby zobaczyć szczegóły konta klienta, kliknij na nazwę lub ikonę <span class="helpButton">Edytuj</span> znajdującą się na panelu, obok nazwy użytkownika.</li>
|
||||
<li>Aby edytować szczegóły konta klienta, kliknij na nazwę lub ikonę Edytuj, znajdującą się na panelu, obok nazwy użytkownika; lub kliknij <span class="helpButton">Edit</span> na stronie widoku szczegółów.</li>
|
||||
<li>Aby zmienić właściwości, lub usunąć więcej niż jedno konto, wybierz je z listy, a następnie użyj funkcji Masowa aktualizacja, znajdującej się na subpanelu poniżej.</li>
|
||||
<li>W celu wyeksportowania jednego lub więcej kont klienta, kliknij klawisz<span class="helpButton">Wyeksportuj</span>, umieszczony ponad nazwami klientów.
|
||||
<li>W celu połączenia duplikatów w jeden rekord, wybierz rekordy i kliknij przycisk <span class="helpButton">Połącz duplikaty</span>.
|
||||
<li>Sekcja skrótów umożliwia wywołanie następujących funkcji:
|
||||
<ul>
|
||||
<li><span class="helpShortcut">Utwórz klienta</span>. Kliknij, w celu utworzenia nowego konta klienta.</li>
|
||||
<li><span class="helpShortcut">Klienci</span>. Kliknij, aby powrócić z widoku szczegółowego konta klienta do strony głównej modułu.</li>
|
||||
<li><span class="helpShortcut">Raporty klientów</span>. Użyj tej opcji, aby zobaczyć istniejące raporty wykonane na bazie kont Twoich klientów, lub w celu utworzenia nowego raportu.</li>
|
||||
<li><span class="helpShortcut">Import</span>. Użyj tej opcji, aby zaimportować informacje o klientach z zewnętrznej aplikacji, lub pliku.
|
||||
</ul>
|
||||
<li>Formatka szybkiego tworzenia - Dodaj klienta jest wykorzystywana w celu szybkiego utworzenia konta klienta, zawierającego wyłącznie niezbędne (wymagane) informacjie. Po zapisaniu możesz później wprowadzić dodatkowe dane.</p>
|
||||
</ul>
|
||||
|
||||
217
modules/Accounts/language/pl_pl.lang.php
Normal file
217
modules/Accounts/language/pl_pl.lang.php
Normal file
@@ -0,0 +1,217 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*+******************************************************************************
|
||||
* Zasady użytkowania znajdują się na stronie: http://opensaas.pl/kontakt/regulamin.html
|
||||
********************************************************************************
|
||||
* Language : Język polski
|
||||
* Version : 6.5.x
|
||||
* Author : OpenSaaS Sp. z o.o.
|
||||
* Website : www.opensaas.pl
|
||||
******************************************************************************+*/
|
||||
|
||||
$mod_strings = array (
|
||||
//add mz
|
||||
'LBL_KRS' => 'KRS',
|
||||
'LBL_REGON' => 'REGON',
|
||||
'LBL_SHOP_NUMBER' => 'Numer sklepu',
|
||||
'LBL_DOCUMENT_BANK_ACCOUNT' => 'Konto bankowe',
|
||||
'LBL_PANEL_DOC_SETTINGS' => 'Ustawienia dokumentów',
|
||||
'LBL_INVOICE_TO_OWNERSHIP' => 'Fakturuj właściciela (ownership)',
|
||||
'LBL_DOCUMENT_DELIVERY_ADDRESS' => 'Obowiązkowy adres dostawy',
|
||||
'LBL_DOCUMENT_RECIPIENT_CODE' => 'Obowiązkowy kod towaru',
|
||||
'LBL_DOCUMENT_PARENT_ORDER_NO' => 'Obowiązkowy numer zamówienia klienta',
|
||||
'LBL_DOCUMENT_PARENT_ILN' => 'Obowiązkowy numer ILN',
|
||||
'LBL_DOCUMENT_SHIPPING_ILN' => 'Obowiązkowy numer ILN miejsca dostawy',
|
||||
'LBL_DOCUMENT_PARENT_NIP' => 'Obowiązkowy numer NIP',
|
||||
'LBL_DOCUMENT_SHIPPING_NIP' => 'Obowiązkowy numer NIP miejsca dostawy',
|
||||
'LBL_DOCUMENT_PARENT_CODE' => 'Obowiązkowy kod dostawcy',
|
||||
'LBL_DOCUMENT_EAN' => 'Obowiązkowy EAN',
|
||||
'LBL_PRICE' => 'Domyślne ceny',
|
||||
'LBL_PRIORITY' => 'Priorytet',
|
||||
'LBL_ASSIGNED_CATEGORIES' => 'Przypisane kategorie',
|
||||
'LBL_STREET' => 'Ulica',
|
||||
'LBL_PANEL_MAILINGGROUPS'=>'Grupy mailingowe',
|
||||
'LBL_MAILINGGROUP_NAME'=>"Nazwa grupy",
|
||||
'LBL_MAILINGGROUP_AVAILABLE'=>"Aktywna",
|
||||
'LBL_EMAIL_ADDRESS' => 'E-mail',
|
||||
'LBL_SHOP_PANEL' => 'Sklep online',
|
||||
'LBL_SHOP_USER' => 'Użytkownik online',
|
||||
'LBL_PRICEBOOK' => 'Cennik sklepu online',
|
||||
'LBL_ECMQUOTES_SUBPANEL_TITLE' => 'Oferty',
|
||||
'LBL_ECMSALES_SUBPANEL_TITLE' => 'Zamówienia Sprzedaży',
|
||||
'LBL_ECMINVOICEOUTS_SUBPANEL_TITLE' => 'Faktury',
|
||||
'LBL_PANEL_DELIVERY_ADDRESSES' => 'Adresy dostawy',
|
||||
'LBL_ADDRESS_NAME' => 'Nazwa',
|
||||
'LBL_ADDRESS_POSITION' => 'Poz.',
|
||||
'LBL_ADDRESS_STREET' => 'Ulica',
|
||||
'LBL_ADDRESS_CITY' => 'Miasto',
|
||||
'LBL_ADDRESS_POSTALCODE' => 'Kod pocztowy',
|
||||
'LBL_ADDRESS_COUNTRY' => 'Kraj',
|
||||
'LBL_ADDRESS_PHONE' => 'Telefon',
|
||||
'LBL_ADDRESS_FAX' => 'Fax',
|
||||
'LBL_PAYMENTCONDITION_NAME' => 'Warunki płatności',
|
||||
'LBL_DELIVERYCONDITION_NAME' => 'Warunki dostawy',
|
||||
'LBL_PANEL_DISCOUNTS' => 'Upusty',
|
||||
'LBL_PRODUCT_GROUP' => 'Grupa produktów',
|
||||
'LBL_DISCOUNT' => 'Upust (%)',
|
||||
'LBL_TO_VATID' => 'NIP',
|
||||
'LBL_SUPPLIER_CODE' => 'Kod dostawcy',
|
||||
'LBL_ILN' => 'Iln',
|
||||
'LBL_AUTO_INVOICE' => 'Automatycznie wystawiaj FV',
|
||||
'LBL_SAVE_TO_GOOGLE' => 'Zapisz w moich kontaktach Google',
|
||||
'LBL_GOOGLE_ERROR' => 'Brak informacji o koncie Google (Sprawdź ustawienia użytkownika)',
|
||||
'LBL_MAPS' => 'Mapy',
|
||||
'LBL_CURRENCY' => 'Waluta',
|
||||
'LBL_INVOICE_TYPE' => 'Typ faktury',
|
||||
'LBL_PANEL_CATEGORIES' => 'Kategoryzacja',
|
||||
'LBL_CATEGORY_NAME' => 'Nazwa kategori',
|
||||
'LBL_EDITTABLE_OPTIONS' => 'Opc.',
|
||||
'LBL_CATEGORY_ASSIGNED_FILE' => 'Załącznik',
|
||||
//end mz
|
||||
// DON'T CONVERT THESE THEY ARE MAPPINGS
|
||||
'db_name' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'db_website' => 'LBL_LIST_WEBSITE',
|
||||
'db_billing_address_city' => 'LBL_LIST_CITY',
|
||||
// END DON'T CONVERT
|
||||
'LBL_DOCUMENTS_SUBPANEL_TITLE' => 'Dokumenty',
|
||||
// Dashlet Categories
|
||||
'LBL_CHARTS' => 'Wykresy',
|
||||
'LBL_DEFAULT' => 'Widoki',
|
||||
'LBL_MISC' => 'Inne',
|
||||
'LBL_UTILS' => 'Narzędzia',
|
||||
// END Dashlet Categories
|
||||
|
||||
'ACCOUNT_REMOVE_PROJECT_CONFIRM' => 'Czy na pewno chcesz usunąć Kontrahenta z projektu?',
|
||||
'ERR_DELETE_RECORD' => 'Aby usunąć Kontrahenta musisz określić numer rekordu.',
|
||||
'LBL_ACCOUNT_INFORMATION' => 'Szczegóły Kontrahenta',
|
||||
'LBL_ACCOUNT_NAME' => 'Nazwa Kontrahenta:',
|
||||
'LBL_ACCOUNT' => 'Kontrahent:',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE'=>'Wydarzenia',
|
||||
'LBL_ADDRESS_INFORMATION' => 'Informacje adresowe',
|
||||
'LBL_ANNUAL_REVENUE' => 'Roczne dochody:',
|
||||
'LBL_ANY_ADDRESS' => 'Dodatkowy Adres:',
|
||||
'LBL_ANY_EMAIL' => 'Email:',
|
||||
'LBL_ANY_PHONE' => 'Telefon:',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Przydzielony do:',
|
||||
'LBL_ASSIGNED_TO_ID' => 'Przypisany Użytkownik:',
|
||||
'LBL_BILLING_ADDRESS_CITY' => 'Adres korespondencyjny - Miasto:',
|
||||
'LBL_BILLING_ADDRESS_COUNTRY' => 'Adres korespondencyjny - Kraj:',
|
||||
'LBL_BILLING_ADDRESS_POSTALCODE' => 'Adres korespondencyjny - Kod pocztowy:',
|
||||
'LBL_BILLING_ADDRESS_STATE' => 'Adres korespondencyjny - Województwo:',
|
||||
'LBL_BILLING_ADDRESS_STREET_2' =>'Adres korespondencyjny - Ulica 2',
|
||||
'LBL_BILLING_ADDRESS_STREET_3' =>'Adres korespondencyjny - Ulica 3',
|
||||
'LBL_BILLING_ADDRESS_STREET_4' =>'Adres korespondencyjny - Ulica 4',
|
||||
'LBL_BILLING_ADDRESS_STREET' => 'Adres korespondencyjny - Ulica:',
|
||||
'LBL_BILLING_ADDRESS' => 'Adres korespondencyjny:',
|
||||
'LBL_BUG_FORM_TITLE' => 'Kontrahenci',
|
||||
'LBL_BUGS_SUBPANEL_TITLE' => 'Błędy',
|
||||
'LBL_CALLS_SUBPANEL_TITLE' => 'Połączenia telefoniczne',
|
||||
'LBL_CAMPAIGN_ID' => 'ID Kampanii reklamowej',
|
||||
'LBL_CASES_SUBPANEL_TITLE' => 'Zgłoszenia',
|
||||
'LBL_CITY' => 'Miasto:',
|
||||
'LBL_CONTACTS_SUBPANEL_TITLE' => 'Kontakty',
|
||||
'LBL_COUNTRY' => 'Kraj:',
|
||||
'LBL_DATE_ENTERED' => 'Data utworzenia:',
|
||||
'LBL_DATE_MODIFIED' => 'Data modyfikacji:',
|
||||
'LBL_MODIFIED_ID'=>'Zmodyfikowane przez: ',
|
||||
'LBL_DEFAULT_SUBPANEL_TITLE' => 'Kontrahenci',
|
||||
'LBL_DESCRIPTION_INFORMATION' => 'Dodatkowe informacje',
|
||||
'LBL_DESCRIPTION' => 'Opis:',
|
||||
'LBL_DUPLICATE' => 'Znaleziono rekord o podobnych danych',
|
||||
'LBL_EMAIL' => 'E-mail:',
|
||||
'LBL_EMAIL_OPT_OUT' => 'Czy wyłączyć system powiadomień?',
|
||||
'LBL_EMAIL_ADDRESSES' => 'Adresy e-mail',
|
||||
'LBL_EMPLOYEES' => 'Liczba pracowników:',
|
||||
'LBL_FAX' => 'Fax:',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE'=>'Historia',
|
||||
'LBL_HOMEPAGE_TITLE' => 'Moi Kontrahenci',
|
||||
'LBL_INDUSTRY' => 'Branża:',
|
||||
'LBL_INVALID_EMAIL'=>'Niepoprawny adres email',
|
||||
'LBL_INVITEE' => 'Kontakty',
|
||||
'LBL_LEADS_SUBPANEL_TITLE' => 'Potencjalni Klienci',
|
||||
'LBL_LIST_ACCOUNT_NAME' => 'Nazwa Kontrahenta',
|
||||
'LBL_LIST_CITY' => 'Miasto',
|
||||
'LBL_LIST_CONTACT_NAME' => 'Nazwa kontaktu',
|
||||
'LBL_LIST_EMAIL_ADDRESS' => 'Adresy e-mail',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista Kontrahentów',
|
||||
'LBL_LIST_PHONE' => 'Telefon',
|
||||
'LBL_LIST_STATE' => 'Województwo',
|
||||
'LBL_LIST_WEBSITE' => 'Strona WWW',
|
||||
'LBL_MEETINGS_SUBPANEL_TITLE' => 'Spotkania',
|
||||
'LBL_MEMBER_OF' => 'Podlega pod:',
|
||||
'LBL_MEMBER_ORG_FORM_TITLE' => 'Organizacje członkowskie',
|
||||
'LBL_MEMBER_ORG_SUBPANEL_TITLE'=>'Członek organizacji',
|
||||
'LBL_MODULE_NAME' => 'Kontrahenci',
|
||||
'LBL_MODULE_TITLE' => 'Kontrahenci: Strona główna',
|
||||
'LBL_MODULE_ID'=> 'Kontrahenci',
|
||||
'LBL_NAME'=>'Nazwa:',
|
||||
'LBL_NEW_FORM_TITLE' => 'Utwórz Kontrahenta',
|
||||
'LBL_OPPORTUNITIES_SUBPANEL_TITLE' => 'Szanse Sprzedaży',
|
||||
'LBL_OTHER_EMAIL_ADDRESS' => 'Dodatkowy adres email:',
|
||||
'LBL_OTHER_PHONE' => 'Dodatkowy numer telefonu:',
|
||||
'LBL_OWNERSHIP' => 'Właściciel:',
|
||||
'LBL_PARENT_ACCOUNT_ID' => 'ID Kontrahenta nadrzędnego',
|
||||
'LBL_PHONE_ALT' => 'Alternatywny telefon:',
|
||||
'LBL_PHONE_FAX' => 'Fax:',
|
||||
'LBL_PHONE_OFFICE' => 'Telefon do biura:',
|
||||
'LBL_PHONE' => 'Telefon:',
|
||||
'LBL_POSTAL_CODE' => 'Kod pocztowy:',
|
||||
'LBL_PRODUCTS_TITLE'=>'Produkty',
|
||||
'LBL_PROJECTS_SUBPANEL_TITLE' => 'Projekty',
|
||||
'LBL_PUSH_BILLING' => 'Kopiuj adres korespond.',
|
||||
'LBL_PUSH_CONTACTS_BUTTON_LABEL' => 'Kopiuj do kontaktów',
|
||||
'LBL_PUSH_CONTACTS_BUTTON_TITLE' => 'Kopiuj...',
|
||||
'LBL_PUSH_SHIPPING' => 'Kopiuj adres dostawy',
|
||||
'LBL_RATING' => 'Ocena:',
|
||||
'LBL_SAVE_ACCOUNT' => 'Zapisz kontrahenta',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukiwanie kontrahenta',
|
||||
'LBL_SHIPPING_ADDRESS_CITY' => 'Adres dostawy - Miasto:',
|
||||
'LBL_SHIPPING_ADDRESS_COUNTRY' => 'Adres dostawy - Kraj:',
|
||||
'LBL_SHIPPING_ADDRESS_POSTALCODE' => 'Adres dostawy - Kod pocztowy:',
|
||||
'LBL_SHIPPING_ADDRESS_STATE' => 'Adres dostawy - Województwo:',
|
||||
'LBL_SHIPPING_ADDRESS_STREET_2' => 'Adres dostawy - Ulica 2',
|
||||
'LBL_SHIPPING_ADDRESS_STREET_3' => 'Adres dostawy - Ulica 3',
|
||||
'LBL_SHIPPING_ADDRESS_STREET_4' => 'Adres dostawy - Ulica 4',
|
||||
'LBL_SHIPPING_ADDRESS_STREET' => 'Adres dostawy - Ulica:',
|
||||
'LBL_SHIPPING_ADDRESS' => 'Adres dostawy:',
|
||||
'LBL_SIC_CODE' => 'Kod GLN:',
|
||||
'LBL_STATE' => 'Województwo:',
|
||||
'LBL_TASKS_SUBPANEL_TITLE' => 'Zadania',
|
||||
'LBL_TEAMS_LINK'=>'Zespoły',
|
||||
'LBL_TICKER_SYMBOL' => 'Symbol giełdowy:',
|
||||
'LBL_TYPE' => 'Rodzaj Kontrahenta:',
|
||||
'LBL_USERS_ASSIGNED_LINK'=>'Przydzieleni użytkownicy',
|
||||
'LBL_USERS_CREATED_LINK'=>'Utworzone przez użytkowników',
|
||||
'LBL_USERS_MODIFIED_LINK'=>'Zmodyfikowane przez użytkowników',
|
||||
'LBL_VIEW_FORM_TITLE' => 'Podgląd Kontrahenta',
|
||||
'LBL_WEBSITE' => 'Strona WWW:',
|
||||
'LBL_CREATED_ID'=>'Utworzone przez',
|
||||
'LBL_CAMPAIGNS' =>'Kampanie reklamowe',
|
||||
'LNK_ACCOUNT_LIST' => 'Lista kontrahentów',
|
||||
'LNK_NEW_ACCOUNT' => 'Utwórz Kontrahenta',
|
||||
'LNK_IMPORT_ACCOUNTS' => 'Import Kontrahentów',
|
||||
'MSG_DUPLICATE' => 'Kontrahent o podobnych dany już istnieje w systemie. Lista z podobnymi danymi znajduje się poniżej.<br>Kliknij przycisk Zapisz, aby kontynuować tworzenie, lub przycisk Anuluj lub przycisk Anuluj aby przerwać tworzenie.',
|
||||
'MSG_SHOW_DUPLICATES' => 'Kontrahent o podobnych dany już istnieje w systemie. Lista z podobnymi danymi znajduje się poniżej.<br>Kliknij przycisk Zapisz, aby kontynuować tworzenie nowego Kontrahenta, lub przycisk Anuluj aby przerwać tworzenie.',
|
||||
'NTC_COPY_BILLING_ADDRESS' => 'Kopiuj adres Korespondencyjny do adresu Wysyłki',
|
||||
'NTC_COPY_BILLING_ADDRESS2' => 'Kopiuj do adresu wysyłki',
|
||||
'NTC_COPY_SHIPPING_ADDRESS' => 'Kopiuj adres wysyłki do adresu Korespondencyjnego',
|
||||
'NTC_COPY_SHIPPING_ADDRESS2' => 'Kopiuj do adresu Korespondencyjnego',
|
||||
'NTC_DELETE_CONFIRMATION' => 'Czy na pewno chcesz usunąć ten rekord?',
|
||||
'NTC_REMOVE_ACCOUNT_CONFIRMATION' => 'Czy na pewno chcesz usunąć ten rekord?',
|
||||
'NTC_REMOVE_MEMBER_ORG_CONFIRMATION' => 'Czy na pewno chcesz usunąć informacje o członkostwie?',
|
||||
'LBL_ASSIGNED_USER_NAME' => 'Przypisane do:',
|
||||
'LBL_PROSPECT_LIST' => 'Grupy docelowe',
|
||||
'LBL_ACCOUNTS_SUBPANEL_TITLE'=>'Kontrahenci',
|
||||
'LBL_PROJECT_SUBPANEL_TITLE' => 'Projekty',
|
||||
'LBL_COPY' => 'Kopiuj' /*for 508 compliance fix*/,
|
||||
//For export labels
|
||||
'LBL_ACCOUNT_TYPE' => 'Rodzaj Kontrahenta',
|
||||
'LBL_CAMPAIGN_ID' => 'ID Kampanii reklamowej',
|
||||
'LBL_PARENT_ID' => 'Identyfikator rodzica',
|
||||
'LBL_PHONE_ALTERNATE' => 'Alternatywny telefon',
|
||||
'LBL_EXPORT_ASSIGNED_USER_NAME' => 'Przydzielony do Użytkownika',
|
||||
// SNIP
|
||||
'LBL_CONTACT_HISTORY_SUBPANEL_TITLE' => 'Powiązane Kontakty \ Wiadomości e-mail',
|
||||
'LBL_ECMPAYMENTS_PANEL' => 'Rozrachunki',
|
||||
);
|
||||
?>
|
||||
43
modules/Accounts/language/showMap.js
Normal file
43
modules/Accounts/language/showMap.js
Normal file
@@ -0,0 +1,43 @@
|
||||
$(document)
|
||||
.ready(
|
||||
function() {
|
||||
var mapProp = {
|
||||
center : new google.maps.LatLng(52.05, 19.45),
|
||||
zoom : 6,
|
||||
mapTypeId : google.maps.MapTypeId.ROADMAP
|
||||
};
|
||||
var map = new google.maps.Map(document
|
||||
.getElementById("googleMapContainer"), mapProp);
|
||||
|
||||
var markers = JSON.parse(b64_to_utf8($('#googleMapMarkers')
|
||||
.val()));
|
||||
$.each(markers, function(index, m) {
|
||||
var marker = new google.maps.Marker({
|
||||
position : new google.maps.LatLng(m.lat, m.lng),
|
||||
url : '/',
|
||||
animation : google.maps.Animation.DROP,
|
||||
customInfo : m.info,
|
||||
title : m.title,
|
||||
map : map
|
||||
});
|
||||
google.maps.event.addListener(marker, 'click',
|
||||
markerClickFunction);
|
||||
});
|
||||
|
||||
function markerClickFunction() {
|
||||
infowindow = new google.maps.InfoWindow({
|
||||
content : this.customInfo
|
||||
});
|
||||
infowindow.open(map, this);
|
||||
closeInfoWindow(infowindow);
|
||||
}
|
||||
function closeInfoWindow(infoWindow) {
|
||||
setTimeout(function() {
|
||||
infoWindow.close();
|
||||
}, 8000);
|
||||
}
|
||||
});
|
||||
|
||||
function b64_to_utf8(str) {
|
||||
return decodeURIComponent(escape(window.atob(str)));
|
||||
}
|
||||
86
modules/Accounts/metadata/SearchFields.php
Normal file
86
modules/Accounts/metadata/SearchFields.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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['Accounts'] =
|
||||
array (
|
||||
'name' => array( 'query_type'=>'default'),
|
||||
'account_type'=> array('query_type'=>'default', 'options' => 'account_type_dom', 'template_var' => 'ACCOUNT_TYPE_OPTIONS'),
|
||||
'industry'=> array('query_type'=>'default', 'options' => 'industry_dom', 'template_var' => 'INDUSTRY_OPTIONS'),
|
||||
'annual_revenue'=> array('query_type'=>'default'),
|
||||
'address_street'=> array('query_type'=>'default','db_field'=>array('billing_address_street','shipping_address_street')),
|
||||
'address_city'=> array('query_type'=>'default','db_field'=>array('billing_address_city','shipping_address_city'), 'vname' =>'LBL_CITY'),
|
||||
'address_state'=> array('query_type'=>'default','db_field'=>array('billing_address_state','shipping_address_state'), 'vname' =>'LBL_STATE'),
|
||||
'address_postalcode'=> array('query_type'=>'default','db_field'=>array('billing_address_postalcode','shipping_address_postalcode'), 'vname' =>'LBL_POSTAL_CODE'),
|
||||
'address_country'=> array('query_type'=>'default','db_field'=>array('billing_address_country','shipping_address_country'), 'vname' =>'LBL_COUNTRY'),
|
||||
'rating'=> array('query_type'=>'default'),
|
||||
'phone'=> array('query_type'=>'default','db_field'=>array('phone_office'),'vname' =>'LBL_ANY_PHONE'),
|
||||
'email'=> array(
|
||||
'query_type' => 'default',
|
||||
'operator' => 'subquery',
|
||||
'subquery' => 'SELECT eabr.bean_id FROM email_addr_bean_rel eabr JOIN email_addresses ea ON (ea.id = eabr.email_address_id) WHERE eabr.deleted=0 AND ea.email_address LIKE',
|
||||
'db_field' => array(
|
||||
'id',
|
||||
),
|
||||
'vname' =>'LBL_ANY_EMAIL',
|
||||
),
|
||||
'category_name'=> array(
|
||||
'query_type' => 'default',
|
||||
'operator' => 'subquery',
|
||||
'subquery' => 'SELECT b2.bean_id FROM ecmaccountcategories_bean as b2
|
||||
join ecmaccountcategories as c2 on(b2.ecmaccountcategory_id=c2.id) where b2.bean_name="Accounts" AND b2.bean_id!="" and c2.name like',
|
||||
'db_field' => array(
|
||||
'id',
|
||||
),
|
||||
'vname' =>'LBL_ANY_EMAIL',
|
||||
),
|
||||
'website'=> array('query_type'=>'default'),
|
||||
'ownership'=> array('query_type'=>'default'),
|
||||
'employees'=> array('query_type'=>'default'),
|
||||
'sic_code'=> array('query_type'=>'default'),
|
||||
'ticker_symbol'=> array('query_type'=>'default'),
|
||||
'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'),
|
||||
//Range Search Support
|
||||
'range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'start_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'end_range_date_entered' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'start_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
'end_range_date_modified' => array ('query_type' => 'default', 'enable_range_search' => true, 'is_date_field' => true),
|
||||
//Range Search Support
|
||||
);
|
||||
?>
|
||||
61
modules/Accounts/metadata/acldefs.php
Normal file
61
modules/Accounts/metadata/acldefs.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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['Accounts'] = 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',
|
||||
),
|
||||
);
|
||||
?>
|
||||
84
modules/Accounts/metadata/additionalDetails.php
Normal file
84
modules/Accounts/metadata/additionalDetails.php
Normal file
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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 additionalDetailsAccount($fields) {
|
||||
static $mod_strings;
|
||||
global $app_strings;
|
||||
if(empty($mod_strings)) {
|
||||
global $current_language;
|
||||
$mod_strings = return_module_language($current_language, 'Accounts');
|
||||
}
|
||||
$overlib_string = '';
|
||||
|
||||
if(!empty($fields['BILLING_ADDRESS_STREET']) || !empty($fields['BILLING_ADDRESS_CITY']) ||
|
||||
!empty($fields['BILLING_ADDRESS_STATE']) || !empty($fields['BILLING_ADDRESS_POSTALCODE']) ||
|
||||
!empty($fields['BILLING_ADDRESS_COUNTRY']))
|
||||
$overlib_string .= '<b>' . $mod_strings['LBL_BILLING_ADDRESS'] . '</b><br>';
|
||||
if(!empty($fields['BILLING_ADDRESS_STREET'])) $overlib_string .= $fields['BILLING_ADDRESS_STREET'] . '<br>';
|
||||
if(!empty($fields['BILLING_ADDRESS_STREET_2'])) $overlib_string .= $fields['BILLING_ADDRESS_STREET_2'] . '<br>';
|
||||
if(!empty($fields['BILLING_ADDRESS_STREET_3'])) $overlib_string .= $fields['BILLING_ADDRESS_STREET_3'] . '<br>';
|
||||
if(!empty($fields['BILLING_ADDRESS_STREET_4'])) $overlib_string .= $fields['BILLING_ADDRESS_STREET_4'] . '<br>';
|
||||
if(!empty($fields['BILLING_ADDRESS_CITY'])) $overlib_string .= $fields['BILLING_ADDRESS_CITY'] . ', ';
|
||||
if(!empty($fields['BILLING_ADDRESS_STATE'])) $overlib_string .= $fields['BILLING_ADDRESS_STATE'] . ' ';
|
||||
if(!empty($fields['BILLING_ADDRESS_POSTALCODE'])) $overlib_string .= $fields['BILLING_ADDRESS_POSTALCODE'] . ' ';
|
||||
if(!empty($fields['BILLING_ADDRESS_COUNTRY'])) $overlib_string .= $fields['BILLING_ADDRESS_COUNTRY'] . '<br>';
|
||||
|
||||
if(strlen($overlib_string) > 0 && !(strrpos($overlib_string, '<br>') == strlen($overlib_string) - 4))
|
||||
$overlib_string .= '<br>';
|
||||
|
||||
if(!empty($fields['PHONE_FAX'])) $overlib_string .= '<b>'. $mod_strings['LBL_FAX'] . '</b> <span class="phone">' . $fields['PHONE_FAX'] . '</span><br>';
|
||||
if(!empty($fields['PHONE_ALTERNATE'])) $overlib_string .= '<b>'. $mod_strings['LBL_OTHER_PHONE'] . '</b> <span class="phone">' . $fields['PHONE_ALTERNATE'] . '</span><br>';
|
||||
if(!empty($fields['WEBSITE']))
|
||||
$overlib_string .= '<a target=_blank href=http://'. $fields['WEBSITE'] . '>' . $fields['WEBSITE'] . '</a><br>';
|
||||
if(!empty($fields['INDUSTRY'])) $overlib_string .= '<b>'. $mod_strings['LBL_INDUSTRY'] . '</b> ' . $fields['INDUSTRY'] . '<br>';
|
||||
if(!empty($fields['DESCRIPTION'])) {
|
||||
$overlib_string .= '<b>'. $mod_strings['LBL_DESCRIPTION'] . '</b> ' . 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=Accounts&return_module=Accounts&record={$fields['ID']}",
|
||||
'viewLink' => "index.php?action=DetailView&module=Accounts&return_module=Accounts&record={$fields['ID']}");
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
364
modules/Accounts/metadata/detailviewdefs.php
Normal file
364
modules/Accounts/metadata/detailviewdefs.php
Normal file
@@ -0,0 +1,364 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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['Accounts']['DetailView'] = array(
|
||||
'templateMeta' => array('form' => array('buttons'=>array(
|
||||
0 => 'EDIT',
|
||||
1 => 'DUPLICATE',
|
||||
2 => 'DELETE',
|
||||
3 => 'FIND_DUPLICATES',
|
||||
4 => array (
|
||||
'customCode' => '<input type="submit" name="save" class="button" value="{$LBL_SAVE_TO_GOOGLE}" onclick="AddGoogleContact(); return;" />'
|
||||
),
|
||||
5 => array (
|
||||
'customCode' => '{$MOVE}'
|
||||
)
|
||||
|
||||
)),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'includes'=> array(
|
||||
array('file'=>'modules/Accounts/Account.js'),
|
||||
array('file'=>'modules/Accounts/AccountDetailView.js'),
|
||||
),
|
||||
),
|
||||
'panels' =>
|
||||
array (
|
||||
'lbl_account_information' =>
|
||||
array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'name',
|
||||
'comment' => 'Name of the Company',
|
||||
'label' => 'LBL_NAME',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'enableConnectors' => true,
|
||||
'module' => 'Accounts',
|
||||
'connectors' =>
|
||||
array (
|
||||
0 => 'ext_rest_linkedin',
|
||||
),
|
||||
),
|
||||
),
|
||||
array (
|
||||
'name' => 'phone_office',
|
||||
'comment' => 'The office phone number',
|
||||
'label' => 'LBL_PHONE_OFFICE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'website',
|
||||
'type' => 'link',
|
||||
'label' => 'LBL_WEBSITE',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'link_target' => '_blank',
|
||||
),
|
||||
),
|
||||
array (
|
||||
'name' => 'phone_fax',
|
||||
'comment' => 'The fax phone number of this company',
|
||||
'label' => 'LBL_FAX',
|
||||
),
|
||||
),
|
||||
|
||||
array ('to_vatid', 'ecmpaymentcondition_name'),
|
||||
array(
|
||||
'vat_payer',
|
||||
'natural_person'
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'billing_address_street',
|
||||
'label' => 'LBL_BILLING_ADDRESS',
|
||||
'type' => 'address',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'key' => 'billing',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'shipping_address_street',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS',
|
||||
'type' => 'address',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'key' => 'shipping',
|
||||
),
|
||||
),
|
||||
),
|
||||
array ('maps'),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'email1',
|
||||
'studio' => 'false',
|
||||
'label' => 'LBL_EMAIL',
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'description',
|
||||
'comment' => 'Full text of the note',
|
||||
'label' => 'LBL_DESCRIPTION',
|
||||
),
|
||||
'priority',
|
||||
),
|
||||
array (
|
||||
'ecmprice_name',
|
||||
),
|
||||
|
||||
),
|
||||
'LBL_SHOP_PANEL' => array (
|
||||
array(
|
||||
'shop_user',
|
||||
'ecmpricebook_name',
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
'LBL_ECMPAYMENTS_PANEL' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'saldo_nierozliczone',
|
||||
'customCode' => '{$SUMN}',
|
||||
),
|
||||
array (
|
||||
'name' => 'saldo_razem',
|
||||
'customCode' => '{$SUMR}',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array (
|
||||
'name' => 'url_links_e',
|
||||
'customCode' => '{$URL_ECMPAY}',
|
||||
),
|
||||
),
|
||||
),
|
||||
'LBL_PANEL_DELIVERY_ADDRESSES' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '{$POSITIONS}',
|
||||
),
|
||||
|
||||
),
|
||||
),
|
||||
'LBL_PANEL_ADVANCED' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'account_type',
|
||||
'comment' => 'The Company is of this type',
|
||||
'label' => 'LBL_TYPE',
|
||||
),
|
||||
array (
|
||||
'name' => 'industry',
|
||||
'comment' => 'The company belongs in this industry',
|
||||
'label' => 'LBL_INDUSTRY',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'annual_revenue',
|
||||
'comment' => 'Annual revenue for this company',
|
||||
'label' => 'LBL_ANNUAL_REVENUE',
|
||||
),
|
||||
array (
|
||||
'name' => 'employees',
|
||||
'comment' => 'Number of employees, varchar to accomodate for both number (100) or range (50-100)',
|
||||
'label' => 'LBL_EMPLOYEES',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'sic_code',
|
||||
'comment' => 'SIC code of the account',
|
||||
'label' => 'LBL_SIC_CODE',
|
||||
),
|
||||
array (
|
||||
'name' => 'ticker_symbol',
|
||||
'comment' => 'The stock trading (ticker) symbol for the company',
|
||||
'label' => 'LBL_TICKER_SYMBOL',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_name',
|
||||
'label' => 'LBL_MEMBER_OF',
|
||||
),
|
||||
array (
|
||||
'name' => 'ownership',
|
||||
'comment' => '',
|
||||
'label' => 'LBL_OWNERSHIP',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
'campaign_name',
|
||||
|
||||
array (
|
||||
'name' => 'rating',
|
||||
'comment' => 'An arbitrary rating for this company for use in comparisons with others',
|
||||
'label' => 'LBL_RATING',
|
||||
),
|
||||
),
|
||||
array (
|
||||
'shop_number',
|
||||
'ecmdeliverycondition_name',
|
||||
),
|
||||
array (
|
||||
'supplier_code',
|
||||
'iln',
|
||||
),
|
||||
|
||||
array (
|
||||
'krs',
|
||||
'regon',
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'currency_id','label'=>'LBL_CURRENCY'), '',
|
||||
),
|
||||
),
|
||||
'LBL_PANEL_DISCOUNTS' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '{$POSITIONS2}',
|
||||
),
|
||||
),
|
||||
),
|
||||
'LBL_PANEL_CATEGORIES' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '{$POSITIONS3}',
|
||||
),
|
||||
),
|
||||
),
|
||||
'LBL_PANEL_MAILINGGROUPS' =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
0 =>
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '{$POSITIONS55}',
|
||||
),
|
||||
),
|
||||
),
|
||||
'LBL_PANEL_DOC_SETTINGS' => array (
|
||||
array (
|
||||
'invoice_to_ownership',
|
||||
'document_delivery_address',
|
||||
),
|
||||
array (
|
||||
'document_recipient_code',
|
||||
'document_parent_order_no',
|
||||
),
|
||||
array (
|
||||
'auto_invoice',
|
||||
'invoice_type',
|
||||
),
|
||||
array (
|
||||
'document_parent_iln',
|
||||
'document_shipping_iln',
|
||||
),
|
||||
array (
|
||||
'document_parent_code',
|
||||
'document_ean',
|
||||
),
|
||||
array (
|
||||
'document_parent_nip',
|
||||
'document_shipping_nip'
|
||||
),
|
||||
array(
|
||||
'document_bank_account', ''
|
||||
),
|
||||
),
|
||||
'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}',
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
?>
|
||||
371
modules/Accounts/metadata/editviewdefs.php
Normal file
371
modules/Accounts/metadata/editviewdefs.php
Normal file
@@ -0,0 +1,371 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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 ['Accounts'] ['EditView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'buttons' => array (
|
||||
0 => array (
|
||||
'customCode' => '<input type="submit" name="save" class="button" value="{$LBL_SAVE}" onclick="saveItems(true);saveItems2(true);saveItems3(true);saveItems55(true);this.form.action.value=\'Save\';return check_form(\'EditView\');" />'
|
||||
),
|
||||
1 => 'CANCEL'
|
||||
)
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
'includes' => array (
|
||||
array (
|
||||
'file' => 'modules/Accounts/Account.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Accounts/MailingGroups.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'include/JSON.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Accounts/Addresses.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Accounts/Discounts.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Accounts/Categories.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Accounts/MyTable.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'modules/Accounts/paramsMT.js'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'panels' => array (
|
||||
|
||||
'lbl_account_information' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'name',
|
||||
'label' => 'LBL_NAME',
|
||||
'displayParams' => array (
|
||||
'required' => true
|
||||
)
|
||||
),
|
||||
array (
|
||||
'name' => 'phone_office',
|
||||
'label' => 'LBL_PHONE_OFFICE'
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'website',
|
||||
'type' => 'link',
|
||||
'label' => 'LBL_WEBSITE'
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'phone_fax',
|
||||
'label' => 'LBL_FAX'
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
'to_vatid',
|
||||
'ecmpaymentcondition_name'
|
||||
),
|
||||
array(
|
||||
'vat_payer',
|
||||
'natural_person'
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'billing_address_street',
|
||||
'hideLabel' => true,
|
||||
'type' => 'address',
|
||||
'displayParams' => array (
|
||||
'key' => 'billing',
|
||||
'rows' => 2,
|
||||
'cols' => 30,
|
||||
'maxlength' => 150
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
'name' => 'shipping_address_street',
|
||||
'hideLabel' => true,
|
||||
'type' => 'address',
|
||||
'displayParams' => array (
|
||||
'key' => 'shipping',
|
||||
'copy' => 'billing',
|
||||
'rows' => 2,
|
||||
'cols' => 30,
|
||||
'maxlength' => 150
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'email1',
|
||||
'studio' => 'false',
|
||||
'label' => 'LBL_EMAIL'
|
||||
)
|
||||
),
|
||||
|
||||
array (
|
||||
|
||||
array (
|
||||
'name' => 'description',
|
||||
'label' => 'LBL_DESCRIPTION'
|
||||
),
|
||||
'priority'
|
||||
),
|
||||
array (
|
||||
'ecmprice_name'
|
||||
)
|
||||
),
|
||||
'LBL_SHOP_PANEL' => array (
|
||||
array (
|
||||
'shop_user',
|
||||
'ecmpricebook_name'
|
||||
)
|
||||
),
|
||||
'LBL_PANEL_DELIVERY_ADDRESSES' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '
|
||||
<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>
|
||||
<link rel="stylesheet" type="text/css" href="modules/Accounts/MyTable.css" />
|
||||
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV">
|
||||
<table class="positions" style="width:100%;" id="itemsTable">
|
||||
<thead id="head">
|
||||
<tr id="tr">
|
||||
<td width="3%">{$MOD.LBL_ADDRESS_POSITION}</td>
|
||||
<td width="8%">{$MOD.LBL_ADDRESS_NAME}</td>
|
||||
<td width="20%">{$MOD.LBL_ADDRESS_STREET}</td>
|
||||
<td width="10%">{$MOD.LBL_ADDRESS_CITY}</td>
|
||||
<td width="10%">{$MOD.LBL_ADDRESS_POSTALCODE}</td>
|
||||
<td width="10%">{$MOD.LBL_ADDRESS_COUNTRY}</td>
|
||||
<td width="10%">{$MOD.LBL_ADDRESS_PHONE}</td>
|
||||
<td width="10%">{$MOD.LBL_ADDRESS_FAX}</td>
|
||||
<td width="10%"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div><br>'
|
||||
)
|
||||
)
|
||||
),
|
||||
'LBL_PANEL_ADVANCED' => array (
|
||||
|
||||
array (
|
||||
'account_type',
|
||||
'industry'
|
||||
),
|
||||
|
||||
array (
|
||||
'annual_revenue',
|
||||
'employees'
|
||||
),
|
||||
|
||||
array (
|
||||
'sic_code',
|
||||
'ticker_symbol'
|
||||
),
|
||||
|
||||
array (
|
||||
'parent_name',
|
||||
'ownership'
|
||||
),
|
||||
|
||||
array (
|
||||
'campaign_name',
|
||||
'rating'
|
||||
),
|
||||
array (
|
||||
'shop_number',
|
||||
'ecmdeliverycondition_name'
|
||||
),
|
||||
array (
|
||||
'supplier_code',
|
||||
'iln'
|
||||
),
|
||||
array (
|
||||
'krs',
|
||||
'regon',
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'currency_id',
|
||||
'label' => 'LBL_CURRENCY'
|
||||
),
|
||||
''
|
||||
)
|
||||
),
|
||||
'LBL_PANEL_DISCOUNTS' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '
|
||||
<input type="hidden" name="position_list2" id="position_list2" value=\'{$POSITION_LIST2}\'>
|
||||
<link rel="stylesheet" type="text/css" href="modules/Accounts/MyTable.css" />
|
||||
<div style="width:30%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV2">
|
||||
<table class="positions" style="width:100%;" id="itemsTable2">
|
||||
<thead id="head">
|
||||
<tr id="tr">
|
||||
<td width="70%">{$MOD.LBL_PRODUCT_GROUP}</td>
|
||||
<td width="20%">{$MOD.LBL_DISCOUNT}</td>
|
||||
<td width="10%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div><br>'
|
||||
)
|
||||
)
|
||||
),
|
||||
'LBL_PANEL_CATEGORIES' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '
|
||||
<input type="hidden" name="position_list3" id="position_list3" value=\'{$POSITION_LIST3}\'>
|
||||
<link rel="stylesheet" type="text/css" href="modules/Accounts/MyTable.css" />
|
||||
<div style="width:30%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV3">
|
||||
<table class="positions" style="width:100%;" id="itemsTable3">
|
||||
<thead id="head">
|
||||
<tr id="tr">
|
||||
<td width="90%">{$MOD.LBL_CATEGORY_NAME}</td>
|
||||
<td width="10%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div><br>'
|
||||
)
|
||||
)
|
||||
),
|
||||
'LBL_PANEL_MAILINGGROUPS' => array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '
|
||||
<input type="hidden" name="position_list55" id="position_list55" value=\'{$POSITION_LIST55}\'>
|
||||
<link rel="stylesheet" type="text/css" href="modules/Accounts/MyTable.css" />
|
||||
<div style="width:30%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV2">
|
||||
<table class="positions" style="width:100%;" id="itemsTable55">
|
||||
<thead id="head">
|
||||
<tr id="tr">
|
||||
<td width="70%">{$MOD.LBL_MAILINGGROUP_NAME}</td>
|
||||
<td width="20%">{$MOD.LBL_MAILINGGROUP_AVAILABLE}</td>
|
||||
<td width="10%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div><br>'
|
||||
)
|
||||
)
|
||||
),
|
||||
'LBL_PANEL_DOC_SETTINGS' => array (
|
||||
array (
|
||||
'invoice_to_ownership',
|
||||
'document_delivery_address'
|
||||
),
|
||||
array (
|
||||
'document_recipient_code',
|
||||
'document_parent_order_no'
|
||||
),
|
||||
array (
|
||||
'auto_invoice',
|
||||
'invoice_type'
|
||||
),
|
||||
array (
|
||||
'document_parent_iln',
|
||||
'document_shipping_iln'
|
||||
),
|
||||
array (
|
||||
'document_parent_nip',
|
||||
'document_shipping_nip'
|
||||
),
|
||||
array (
|
||||
'document_parent_code',
|
||||
'document_ean'
|
||||
),
|
||||
array (
|
||||
'document_bank_account'
|
||||
)
|
||||
),
|
||||
'LBL_PANEL_ASSIGNMENT' => array (
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'label' => 'LBL_ASSIGNED_TO'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
38
modules/Accounts/metadata/fieldGroups.php
Normal file
38
modules/Accounts/metadata/fieldGroups.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
?>
|
||||
208
modules/Accounts/metadata/listviewdefs.php
Normal file
208
modules/Accounts/metadata/listviewdefs.php
Normal file
@@ -0,0 +1,208 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'Not A Valid Entry Point' );
|
||||
/**
|
||||
* *******************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc.
|
||||
* Copyright (C) 2004-2013 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 ['Accounts'] = array (
|
||||
'NAME' => array (
|
||||
'width' => '20%',
|
||||
'label' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'link' => true,
|
||||
'default' => true
|
||||
),
|
||||
'PRIORITY' => array (
|
||||
'width' => '5%',
|
||||
'label' => 'LBL_PRIORITY',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
),
|
||||
'BILLING_ADDRESS_CITY' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_LIST_CITY',
|
||||
'default' => true
|
||||
),
|
||||
'BILLING_ADDRESS_COUNTRY' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_COUNTRY',
|
||||
'default' => true
|
||||
),
|
||||
'SHOP_NUMBER' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_SHOP_NUMBER',
|
||||
'default' => true
|
||||
),
|
||||
'WEBSITE' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_LIST_WEBSITE',
|
||||
'default' => true,
|
||||
'customCode'=>' <a href="http://{$WEBSITE}" target="_blank">{$WEBSITE}</a>'
|
||||
),
|
||||
'PHONE_OFFICE' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_LIST_PHONE',
|
||||
'default' => true
|
||||
),
|
||||
'EMAIL1' =>
|
||||
array(
|
||||
'width' => '14%',
|
||||
'label' => 'LBL_EMAIL_ADDRESS',
|
||||
'sortable' => false,
|
||||
'link' => true,
|
||||
'customCode' => '{$EMAIL1_LINK}{$EMAIL1}</a>',
|
||||
'default' => true
|
||||
),
|
||||
'ASSIGNED_USER_NAME' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'module' => 'Employees',
|
||||
'id' => 'ASSIGNED_USER_ID',
|
||||
'default' => true
|
||||
),
|
||||
'ACCOUNT_TYPE' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_TYPE',
|
||||
'default' => false
|
||||
),
|
||||
'INDUSTRY' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_INDUSTRY',
|
||||
'default' => false
|
||||
),
|
||||
'ANNUAL_REVENUE' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_ANNUAL_REVENUE',
|
||||
'default' => false
|
||||
),
|
||||
'PHONE_FAX' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_PHONE_FAX',
|
||||
'default' => false
|
||||
),
|
||||
'BILLING_ADDRESS_STREET' => array (
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_BILLING_ADDRESS_STREET',
|
||||
'default' => false
|
||||
),
|
||||
'BILLING_ADDRESS_STATE' => array (
|
||||
'width' => '7%',
|
||||
'label' => 'LBL_BILLING_ADDRESS_STATE',
|
||||
'default' => false
|
||||
),
|
||||
'BILLING_ADDRESS_POSTALCODE' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_BILLING_ADDRESS_POSTALCODE',
|
||||
'default' => false
|
||||
),
|
||||
'SHIPPING_ADDRESS_STREET' => array (
|
||||
'width' => '15%',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_STREET',
|
||||
'default' => false
|
||||
),
|
||||
'SHIPPING_ADDRESS_CITY' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_CITY',
|
||||
'default' => false
|
||||
),
|
||||
'SHIPPING_ADDRESS_STATE' => array (
|
||||
'width' => '7%',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_STATE',
|
||||
'default' => false
|
||||
),
|
||||
'SHIPPING_ADDRESS_POSTALCODE' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_POSTALCODE',
|
||||
'default' => false
|
||||
),
|
||||
'SHIPPING_ADDRESS_COUNTRY' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_COUNTRY',
|
||||
'default' => false
|
||||
),
|
||||
'RATING' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_RATING',
|
||||
'default' => false
|
||||
),
|
||||
'PHONE_ALTERNATE' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_OTHER_PHONE',
|
||||
'default' => false
|
||||
),
|
||||
'OWNERSHIP' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_OWNERSHIP',
|
||||
'default' => false
|
||||
),
|
||||
'EMPLOYEES' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_EMPLOYEES',
|
||||
'default' => false
|
||||
),
|
||||
'SIC_CODE' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_SIC_CODE',
|
||||
'default' => false
|
||||
),
|
||||
'TICKER_SYMBOL' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_TICKER_SYMBOL',
|
||||
'default' => false
|
||||
),
|
||||
'DATE_MODIFIED' => array (
|
||||
'width' => '5%',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
'default' => false
|
||||
),
|
||||
'CREATED_BY_NAME' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_CREATED',
|
||||
'default' => false
|
||||
),
|
||||
'MODIFIED_BY_NAME' => array (
|
||||
'width' => '10%',
|
||||
'label' => 'LBL_MODIFIED',
|
||||
'default' => false
|
||||
),
|
||||
'DATE_ENTERED' => array (
|
||||
'width' => '5%',
|
||||
'label' => 'LBL_DATE_ENTERED',
|
||||
'default' => true
|
||||
)
|
||||
);
|
||||
?>
|
||||
52
modules/Accounts/metadata/metafiles.php
Normal file
52
modules/Accounts/metadata/metafiles.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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['Accounts'] = array(
|
||||
'detailviewdefs' => 'modules/Accounts/metadata/detailviewdefs.php',
|
||||
'editviewdefs' => 'modules/Accounts/metadata/editviewdefs.php',
|
||||
'listviewdefs' => 'modules/Accounts/metadata/listviewdefs.php',
|
||||
'searchdefs' => 'modules/Accounts/metadata/searchdefs.php',
|
||||
'popupdefs' => 'modules/Accounts/metadata/popupdefs.php',
|
||||
'searchfields' => 'modules/Accounts/metadata/SearchFields.php',
|
||||
|
||||
);
|
||||
?>
|
||||
163
modules/Accounts/metadata/popupdefs.php
Normal file
163
modules/Accounts/metadata/popupdefs.php
Normal file
@@ -0,0 +1,163 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'Not A Valid Entry Point' );
|
||||
/**
|
||||
* *******************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc.
|
||||
* Copyright (C) 2004-2013 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' => 'Account',
|
||||
'varName' => 'ACCOUNT',
|
||||
'orderBy' => 'name',
|
||||
'whereClauses' => array (
|
||||
'name' => 'accounts.name',
|
||||
'billing_address_city' => 'accounts.billing_address_city',
|
||||
'phone_office' => 'accounts.phone_office',
|
||||
'shop_number' => 'accounts.shop_number'
|
||||
),
|
||||
'searchInputs' => array (
|
||||
'name',
|
||||
'billing_address_city',
|
||||
'phone_office',
|
||||
'shop_number'
|
||||
),
|
||||
'create' => array (
|
||||
'formBase' => 'AccountFormBase.php',
|
||||
'formBaseClass' => 'AccountFormBase',
|
||||
'getFormBodyParams' => array (
|
||||
'',
|
||||
'',
|
||||
'AccountSave'
|
||||
),
|
||||
'createButton' => 'LNK_NEW_ACCOUNT'
|
||||
),
|
||||
'listviewdefs' => array (
|
||||
'NAME' => array (
|
||||
'width' => '40',
|
||||
'label' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'link' => true,
|
||||
'default' => true
|
||||
),
|
||||
'SHOP_NUMBER' => array (
|
||||
'width' => '15',
|
||||
'label' => 'LBL_SHOP_NUMBER',
|
||||
'link' => false,
|
||||
'default' => true
|
||||
),
|
||||
'BILLING_ADDRESS_STREET' => array (
|
||||
'width' => '10',
|
||||
'label' => 'LBL_BILLING_ADDRESS_STREET',
|
||||
'default' => false
|
||||
),
|
||||
'BILLING_ADDRESS_CITY' => array (
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_CITY',
|
||||
'default' => true
|
||||
),
|
||||
'BILLING_ADDRESS_STATE' => array (
|
||||
'width' => '7',
|
||||
'label' => 'LBL_STATE',
|
||||
'default' => false
|
||||
),
|
||||
'BILLING_ADDRESS_COUNTRY' => array (
|
||||
'width' => '10',
|
||||
'label' => 'LBL_COUNTRY',
|
||||
'default' => false
|
||||
),
|
||||
'BILLING_ADDRESS_POSTALCODE' => array (
|
||||
'width' => '10',
|
||||
'label' => 'LBL_BILLING_ADDRESS_POSTALCODE',
|
||||
'default' => false
|
||||
),
|
||||
'SHIPPING_ADDRESS_STREET' => array (
|
||||
'width' => '10',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_STREET',
|
||||
'default' => false
|
||||
),
|
||||
'SHIPPING_ADDRESS_CITY' => array (
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_CITY',
|
||||
'default' => false
|
||||
),
|
||||
'SHIPPING_ADDRESS_STATE' => array (
|
||||
'width' => '7',
|
||||
'label' => 'LBL_STATE',
|
||||
'default' => false
|
||||
),
|
||||
'SHIPPING_ADDRESS_COUNTRY' => array (
|
||||
'width' => '10',
|
||||
'label' => 'LBL_COUNTRY',
|
||||
'default' => false
|
||||
),
|
||||
'SHIPPING_ADDRESS_POSTALCODE' => array (
|
||||
'width' => '10',
|
||||
'label' => 'LBL_SHIPPING_ADDRESS_POSTALCODE',
|
||||
'default' => false
|
||||
),
|
||||
'ASSIGNED_USER_NAME' => array (
|
||||
'width' => '2',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true
|
||||
),
|
||||
'PHONE_OFFICE' => array (
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_PHONE',
|
||||
'default' => false
|
||||
)
|
||||
),
|
||||
'searchdefs' => array (
|
||||
'name',
|
||||
'billing_address_city',
|
||||
'billing_address_state',
|
||||
'billing_address_country',
|
||||
'email',
|
||||
array (
|
||||
'name' => 'assigned_user_id',
|
||||
'label' => 'LBL_ASSIGNED_TO',
|
||||
'type' => 'enum',
|
||||
'function' => array (
|
||||
'name' => 'get_user_array',
|
||||
'params' => array (
|
||||
false
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
126
modules/Accounts/metadata/quickcreatedefs.php
Normal file
126
modules/Accounts/metadata/quickcreatedefs.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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 ['Accounts'] =
|
||||
array (
|
||||
'QuickCreate' =>
|
||||
array (
|
||||
'templateMeta' =>
|
||||
array (
|
||||
'form' =>
|
||||
array (
|
||||
'buttons' =>
|
||||
array (
|
||||
'SAVE',
|
||||
'CANCEL',
|
||||
),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' =>
|
||||
array (
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
array (
|
||||
'file' => 'modules/Accounts/Account.js',
|
||||
),
|
||||
),
|
||||
),
|
||||
'panels' =>
|
||||
array (
|
||||
'default' =>
|
||||
array (
|
||||
array (
|
||||
array (
|
||||
'name' => 'name',
|
||||
'displayParams' =>
|
||||
array (
|
||||
'required' => true,
|
||||
),
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'website',
|
||||
),
|
||||
array (
|
||||
'name' => 'phone_office',
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'email1',
|
||||
),
|
||||
array (
|
||||
'name' => 'phone_fax',
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'industry',
|
||||
),
|
||||
array (
|
||||
'name' => 'account_type',
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
180
modules/Accounts/metadata/searchdefs.php
Normal file
180
modules/Accounts/metadata/searchdefs.php
Normal file
@@ -0,0 +1,180 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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 May 29, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
$searchdefs['Accounts'] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '3',
|
||||
'maxColumnsBasic' => '4',
|
||||
'widths' => array('label' => '10', 'field' => '30'),
|
||||
),
|
||||
'layout' =>
|
||||
array (
|
||||
'basic_search' =>
|
||||
array (
|
||||
'name' =>
|
||||
array (
|
||||
'name' => 'name',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'to_vatid_unformated',
|
||||
'current_user_only' =>
|
||||
array (
|
||||
'name' => 'current_user_only',
|
||||
'label' => 'LBL_CURRENT_USER_FILTER',
|
||||
'type' => 'bool',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'ownership',
|
||||
|
||||
|
||||
),
|
||||
'advanced_search' =>
|
||||
array (
|
||||
'name' =>
|
||||
array (
|
||||
'name' => 'name',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'website' =>
|
||||
array (
|
||||
'name' => 'website',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'phone' =>
|
||||
array (
|
||||
'name' => 'phone',
|
||||
'label' => 'LBL_ANY_PHONE',
|
||||
'type' => 'name',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'email' =>
|
||||
array (
|
||||
'name' => 'email',
|
||||
'label' => 'LBL_ANY_EMAIL',
|
||||
'type' => 'name',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'address_street' =>
|
||||
array (
|
||||
'name' => 'address_street',
|
||||
'label' => 'LBL_ANY_ADDRESS',
|
||||
'type' => 'name',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'address_city' =>
|
||||
array (
|
||||
'name' => 'address_city',
|
||||
'label' => 'LBL_CITY',
|
||||
'type' => 'name',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'address_state' =>
|
||||
array (
|
||||
'name' => 'address_state',
|
||||
'label' => 'LBL_STATE',
|
||||
'type' => 'name',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'address_postalcode' =>
|
||||
array (
|
||||
'name' => 'address_postalcode',
|
||||
'label' => 'LBL_POSTAL_CODE',
|
||||
'type' => 'name',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'billing_address_country' =>
|
||||
array (
|
||||
'name' => 'billing_address_country',
|
||||
'label' => 'LBL_COUNTRY',
|
||||
'type' => 'name',
|
||||
'options' => 'countries_dom',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'account_type' =>
|
||||
array (
|
||||
'name' => 'account_type',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'invoice_type',
|
||||
'industry' =>
|
||||
array (
|
||||
'name' => 'industry',
|
||||
'default' => true,
|
||||
'width' => '10%',
|
||||
),
|
||||
'category_name',
|
||||
'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%',
|
||||
),
|
||||
'to_vatid_unformated',
|
||||
'priority',
|
||||
'krs', 'regon'
|
||||
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
66
modules/Accounts/metadata/studio.php
Normal file
66
modules/Accounts/metadata/studio.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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']['Accounts'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Accounts/DetailView.html',
|
||||
'php_file'=>'modules/Accounts/DetailView.php',
|
||||
'type'=>'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Accounts/EditView.html',
|
||||
'php_file'=>'modules/Accounts/EditView.php',
|
||||
'type'=>'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template'=>'listview',
|
||||
'meta_file'=>'modules/Accounts/listviewdefs.php',
|
||||
'type'=>'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template'=>'xtpl',
|
||||
'template_file'=>'modules/Accounts/SearchForm.html',
|
||||
'php_file'=>'modules/Accounts/ListView.php',
|
||||
'type'=>'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
245
modules/Accounts/metadata/subpaneldefs.php
Normal file
245
modules/Accounts/metadata/subpaneldefs.php
Normal file
@@ -0,0 +1,245 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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['Accounts'] = 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.
|
||||
'header_definition_from_subpanel'=> 'meetings',
|
||||
'module'=>'Activities',
|
||||
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateTaskButton'),
|
||||
array('widget_class' => 'SubPanelTopScheduleMeetingButton'),
|
||||
array('widget_class' => 'SubPanelTopScheduleCallButton'),
|
||||
),
|
||||
|
||||
'collection_list' => array(
|
||||
'tasks' => array(
|
||||
'module' => 'Tasks',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'tasks',
|
||||
),
|
||||
'meetings' => array(
|
||||
'module' => 'Meetings',
|
||||
'subpanel_name' => 'ForActivities',
|
||||
'get_subpanel_data' => 'meetings',
|
||||
),
|
||||
'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.
|
||||
|
||||
'header_definition_from_subpanel'=> 'meetings',
|
||||
|
||||
'module'=>'History',
|
||||
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateNoteButton'),
|
||||
array('widget_class' => 'SubPanelTopArchiveEmailButton'),
|
||||
array('widget_class' => 'SubPanelTopSummaryButton'),
|
||||
array('widget_class' => 'SubPanelTopHistoryFilterInputButton'),
|
||||
),
|
||||
|
||||
'collection_list' => array(
|
||||
'tasks' => array(
|
||||
'module' => 'Tasks',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'tasks',
|
||||
),
|
||||
|
||||
'meetings' => array(
|
||||
'module' => 'Meetings',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'meetings',
|
||||
),
|
||||
'calls' => array(
|
||||
'module' => 'Calls',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'calls',
|
||||
),
|
||||
|
||||
'notes' => array(
|
||||
'module' => 'Notes',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'notes',
|
||||
),
|
||||
|
||||
'linkedemails' => array(
|
||||
'module' => 'Emails',
|
||||
'subpanel_name' => 'ForHistory',
|
||||
'get_subpanel_data' => 'function:get_unlinked_email_query',
|
||||
'generate_select'=>true,
|
||||
'function_parameters' => array('return_as_array'=>'true'),
|
||||
),
|
||||
)
|
||||
),
|
||||
'documents' => array(
|
||||
'order' => 130,
|
||||
'module' => 'Documents',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'documents',
|
||||
'title_key' => 'Dokumenty',
|
||||
),
|
||||
'notes' => array(
|
||||
'order' => 110,
|
||||
'module' => 'Notes',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'date_entered',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'notes',
|
||||
'add_subpanel_data' => 'note_id',
|
||||
'title_key' => 'LBL_NOTES_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
),
|
||||
'contacts' => array(
|
||||
'order' => 40,
|
||||
'module' => 'Contacts',
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'last_name, first_name',
|
||||
'subpanel_name' => 'ForAccounts',
|
||||
'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', 'mode'=>'MultiSelect'),
|
||||
array('widget_class' => 'SubPanelTopCreateButton')
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
'accounts' => array(
|
||||
'order' => 50,
|
||||
'sort_order' => 'asc',
|
||||
'sort_by' => 'name',
|
||||
'module' => 'Accounts',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'members',
|
||||
'add_subpanel_data' => 'member_id',
|
||||
'title_key' => 'LBL_MAINPRODUCT_SUBPANEL',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopButtonQuickCreate'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'mode'=>'MultiSelect')
|
||||
),
|
||||
),
|
||||
|
||||
'ecmquotes' => array(
|
||||
'order' => 60,
|
||||
'module' => 'EcmQuotes',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'ecmquotes',
|
||||
'add_subpanel_data' => 'ecmquote_id',
|
||||
'title_key' => 'LBL_ECMQUOTES_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
),
|
||||
/*
|
||||
'documents' => array(
|
||||
'order' => 90,
|
||||
'module' => 'Documents',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'documents',
|
||||
'title_key' => 'Dokumenty',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
), */
|
||||
'ecmsales' => array(
|
||||
'order' => 70,
|
||||
'module' => 'EcmSales',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'ecmsales',
|
||||
//'add_subpanel_data' => 'ecmsale_id',
|
||||
'title_key' => 'LBL_ECMSALES_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
),
|
||||
|
||||
'ecmstockdocouts' => array(
|
||||
'order' => 80,
|
||||
'module' => 'EcmStockDocOuts',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'ecmstockdocouts',
|
||||
'add_subpanel_data' => 'ecmstockdocout_id',
|
||||
'title_key' => 'Magazyn WZ',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
),
|
||||
|
||||
'ecminvoiceouts' => array(
|
||||
'order' => 5,
|
||||
'module' => 'EcmInvoiceOuts',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'ecminvoiceouts',
|
||||
'add_subpanel_data' => 'ecminvoiceout_id',
|
||||
'title_key' => 'LBL_ECMINVOICEOUTS_SUBPANEL_TITLE',
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
?>
|
||||
76
modules/Accounts/metadata/subpanels/ForEmails.php
Normal file
76
modules/Accounts/metadata/subpanels/ForEmails.php
Normal file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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' => 'Accounts'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
'list_fields' => array(
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '45%',
|
||||
),
|
||||
'billing_address_city' => array(
|
||||
'vname' => 'LBL_LIST_CITY',
|
||||
'width' => '27%',
|
||||
),
|
||||
'phone_office' => array(
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '20%',
|
||||
),
|
||||
'edit_button' => array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '4%',
|
||||
),
|
||||
'remove_button' => array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '4%',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
81
modules/Accounts/metadata/subpanels/ForProspectLists.php
Normal file
81
modules/Accounts/metadata/subpanels/ForProspectLists.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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' => 'Accounts'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
'list_fields' => array(
|
||||
'name' => array(
|
||||
'vname' => 'LBL_LIST_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '25%',
|
||||
),
|
||||
'phone_office' => array(
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '20%',
|
||||
),
|
||||
'email1' => array(
|
||||
'vname' => 'LBL_LIST_EMAIL',
|
||||
'widget_class' => 'SubPanelEmailLink',
|
||||
'width' => '20%',
|
||||
),
|
||||
'assigned_user_name' => array(
|
||||
'vname' => 'LBL_ASSIGNED_TO',
|
||||
'width' => '20%',
|
||||
),
|
||||
'edit_button' => array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '4%',
|
||||
),
|
||||
'remove_button' => array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '4%',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
93
modules/Accounts/metadata/subpanels/default.php
Normal file
93
modules/Accounts/metadata/subpanels/default.php
Normal file
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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' => 'Accounts'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
'list_fields' => array (
|
||||
'name' =>
|
||||
array (
|
||||
'vname' => 'LBL_LIST_ACCOUNT_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '45%',
|
||||
'default' => true,
|
||||
),
|
||||
'billing_address_city' =>
|
||||
array (
|
||||
'vname' => 'LBL_LIST_CITY',
|
||||
'width' => '20%',
|
||||
'default' => true,
|
||||
),
|
||||
'billing_address_country' =>
|
||||
array (
|
||||
'type' => 'varchar',
|
||||
'vname' => 'LBL_BILLING_ADDRESS_COUNTRY',
|
||||
'width' => '7%',
|
||||
'default' => true,
|
||||
),
|
||||
'phone_office' =>
|
||||
array (
|
||||
'vname' => 'LBL_LIST_PHONE',
|
||||
'width' => '20%',
|
||||
'default' => true,
|
||||
),
|
||||
'edit_button' =>
|
||||
array (
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '4%',
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
'remove_button' =>
|
||||
array (
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'width' => '4%',
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
)
|
||||
);
|
||||
?>
|
||||
20
modules/Accounts/multidelete.php
Normal file
20
modules/Accounts/multidelete.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
if($_REQUEST['mass']!=""){
|
||||
$ids=$_REQUEST['mass'];
|
||||
|
||||
$accounts = new Account();
|
||||
$accounts=$accounts->get_full_list("", "accounts.id in ('".implode("','",$ids)."')");
|
||||
|
||||
foreach ($accounts as $account){
|
||||
$account->mark_deleted($account->id);
|
||||
$r=$db->query("select * from accounts_contacts where account_id='".$account->id."'");
|
||||
while($dane=$db->fetchByAssoc($r)){
|
||||
$db->query("delete from contacts where id='".$dane['contact_id']."'");
|
||||
$db->query("delete from accounts_contacts where id='".$dane['id']."'");
|
||||
}
|
||||
}
|
||||
|
||||
header("Location: index.php?module=Accounts&action=index");
|
||||
}
|
||||
?>
|
||||
448
modules/Accounts/paramsMT.js
Executable file
448
modules/Accounts/paramsMT.js
Executable file
@@ -0,0 +1,448 @@
|
||||
|
||||
function NumberToUserFormatNumber(number,add) {
|
||||
|
||||
if(!number) number = 0;
|
||||
|
||||
number = parseFloat(number);
|
||||
|
||||
var tmp = number.toFixed(OPT['dec_len']);
|
||||
|
||||
var s1 = tmp.substring(0,tmp.length-1-OPT['dec_len']);
|
||||
|
||||
var s2 = tmp.substring(tmp.length-OPT['dec_len'],tmp.length);
|
||||
|
||||
var tmp = '';
|
||||
|
||||
for(var i=s1.length;i>0;i-=3) {
|
||||
|
||||
tmp = ((i<=3)?"":OPT['sep_1000'])+s1.substring(i-3,i)+tmp;
|
||||
|
||||
}
|
||||
|
||||
s1 = tmp;
|
||||
|
||||
return (s1+OPT['dec_sep']+s2).toString()+((add)?add:'');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function UserFormatNumberToNumber(ufn,add) {
|
||||
|
||||
if(add) {
|
||||
|
||||
var match = /add/g;
|
||||
|
||||
ufn = ufn.replace(match,'');
|
||||
|
||||
}
|
||||
|
||||
var match = /Err/g;
|
||||
|
||||
ufn = ufn.replace(match,'');
|
||||
|
||||
if(!ufn) return parseFloat(0);
|
||||
|
||||
var pos = ufn.indexOf(OPT['dec_sep']);
|
||||
|
||||
var s1='', s2='';
|
||||
|
||||
if(pos==-1) { s1 = ufn; s2 = ''; }
|
||||
|
||||
else { s1 = ufn.substring(0,pos); s2 = ufn.substring(pos+1,ufn.length); }
|
||||
|
||||
|
||||
/*
|
||||
if(OPT['sep_1000'] != "")
|
||||
|
||||
for(var i=s1.length-4;i>=0;i-=4)
|
||||
|
||||
if(s1.charAt(i) != OPT['sep_1000']) { return -1; }
|
||||
|
||||
if(s1.charAt(0) == OPT['sep_1000']) return -1;
|
||||
*/
|
||||
|
||||
|
||||
var pos = -1;
|
||||
|
||||
while((pos = s1.indexOf(OPT['sep_1000'])) != -1)
|
||||
|
||||
s1 = s1.substring(0,pos)+s1.substring(pos+1,s1.length);
|
||||
|
||||
|
||||
|
||||
//alert(s1);
|
||||
|
||||
return parseFloat(s1+"."+s2);
|
||||
|
||||
}
|
||||
function keyPressedNumber(e) {
|
||||
var keynum;
|
||||
if(window.event) //IE
|
||||
keynum = e.keyCode;
|
||||
else
|
||||
keynum = e.which;
|
||||
return keynum;
|
||||
}
|
||||
|
||||
function isEnterOrTabPressed(e) {
|
||||
var keynum = keyPressedNumber(e);
|
||||
if(keynum == 9 || keynum == 13) return true; else return false;
|
||||
}
|
||||
|
||||
function setSelectionRange(obj) {
|
||||
if(obj && typeof(obj) == "object" && (obj.type == "text" || obj.type == "textarea")) {
|
||||
if(obj.createTextRange) {
|
||||
var range = obj.createTextRange();
|
||||
range.moveStart("character", 0);
|
||||
range.moveEnd("character", obj.value.lengh-1);
|
||||
range.select();
|
||||
} else {
|
||||
if(obj.setSelectionRange) {
|
||||
obj.setSelectionRange(0,obj.value.length);
|
||||
}
|
||||
}
|
||||
obj.focus();
|
||||
}
|
||||
if(obj && typeof(obj) == "object" && obj.options) { obj.focus(); }
|
||||
|
||||
}
|
||||
|
||||
function paramsMT(name) {
|
||||
|
||||
this.myTableName = name;
|
||||
this.table = document.getElementById(this.myTableName);
|
||||
|
||||
this.thead = this.table.tHead;
|
||||
this.tbody = this.table.tBodies.item(0);
|
||||
|
||||
this.cellSelectedClass = 'selectedCell';
|
||||
this.rowSelectedClass = 'selectedRow';
|
||||
|
||||
this.selectedRow;
|
||||
this.selectedCell;
|
||||
|
||||
this.rowCount = function() {
|
||||
return this.tbody.rows.length;
|
||||
}
|
||||
|
||||
this.colCount = function() {
|
||||
return this.thead.rows.item(0).cells.length;
|
||||
};
|
||||
|
||||
this.colWidth = function(i) {
|
||||
return this.thead.rows.item(0).cells.item(i).width;
|
||||
};
|
||||
|
||||
this.moveUpRow = function() {
|
||||
if(this.selectedRow) this.selectedRow.moveUp();
|
||||
};
|
||||
|
||||
this.moveDownRow = function() {
|
||||
if(this.selectedRow) this.selectedRow.moveDown();
|
||||
};
|
||||
|
||||
this.insertRow = function(row, newRow) {
|
||||
if(!row)
|
||||
if(this.rowCount())
|
||||
if(typeof(row) == "number")
|
||||
row = this.tbody.rows.item(row);
|
||||
else
|
||||
row = this.tbody.rows.item(this.tbody.rows.length-1);
|
||||
|
||||
var row_tmp;
|
||||
if((newRow) && (row)) row_tmp = newRow; else { row_tmp = this.createRow(); this.fillWithDefaultData(row_tmp); }
|
||||
|
||||
if(this.rowCount() > 0 && row.nextSibling)
|
||||
this.tbody.insertBefore(row_tmp, row.nextSibling);
|
||||
else
|
||||
this.tbody.appendChild(row_tmp);
|
||||
|
||||
return row_tmp;
|
||||
};
|
||||
|
||||
this.refreshRowIndex = function() {
|
||||
for(var i=0; i<this.rowCount(); i++) {
|
||||
this.tbody.rows.item(i).index = i;
|
||||
if(this.onRefreshRowIndex) this.onRefreshRowIndex(this.tbody.rows.item(i));
|
||||
}
|
||||
}
|
||||
this.onRefreshRowIndex;
|
||||
|
||||
this.addRow = function(i,data) {
|
||||
var row = this.createRow();
|
||||
if(this.selectedRow) this.selectedRow.deselect();
|
||||
if(this.selectedCell) this.selectedCell.deselect();
|
||||
row.myTable = this;
|
||||
if(i || i===0)
|
||||
this.tbody.insertBefore(row,this.tbody.rows.item(i));
|
||||
else
|
||||
this.tbody.appendChild(row);
|
||||
this.refreshRowIndex();
|
||||
this.setRowData(row, data);
|
||||
for(var i=0; i<this.colCount(); i++) row.cells.item(i).afterCreate();
|
||||
return row;
|
||||
}
|
||||
|
||||
this.createRow = function(row) {
|
||||
var row = document.createElement('tr');
|
||||
row.myTable = this;
|
||||
row.isnew = false;
|
||||
row.onclick = function() { this.select(); }
|
||||
row.select = function() {
|
||||
if(!this.myTable.selectedRow || this.myTable.selectedRow !== this) {
|
||||
if(this.myTable.selectedRow) this.myTable.selectedRow.deselect();
|
||||
this.myTable.selectedRow = this;
|
||||
this.className = this.myTable.rowSelectedClass;
|
||||
if(row.onSelect) row.onSelect();
|
||||
}
|
||||
}
|
||||
row.deselect = function() {
|
||||
if(this.myTable.selectedRow === this) {
|
||||
this.className = '';
|
||||
this.myTable.selectedRow = '';
|
||||
if(row.onDeselect) row.onDeselect();
|
||||
}
|
||||
};
|
||||
|
||||
row.selectNext = function() {
|
||||
|
||||
if(this.index < this.myTable.rowCount()-1) { this.deselect(); this.nextSibling.select(); return this.nextSibling; }
|
||||
else {
|
||||
if(this.noAddNew) return this;
|
||||
|
||||
this.deselect();
|
||||
var row = this.myTable.addRow(); return row;
|
||||
}
|
||||
}
|
||||
row.selectPrevious = function() {
|
||||
this.deselect();
|
||||
if(this.previousSibling && this.index > 0) { this.previousSibling.select(); return this.previousSibling; }else return this;
|
||||
}
|
||||
row.deleteRow = function(noNew) {
|
||||
if(this.myTable.selectedCell) this.myTable.selectedCell.deselect();
|
||||
if(this.myTable.selectedRow) this.myTable.selectedRow.deselect();
|
||||
if(this.myTable.rowCount() == 1 && !noNew) {
|
||||
var MyTaBlE = this.myTable;
|
||||
setTimeout( function() { MyTaBlE.addRow(); refreshPositionIndex();} , 1000);
|
||||
}
|
||||
this.myTable.tbody.removeChild(this);
|
||||
this.myTable.refreshRowIndex();
|
||||
}
|
||||
row.moveUp = function() {
|
||||
if(!this.previousSibling) return;
|
||||
this.myTable.tbody.insertBefore(this,this.previousSibling);
|
||||
this.myTable.refreshRowIndex();
|
||||
}
|
||||
row.moveDown = function() {
|
||||
if(!this.nextSibling) this.myTable.addRow(row);
|
||||
this.myTable.tbody.insertBefore(this.nextSibling,this);
|
||||
this.myTable.refreshRowIndex();
|
||||
}
|
||||
row.setData = function(data) {
|
||||
if(!data || typeof(data) != "object") { return; };
|
||||
for(var i=0; i<this.myTable.colCount(); i++) {
|
||||
this.cells.item(i).setData(data);
|
||||
}
|
||||
}
|
||||
row.getData = function() {
|
||||
var data = new Object();
|
||||
for(var i=0; i<this.myTable.colCount(); i++) {
|
||||
if(this.cells.item(i).getData) this.cells.item(i).getData(data,true);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
for(var i=0; i<this.colCount(); i++) {
|
||||
var cell = this.createCell(i);
|
||||
row.appendChild(cell);
|
||||
}
|
||||
if(this.onCreateRow) this.onCreateRow(row);
|
||||
return row;
|
||||
|
||||
};
|
||||
|
||||
|
||||
this.onCreateRow; //function(row) {}
|
||||
|
||||
this.createCell = function(i) {
|
||||
var cell = document.createElement('td');
|
||||
cell.index = i;
|
||||
cell.myTable = this;
|
||||
cell.onclick = function() { this.select(); }
|
||||
cell.select = function() {
|
||||
|
||||
if(!this.myTable.selectedCell || this.myTable.selectedCell !== this) {
|
||||
if(this.myTable.selectedCell) this.myTable.selectedCell.deselect();
|
||||
this.myTable.selectedCell = this;
|
||||
if(this.firstChild.focus && !this.noSelect) setSelectionRange(this.firstChild);
|
||||
|
||||
if(this.onSelect) this.onSelect();
|
||||
this.className = this.myTable.cellSelectedClass;
|
||||
|
||||
}
|
||||
}
|
||||
cell.deselect = function() {
|
||||
if(this.myTable.selectedCell === this) {
|
||||
if(cell.onDeselect) cell.onDeselect();
|
||||
this.className = '';
|
||||
this.selected = false;
|
||||
this.myTable.selectedCell = '';
|
||||
}
|
||||
};
|
||||
cell.selectNext = function() {
|
||||
this.deselect();
|
||||
if(this.nextSibling) this.nextSibling.select();
|
||||
else {
|
||||
if(!this.parentNode.nextSibling) { if(this.noNewAdd) return; else this.myTable.addRow(); }
|
||||
this.parentNode.nextSibling.select();
|
||||
this.parentNode.nextSibling.firstChild.select();
|
||||
}
|
||||
}
|
||||
cell.afterCreate = function() {}
|
||||
cell.setData = function(data) {}
|
||||
cell.getData = function(data) {}
|
||||
if(this.onCreateCell) this.onCreateCell(cell);
|
||||
return cell;
|
||||
};
|
||||
this.onCreateCell; //function(cell) {}
|
||||
|
||||
|
||||
this.setRowData = function(row,data) {
|
||||
for(var i=0; i<this.colCount(); i++) {
|
||||
this.setCellData(row,row.cells.item(i),data);
|
||||
}
|
||||
}
|
||||
|
||||
this.setCellData = function(row,cell,data) {
|
||||
if(typeof(row) == "number")
|
||||
if(this.tbody.rows.item(row)) row = this.tbody.rows.item(row);
|
||||
if(typeof(cell) != "object")
|
||||
if(typeof(cell) == "number" && typeof(row) == "object") {
|
||||
if(row.cells.item(cell))
|
||||
cell = row.cells.item(cell);
|
||||
else return;
|
||||
}
|
||||
else return;
|
||||
if(this.onSetCellData) this.onSetCellData(row,cell,data);
|
||||
}
|
||||
|
||||
this.onSetCellData; //function(row,cell,data) {}
|
||||
|
||||
|
||||
|
||||
|
||||
this.selectRow = function(row) {
|
||||
if(this.selectedRow === row) return;
|
||||
|
||||
|
||||
if(this.selectedRow) this.deselectRow();
|
||||
|
||||
|
||||
this.selectedRow = row;
|
||||
|
||||
|
||||
this.selectedRow.className = this.rowSelectedClass;
|
||||
|
||||
|
||||
this.setEditNames(this.selectedRow,!this.selectedRow.isnew);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this.selectNextRow = function() {
|
||||
|
||||
if(!this.selectedRow) return;
|
||||
|
||||
|
||||
if(!this.selectedRow.nextSibling) this.insertRow();
|
||||
|
||||
|
||||
var cell_id = this.selectedCell.lp;
|
||||
|
||||
|
||||
this.selectRow(this.selectedRow.nextSibling);
|
||||
|
||||
|
||||
this.selectCell(this.selectedRow.cells.item(cell_id));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
this.selectPreviousRow = function() {
|
||||
|
||||
|
||||
if(!this.selectedRow) return;
|
||||
|
||||
|
||||
if(!this.selectedRow.previousSibling) return;
|
||||
|
||||
|
||||
if(this.selectedRow === this.tbody.rows.item(0)) return;
|
||||
|
||||
|
||||
var cell_id = this.selectedCell.lp;
|
||||
|
||||
|
||||
this.selectRow(this.selectedRow.previousSibling);
|
||||
|
||||
|
||||
this.selectCell(this.selectedRow.cells.item(cell_id));
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.refreshNumeration = function() {
|
||||
for(var i=0; i<this.tbody.rows.length; i++)
|
||||
this.tbody.rows.item(i).cells.item(0).firstChild.value = i+1;
|
||||
}
|
||||
|
||||
this.KeyPressedNumber = function(e) {
|
||||
var keynum;
|
||||
if(window.event) //IE
|
||||
keynum = e.keyCode;
|
||||
else
|
||||
keynum = e.which;
|
||||
return keynum;
|
||||
}
|
||||
|
||||
this.KeyPressed = function(e, cell, method) {
|
||||
var keynum;
|
||||
if(window.event) //IE
|
||||
keynum = e.keyCode;
|
||||
else
|
||||
keynum = e.which;
|
||||
if((keynum == 9) || (keynum == 13)) {
|
||||
cell.selectNext();
|
||||
return false;
|
||||
}
|
||||
if(keynum == 40) { var id = cell.index; var row = cell.parentNode.selectNext(); if(row) { row.select(); row.cells.item(id).select(); } }
|
||||
if(keynum == 38) { var id = cell.index; var row = cell.parentNode.selectPrevious(); if(row) { row.select(); row.cells.item(id).select(); } }
|
||||
if(e.shiftKey && (method == "decimalNumber" || method == "onlyNumber")) return false;
|
||||
if(method == "decimalNumber") return this.OnlyNumbers(keynum);
|
||||
if(method == "onlyNumber") return this.OnlyNumbers(keynum, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
this.OnlyNumbers = function(e, noQuote) { var keynum = e, keychar, numcheck;
|
||||
keychar = String.fromCharCode(keynum);
|
||||
numcheck = /\d/;
|
||||
return numcheck.test(keychar) || ((!noQuote)?(keynum == 190):false)
|
||||
|| (keynum == 8) //backspace
|
||||
|| (keynum == 46) //delete
|
||||
|| (keynum == 13) //enter || (keynum == 0) //special keys with FF
|
||||
|| (keynum == 37) //left arrow
|
||||
|| (keynum == 39) //right arrow
|
||||
|| (keynum == 188); //,
|
||||
}
|
||||
|
||||
this.row = function(i) { if(this.tbody.rows.item(i)) return this.tbody.rows.item(i); }
|
||||
this.cells = function(i,j) { if(this.tbody.rows.item(i).cells.item(i)) return this.tbody.rows.item(i).cells.item(i); }
|
||||
}
|
||||
85
modules/Accounts/previewPDF.php
Normal file
85
modules/Accounts/previewPDF.php
Normal file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
|
||||
error_reporting(E_PARSE | E_WARNING);
|
||||
|
||||
$json = getJSONobj();
|
||||
$pll = array();
|
||||
$i = 0;
|
||||
while (isset($_POST['p_' . $i])) {
|
||||
$pll[] = $json->decode(htmlspecialchars_decode($_POST['p_' . $i]));
|
||||
$_POST['p_' . $i] = '';
|
||||
$i++;
|
||||
}
|
||||
$_POST = $json->decode(htmlspecialchars_decode($_POST['otherFormData']));
|
||||
$_POST['position_list'] = $pll;
|
||||
|
||||
if (isset($_REQUEST['record']) && $_REQUEST['record'] != '' && $_REQUEST['cache'] != "fromJava") {
|
||||
require_once("modules/Accounts/Account.php");
|
||||
|
||||
$focus = new Account();
|
||||
|
||||
$method = (isset($_REQUEST['method']) && $_REQUEST['method'] != '') ? $_REQUEST['method'] : 'D';
|
||||
|
||||
$focus->getPDF($_REQUEST['record'], $method, null, @$_REQUEST['type']);
|
||||
} else
|
||||
|
||||
if ($_REQUEST['cache'] == "fromJava" && $_GET['from'] != "EcmInvoiceOuts") {
|
||||
$_SESSION['PDF_ECMINVOICEOUTS'] = $_POST;
|
||||
} else
|
||||
|
||||
if ($_GET['from'] == "EcmInvoiceOuts") {
|
||||
require_once("modules/EcmInvoiceOuts/EcmInvoiceOut.php");
|
||||
|
||||
$focus = new EcmInvoiceOut();
|
||||
|
||||
if (isset($_SESSION['PDF_ECMINVOICEOUTS']['record']) && $_SESSION['PDF_ECMINVOICEOUTS']['record'] != '') {
|
||||
|
||||
$focus->retrieve($_SESSION['PDF_ECMINVOICEOUTS']['record']);
|
||||
}
|
||||
|
||||
if (!$focus->ACLAccess('Save')) {
|
||||
|
||||
ACLController::displayNoAccess(true);
|
||||
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
foreach ($focus->column_fields as $field) {
|
||||
|
||||
if (isset($_SESSION['PDF_ECMINVOICEOUTS'][$field])) {
|
||||
|
||||
$value = $_SESSION['PDF_ECMINVOICEOUTS'][$field];
|
||||
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($focus->additional_column_fields as $field) {
|
||||
|
||||
if (isset($_SESSION['PDF_ECMINVOICEOUTS'][$field])) {
|
||||
|
||||
$value = $_SESSION['PDF_ECMINVOICEOUTS'][$field];
|
||||
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_SESSION['PDF_ECMINVOICEOUTS']['to_is_vat_free']) && $_SESSION['PDF_ECMINVOICEOUTS']['to_is_vat_free'])
|
||||
$focus->to_is_vat_free = 1;
|
||||
else
|
||||
$focus->to_is_vat_free = 0;
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$pl = $_SESSION['PDF_ECMINVOICEOUTS']['position_list'];
|
||||
|
||||
$focus->position_list = $pl;
|
||||
|
||||
$focus->document_no = $_SESSION['PDF_ECMINVOICEOUTS']['document_no'];
|
||||
|
||||
$focus->wz_id = $_SESSION['PDF_ECMINVOICEOUTS']['out_id'];
|
||||
|
||||
$focus->ecmpaymentcondition_text = EcmInvoiceOut::getTranslation('EcmPaymentConditions', $focus->ecmpaymentcondition_id, $focus->ecmlanguage);
|
||||
//die();
|
||||
$focus->getPDF();
|
||||
}
|
||||
22
modules/Accounts/repairDoubleNames.php
Executable file
22
modules/Accounts/repairDoubleNames.php
Executable file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
$query = "SELECT id, name FROM ecmproducts";
|
||||
|
||||
$result = $GLOBALS['db']->query($query);
|
||||
|
||||
$ile =0;
|
||||
$ile_nie =0;
|
||||
while ($row=$GLOBALS['db']->fetchByAssoc($result)) {
|
||||
$name = $row['name'];
|
||||
if (strlen($name) % 2 == 0) {
|
||||
$start = substr($name, 0, strlen($name)/2);
|
||||
$end = substr($name, strlen($name)/2, strlen($name)/2);
|
||||
|
||||
if ($start == $end) {
|
||||
$query2 = "UPDATE ecmproducts SET name = '".$start."' WHERE id ='".$row['id']."';";
|
||||
//$GLOBALS['db']->query($query2);
|
||||
echo $query2."<br>";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "koniec";
|
||||
?>
|
||||
36
modules/Accounts/repaircontacts.php
Normal file
36
modules/Accounts/repaircontacts.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
$db=$GLOBALS['db'];
|
||||
$_GET['record'] = $id;
|
||||
// id nie jest puste? jedziemy i szukamy leadsa ...
|
||||
$r=$db->query("select ac.contact_id,ac.id,ac.date_modified,ac.deleted,ac.account_id from accounts_contacts as ac
|
||||
join leads as aa on aa.id=ac.account_id");
|
||||
if($r->num_rows>0){
|
||||
// o jest kontakt!
|
||||
while($row=$db->fetchByAssoc($r)){
|
||||
// wybieranie ścierwa
|
||||
$ct=$db->query("select * from contacts where id='".$row['contact_id']."'");
|
||||
while($row2=$db->fetchByAssoc($ct)){
|
||||
// przenoszenie ścierwa ...
|
||||
|
||||
// usuwanie starego ścierwa ...
|
||||
$mail=$db->query("select * from email_addr_bean_rel where bean_id='".$row2['id']."'");
|
||||
if($mail->num_rows>0){
|
||||
// o jest email!
|
||||
while($mu=$db->fetchByAssoc($mail)){
|
||||
// podmianka relacji na kontakt
|
||||
$db->query("update email_addr_bean_rel set bean_module='ContactLeads' where id='".$mu['id']."'");
|
||||
}
|
||||
}
|
||||
if($rr->num_rows>0){
|
||||
// o jest email!
|
||||
while($re=$db->fetchByAssoc($rr)){
|
||||
// podmianka relacji na kontrahenta
|
||||
$re['deleted']=0;
|
||||
// $db->query("INSERT INTO `leads_contactleads` VALUES('".implode("','",$re)."')");
|
||||
// $db->query("update accounts_contacts set deleted='1' where lead_id='".$row['contact_id']."'");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
30
modules/Accounts/showMap.php
Normal file
30
modules/Accounts/showMap.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
//map container
|
||||
echo '<div id="googleMapContainer" style="width:750px;height:570px;"></div>';
|
||||
//load Script
|
||||
echo '<script type="text/javascript" src="modules/Accounts/javascript/showMap.js"></script>';
|
||||
echo '<script src="https://maps.googleapis.com/maps/api/js"></script>';
|
||||
$ids = explode(",",$_REQUEST['uid']);
|
||||
//get Data
|
||||
$markers = array();
|
||||
foreach ($ids as $id) {
|
||||
$a = new Account();
|
||||
$a->retrieve($id);
|
||||
$addr = $a->billing_address_street." ".$a->billing_address_postalcode." ".$a->billing_address_city." ".$a->billing_address_country;
|
||||
$cor = getCoordinates($addr);
|
||||
$tmp = array();
|
||||
$tmp['lat'] = $cor[0];
|
||||
$tmp['lng'] = $cor[1];
|
||||
$tmp['title'] = html_entity_decode(trim($a->name));
|
||||
$tmp['info'] = '<a href="index.php?module=Accounts&action=DetailView&record='.$a->id.'" target="new">'.html_entity_decode(trim($a->name)).'</a><br>'.$a->billing_address_street.'<br>'.$a->billing_address_postalcode.'<br>'.$a->billing_address_city.'<br>'.$a->billing_address_country;
|
||||
$markers[] = $tmp;
|
||||
}
|
||||
echo '<input value="'.base64_encode(json_encode($markers)).'" id="googleMapMarkers" type="hidden"></input>';
|
||||
function getCoordinates($address){
|
||||
$address = str_replace(" ", "+", $address); // replace all the white space with "+" sign to match with google search pattern
|
||||
$url = "http://maps.google.com/maps/api/geocode/json?sensor=false&address=$address";
|
||||
$response = file_get_contents($url);
|
||||
$json = json_decode($response,TRUE); //generate array object from the response from the web
|
||||
return array ($json['results'][0]['geometry']['location']['lat'],$json['results'][0]['geometry']['location']['lng']);
|
||||
}
|
||||
?>
|
||||
36
modules/Accounts/test.php
Normal file
36
modules/Accounts/test.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
$query="select parent_id from ecminvoiceouts where deleted=0";
|
||||
|
||||
$res=$GLOBALS['db']->query($query);
|
||||
$accounts=[];
|
||||
while($dane=$GLOBALS['db']->fetchByAssoc($res)){
|
||||
$accounts[$dane['parent_id']]['inv']=1;
|
||||
$accounts[$dane['parent_id']]['id']=$dane['parent_id'];
|
||||
}
|
||||
|
||||
$query="select parent_id from documents_accounts where parent_type='Account'";
|
||||
|
||||
$res=$GLOBALS['db']->query($query);
|
||||
|
||||
while($dane=$GLOBALS['db']->fetchByAssoc($res)){
|
||||
$accounts[$dane['parent_id']]['doc']=1;
|
||||
$accounts[$dane['parent_id']]['id']=$dane['parent_id'];
|
||||
}
|
||||
|
||||
foreach ($accounts as $ac){
|
||||
if($ac['doc']==1 && $ac['inv']==1){
|
||||
echo "update accounts set account_type='rs' where id='".$ac['id']."';<br>";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($accounts as $ac){
|
||||
if($ac['doc']==1 && $ac['inv']==1){
|
||||
$acc = new Account();
|
||||
$acc->retrieve($ac['id']);
|
||||
|
||||
echo $acc->name.'<br>';
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
89
modules/Accounts/tpls/QuickCreate.tpl
Executable file
89
modules/Accounts/tpls/QuickCreate.tpl
Executable file
@@ -0,0 +1,89 @@
|
||||
{*
|
||||
|
||||
/*********************************************************************************
|
||||
* 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="accountsQuickCreate" id="accountsQuickCreate" method="POST" action="index.php">
|
||||
<input type="hidden" name="module" value="Accounts">
|
||||
<input type="hidden" name="email_id" value="{$REQUEST.email_id}">
|
||||
<input type="hidden" name="case_id" value="{$REQUEST.acase_id}">
|
||||
<input type="hidden" name="bug_id" value="{$REQUEST.bug_id}">
|
||||
<input type="hidden" name="parent_id" value="{$REQUEST.parent_id}">
|
||||
<input type="hidden" name="opportunity_id" value="{$REQUEST.opportunity_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="is_ajax_call" value='1'>
|
||||
<input type="hidden" name="to_pdf" value='1'>
|
||||
<input type="hidden" name="duplicate_parent_id" value="{$REQUEST.duplicate_parent_id}">
|
||||
<input id='assigned_user_id' name='assigned_user_id' type="hidden" value="{$ASSIGNED_USER_ID}" />
|
||||
<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('AccountsQuickCreate');\""} 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='Accounts';" 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>
|
||||
<th align="left" scope="row" colspan="4"><h4><slot>{$MOD.LBL_ACCOUNT_INFORMATION}</slot></h4></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td scope="row"><slot>{$MOD.LBL_ACCOUNT_NAME} <span class="required">{$APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
|
||||
<td nowrap><slot><input name='name' tabindex='1' size='35' maxlength='150' type="text" value=""></slot></td>
|
||||
<td scope="row"><slot>{$MOD.LBL_PHONE}</slot></td>
|
||||
<td ><slot><input name='phone_office' type="text" tabindex='2' size='20' maxlength='25' value=''></slot></td>
|
||||
</tr><tr>
|
||||
<td scope="row"><slot>{$MOD.LBL_WEBSITE}</slot></td>
|
||||
<td ><slot><input name='website' type="text" tabindex='1' size='28' maxlength='255' value=""></slot></td>
|
||||
<td scope="row"><slot>{$MOD.LBL_EMAIL}</slot></td>
|
||||
<td ><slot><input name='email1' type="text" tabindex='2' size='35' maxlength='100' value=''></slot></td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<script>
|
||||
{$additionalScripts}
|
||||
</script>
|
||||
1083
modules/Accounts/vardefs.php
Normal file
1083
modules/Accounts/vardefs.php
Normal file
File diff suppressed because it is too large
Load Diff
209
modules/Accounts/views/view.detail.php
Normal file
209
modules/Accounts/views/view.detail.php
Normal file
@@ -0,0 +1,209 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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/MVC/View/views/view.detail.php');
|
||||
include_once ("modules/EcmPaymentStates/helper.php");
|
||||
class AccountsViewDetail extends ViewDetail {
|
||||
|
||||
|
||||
function AccountsViewDetail(){
|
||||
parent::ViewDetail();
|
||||
}
|
||||
|
||||
/**
|
||||
* display
|
||||
* Override the display method to support customization for the buttons that display
|
||||
* a popup and allow you to copy the account's address into the selected contacts.
|
||||
* The custom_code_billing and custom_code_shipping Smarty variables are found in
|
||||
* include/SugarFields/Fields/Address/DetailView.tpl (default). If it's a English U.S.
|
||||
* locale then it'll use file include/SugarFields/Fields/Address/en_us.DetailView.tpl.
|
||||
*/
|
||||
function display(){
|
||||
|
||||
if(empty($this->bean->id)){
|
||||
global $app_strings;
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
global $mod_strings;
|
||||
//add mz
|
||||
$pl = $this->bean->showPositions();
|
||||
$pl2 = $this->bean->showPositions2();
|
||||
$pl3 = $this->bean->showPositions3();
|
||||
$pl55 = $this->bean->showPositions55();
|
||||
$this->ss->assign('POSITIONS', $pl);
|
||||
|
||||
$this->ss->assign('POSITIONS2', $pl2);
|
||||
$this->ss->assign('POSITIONS3', $pl3);
|
||||
$this->ss->assign('POSITIONS55', $pl55);
|
||||
$this->ss->assign('URL_ECMPAY', '<a href="index.php?module=EcmPaymentStates&action=AccountPaymentStates&return_module=EcmPaymentStates&return_action=DetailView&parentTab=AccountPaymentStates&account_id='.$this->bean->id.'" target="_blank">Sprawdź</a>');
|
||||
$this->ss->assign('LBL_PHONE', $app_strings['LBL_PHONE']);
|
||||
$this->ss->assign('LBL_FAX', $app_strings['LBL_FAX']);
|
||||
$this->ss->assign('LBL_SAVE_TO_GOOGLE', $mod_strings['LBL_SAVE_TO_GOOGLE']);
|
||||
$this->ss->assign('MOVE', '<input class="button" value="Przenieś do potencjalnych" type="button" onClick="location.href=\'index.php?module=Accounts&action=MoveAccount&record='.$this->bean->id.'\'"/>');
|
||||
|
||||
//end mz
|
||||
$this->dv->process();
|
||||
global $mod_strings;
|
||||
if(ACLController::checkAccess('Contacts', 'edit', true)) {
|
||||
$push_billing = '<span class="id-ff"><button class="button btn_copy" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] .
|
||||
'" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' .
|
||||
urlencode($this->bean->name) . '&html=change_address' .
|
||||
'&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('','','<br>'), urlencode($this->bean->billing_address_street)) .
|
||||
'&primary_address_city=' . $this->bean->billing_address_city .
|
||||
'&primary_address_state=' . $this->bean->billing_address_state .
|
||||
'&primary_address_postalcode=' . $this->bean->billing_address_postalcode .
|
||||
'&primary_address_country=' . $this->bean->billing_address_country .
|
||||
'", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE']. '">'.
|
||||
SugarThemeRegistry::current()->getImage("id-ff-copy","",null,null,'.png',$mod_strings["LBL_COPY"]).
|
||||
'</button></span>';
|
||||
|
||||
$push_shipping = '<span class="id-ff"><button class="button btn_copy" title="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_LABEL'] .
|
||||
'" type="button" onclick=\'open_contact_popup("Contacts", 600, 600, "&account_name=' .
|
||||
urlencode($this->bean->name) . '&html=change_address' .
|
||||
'&primary_address_street=' . str_replace(array("\rn", "\r", "\n"), array('','','<br>'), urlencode($this->bean->shipping_address_street)) .
|
||||
'&primary_address_city=' . $this->bean->shipping_address_city .
|
||||
'&primary_address_state=' . $this->bean->shipping_address_state .
|
||||
'&primary_address_postalcode=' . $this->bean->shipping_address_postalcode .
|
||||
'&primary_address_country=' . $this->bean->shipping_address_country .
|
||||
'", true, false);\' value="' . $mod_strings['LBL_PUSH_CONTACTS_BUTTON_TITLE'] . '">'.
|
||||
SugarThemeRegistry::current()->getImage("id-ff-copy",'',null,null,'.png',$mod_strings['LBL_COPY']).
|
||||
'</button></span>';
|
||||
} else {
|
||||
$push_billing = '';
|
||||
$push_shipping = '';
|
||||
}
|
||||
|
||||
$query = "select p.id,p.document_no,p.paid,p.register_date,p.payment_date,p.total,p.ecminvoiceout_id from ecmpayments_ecminvoiceouts as p inner join ecminvoiceouts as i on p.ecminvoiceout_id=i.id and i.type!='canceled' where p.deleted='0' and p.account_id='" . $this->bean->id . "' " . $v . " order by p.date_entered desc";
|
||||
|
||||
$w = $GLOBALS ['db']->query ( $query );
|
||||
|
||||
$winien_roz = 0;
|
||||
$winien_n_roz = 0;
|
||||
while ( $r = $GLOBALS ['db']->fetchByAssoc ( $w ) ) {
|
||||
|
||||
$str = "";
|
||||
if ($r ['register_date'] < '2008-12-31' && $r ['paid'] == 0)
|
||||
continue;
|
||||
// if($r['type']!='correct'){
|
||||
$rinv = $GLOBALS ['db']->fetchByAssoc ( $GLOBALS ['db']->query ( "select description,id from ecminvoiceouts where id='" . $r ['ecminvoiceout_id'] . "'" ) );
|
||||
if ($r ['paid'] == 0) {
|
||||
$winien_roz += $r['total'];
|
||||
} else {
|
||||
$paid = "*";
|
||||
$checkbox = "";
|
||||
$color = ' color: #33FF00; ';
|
||||
$winien_n_roz += $r['total'];
|
||||
}
|
||||
$exp = explode ( "-", $r ['register_date'] );
|
||||
|
||||
if ($r ['paid'] == 0)
|
||||
$arrear += $r ['total'];
|
||||
|
||||
if ($r ['ecminvoiceout_id'])
|
||||
$inv = '<a href="index.php?module=EcmInvoiceOuts&action=DetailView&record=' . $r ['ecminvoiceout_id'] . '">' . $r ['document_no'] . '</a>';
|
||||
else
|
||||
$inv = $r ['document_no'];
|
||||
|
||||
// }
|
||||
$total_wn += $r ['total'];
|
||||
}
|
||||
$query = "select payment_date,id,description,value,paid,name from ecmpayments where deleted='0' and parent_id='" . $this->bean->id . "' order by date_entered desc";
|
||||
|
||||
$w = $GLOBALS ['db']->query ( $query );
|
||||
$last_date = "";
|
||||
|
||||
$ma_roz = 0;
|
||||
$ma_n_roz = 0;
|
||||
while ( $r = $GLOBALS ['db']->fetchByAssoc ( $w ) ) {
|
||||
$str = "";
|
||||
if ($r ['payment_date'] < '2008-12-31' && $r ['paid'] == 0)
|
||||
continue;
|
||||
if ($r ['paid']) {
|
||||
$paid = "*";
|
||||
$checkbox = "";
|
||||
$color = ' color: #33FF00;';
|
||||
$ma_roz+=$r['value'];
|
||||
} else {
|
||||
$paid = " ";
|
||||
$checkbox = '<input type="checkbox" name="check2[]" value="' . $r ['id'] . '" onclick="addValue(this,' . $r ['value'] . ',document.getElementById(\'total_ma\'));">';
|
||||
$color = ' color: #FF3333;';
|
||||
$ma_n_roz+=$r['value'];
|
||||
}
|
||||
if (str_replace ( " ", "", $r ['name'] ) == "" || ! $r ['name'])
|
||||
$r ['name'] = "blank";
|
||||
if (! $_REQUEST ['document_no'] && $last_date != $r ['payment_date'] && ($r ['paid'] == 0 || ! $wh_paid_p)) {
|
||||
if ($wh_paid_p)
|
||||
$whp = " and paid='0'";
|
||||
else
|
||||
$whp = "";
|
||||
$rr = $GLOBALS ['db']->fetchByAssoc ( $GLOBALS ['db']->query ( "select sum(value) as sum from ecmpayments where deleted='0' and parent_id='" . $_REQUEST ['account_id'] . "'" . $whp . " and payment_date='" . $r ['payment_date'] . "'" ) );
|
||||
$sum_total = $rr ['sum'];
|
||||
}
|
||||
if ($r ['name'] == "blank")
|
||||
$desc_name = $r ['description'];
|
||||
else
|
||||
$desc_name = $r ['name'];
|
||||
$total_ma += $r ['value'];
|
||||
if ($r ['paid'] == 0 || ! $wh_paid_p)
|
||||
$last_date = $r ['payment_date'];
|
||||
if ($r ['paid'] == 0)
|
||||
$total_not_paid += $r ['value'];
|
||||
} $sumr=( $ma_n_roz - $winien_n_roz );
|
||||
$sumn=($ma_roz + $ma_n_roz) - ($winien_roz + $winien_n_roz);
|
||||
$sumn=number_format($sumn, 2, ',', ' ');
|
||||
if($sumn>0){
|
||||
$color='FF3333';
|
||||
} else {
|
||||
$color='000000';
|
||||
|
||||
}
|
||||
$sumr='<p style="color:#'.$color.';">'.number_format($sumr, 2, ',', ' ').'</p>';
|
||||
$this->ss->assign("custom_code_billing", $push_billing);
|
||||
$this->ss->assign("custom_code_shipping", $push_shipping);
|
||||
$this->ss->assign('SUMN',$sumn);
|
||||
$this->ss->assign('SUMR',$sumr);
|
||||
if(empty($this->bean->id)){
|
||||
global $app_strings;
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
echo $this->dv->display();
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
53
modules/Accounts/views/view.edit.php
Normal file
53
modules/Accounts/views/view.edit.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM Community Edition is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2013 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/MVC/View/views/view.edit.php');
|
||||
|
||||
class AccountsViewEdit extends ViewEdit
|
||||
{
|
||||
public function preDisplay() {
|
||||
require_once('modules/Accounts/EditView.php');
|
||||
parent::preDisplay();
|
||||
}
|
||||
|
||||
public function display()
|
||||
{
|
||||
parent::display();
|
||||
}
|
||||
|
||||
}
|
||||
27
modules/Accounts/voip_test.php
Normal file
27
modules/Accounts/voip_test.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
global $system_config;
|
||||
|
||||
$timeout = 30;
|
||||
$socket = fsockopen( $system_config->settings['system_asterisk_server'],$system_config->settings['system_asterisk_port'], $errno, $errstr, $timeout);
|
||||
if(!$socket){ die("Error Connecting to Asterisk Server"); }
|
||||
fputs($socket, "Action: Login\r\n");
|
||||
fputs($socket, "UserName: ".$system_config->settings['system_asterisk_username']."\r\n");
|
||||
fputs($socket, "Secret: ".$system_config->settings['system_asterisk_secret']."\r\n\r\n");
|
||||
|
||||
echo"<pre>";
|
||||
fwrite($socket, "Action: Status\r\n");
|
||||
fwrite($socket, "Command: Lists channel status ".$channel."\r\n\r\n");
|
||||
$wrets="";
|
||||
|
||||
fputs($socket, "Action: Logoff\r\n\r\n");
|
||||
|
||||
while (!feof($socket)) {
|
||||
$wrets .= fread($socket, 8192).'</br>';
|
||||
}
|
||||
|
||||
echo $wrets."<br/></pre>";
|
||||
|
||||
fclose($socket);
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user