Add php files
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<?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): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['EcmSyntheticAccountsDashlet'] = array('module' => 'EcmSyntheticAccounts',
|
||||
'title' => translate('LBL_HOMEPAGE_TITLE', 'EcmSyntheticAccounts'),
|
||||
'description' => 'A customizable view into EcmSyntheticAccounts',
|
||||
'icon' => 'icon_EcmSyntheticAccounts_32.gif',
|
||||
'category' => 'Module Views');
|
||||
@@ -0,0 +1,63 @@
|
||||
<?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): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/Dashlets/DashletGeneric.php');
|
||||
require_once('modules/EcmSyntheticAccounts/EcmSyntheticAccount.php');
|
||||
|
||||
class EcmSyntheticAccountsDashlet extends DashletGeneric {
|
||||
function EcmSyntheticAccountsDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
require('modules/EcmSyntheticAccounts/metadata/dashletviewdefs.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = translate('LBL_HOMEPAGE_TITLE', 'EcmSyntheticAccounts');
|
||||
|
||||
$this->searchFields = $dashletData['EcmSyntheticAccountsDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['EcmSyntheticAccountsDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new EcmSyntheticAccount();
|
||||
}
|
||||
}
|
||||
42
modules/EcmSyntheticAccounts/DetailView.php
Executable file
42
modules/EcmSyntheticAccounts/DetailView.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user, $app_list_strings;
|
||||
|
||||
require_once ('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
$focus = new EcmSyntheticAccount();
|
||||
|
||||
if (isset($_REQUEST['record']))
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
|
||||
if (file_exists('modules/EcmSyntheticAccounts/view/DetailView/view.detail.my.php')) {
|
||||
require_once('modules/EcmSyntheticAccounts/view/DetailView/view.detail.my.php');
|
||||
$detail = new ViewDetailMy();
|
||||
$detail->ss = new Sugar_Smarty();
|
||||
$detail->module = 'EcmSyntheticAccounts';
|
||||
} else {
|
||||
require_once('include/MVC/View/views/view.detail.php');
|
||||
$detail = new ViewDetail();
|
||||
$detail->ss = new Sugar_Smarty();
|
||||
$detail->module = 'EcmSyntheticAccounts';
|
||||
}
|
||||
|
||||
global $app_list_strings;
|
||||
|
||||
$ul = $focus->showStructureanAlyticalList();
|
||||
$detail->ss->assign('STRUCTUREANALYTICALPART_LIST', $ul);
|
||||
|
||||
$aal = $focus->getAnaliticalList();
|
||||
$detail->ss->assign('ANALYTICALACCOUNTS_LIST', $aal);
|
||||
|
||||
$detail->bean = $focus;
|
||||
$detail->preDisplay();
|
||||
unset($detail->defs['templateMeta']['form']['buttons'][2]);
|
||||
echo $detail->display();
|
||||
?>
|
||||
195
modules/EcmSyntheticAccounts/EcmSyntheticAccount.php
Executable file
195
modules/EcmSyntheticAccounts/EcmSyntheticAccount.php
Executable file
@@ -0,0 +1,195 @@
|
||||
<?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".
|
||||
* ******************************************************************************
|
||||
*/
|
||||
|
||||
/**
|
||||
* THIS CLASS IS GENERATED BY MODULE BUILDER
|
||||
* PLEASE DO NOT CHANGE THIS CLASS
|
||||
* PLACE ANY CUSTOMIZATIONS IN EcmSyntheticAccount
|
||||
*/
|
||||
class EcmSyntheticAccount extends Basic {
|
||||
|
||||
var $new_schema = true;
|
||||
var $module_dir = 'EcmSyntheticAccounts';
|
||||
var $object_name = 'EcmSyntheticAccount';
|
||||
var $table_name = 'ecmsyntheticaccounts';
|
||||
var $importable = false;
|
||||
var $disable_row_level_security = true; // to ensure that modules created and deployed under CE will continue to function under team security if the instance is upgraded to PRO
|
||||
var $id;
|
||||
var $name;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $modified_by_name;
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $description;
|
||||
var $deleted;
|
||||
var $created_by_link;
|
||||
var $modified_user_link;
|
||||
var $assigned_user_id;
|
||||
var $assigned_user_name;
|
||||
var $assigned_user_link;
|
||||
var $indeks;
|
||||
var $time;
|
||||
var $ecmsyntheticaccounts_unit_dom;
|
||||
var $category;
|
||||
var $cost_action;
|
||||
var $cost_hour;
|
||||
var $cost_other;
|
||||
|
||||
function EcmSyntheticAccount() {
|
||||
parent::Basic();
|
||||
}
|
||||
|
||||
function bean_implements($interface) {
|
||||
switch ($interface) {
|
||||
case 'ACL' :
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function save($check_notify = false) {
|
||||
$return_id = parent::save($check_notify);
|
||||
$tmp = array();
|
||||
|
||||
foreach ($_POST['structureanalyticalpart'] as $key => $value) {
|
||||
if ($_POST['structureanalyticalpart'][$key] != '') {
|
||||
$tmp[$key]['ecmsyntheticaccounts_id'] = $return_id;
|
||||
$tmp[$key]['position'] = $key;
|
||||
$tmp[$key]['value'] = $_POST['structureanalyticalpart'][$key];
|
||||
}
|
||||
}
|
||||
$this->saveStructureanAlyticalList($tmp);
|
||||
|
||||
$analyticalList = explode(',', $_POST ['tableAnalyticalAccounts_rowOrder']);
|
||||
$analytical_array = array();
|
||||
|
||||
foreach ($analyticalList as $value) {
|
||||
if ($_POST ['tableAnalyticalAccounts_code_' . $value] != '') {
|
||||
$analytical_array [$value] ['code'] = $_POST ['tableAnalyticalAccounts_code_' . $value];
|
||||
$analytical_array [$value] ['name'] = $_POST ['tableAnalyticalAccounts_name_' . $value];
|
||||
}
|
||||
}
|
||||
$this->saveAnaliticalList($analytical_array);
|
||||
}
|
||||
|
||||
function saveStructureanAlyticalList($pl) {
|
||||
global $current_user;
|
||||
$exists = array();
|
||||
if ($this->id != '') {
|
||||
$GLOBALS['db']->query("DELETE FROM ecmsyntheticaccounts_structureanalyticalpart WHERE ecmsyntheticaccounts_id='" . $this->id . "'");
|
||||
}
|
||||
foreach ($pl as $p) {
|
||||
if (!isset($p['ecmsyntheticaccounts_id']) || $p['ecmsyntheticaccounts_id'] == '')
|
||||
continue;
|
||||
$id = create_guid();
|
||||
$t = array(
|
||||
$id, //id
|
||||
$this->id, //document id
|
||||
$p['position'], //user id
|
||||
$p['value'], //date accepted
|
||||
);
|
||||
$q = "INSERT INTO ecmsyntheticaccounts_structureanalyticalpart VALUES ('" . implode("','", $t) . "')";
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $id;
|
||||
}
|
||||
}
|
||||
|
||||
function showStructureanAlyticalList($array = false) {
|
||||
$json = getJSONobj();
|
||||
if (isset($this->id) && $this->id != '') {
|
||||
$query = "SELECT * FROM ecmsyntheticaccounts_structureanalyticalpart WHERE ecmsyntheticaccounts_id='" . $this->id . "' ORDER BY position";
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
if ($r) {
|
||||
while ($w = $this->db->fetchByAssoc($r)) {
|
||||
$new = array();
|
||||
$new['ecmsyntheticaccounts_id'] = $w['ecmsyntheticaccounts_id'];
|
||||
$new['position'] = $w['position'];
|
||||
$new['value'] = $w['value'];
|
||||
$return_array [] = $new;
|
||||
}
|
||||
return $array ? $return_array : $return_array;
|
||||
}
|
||||
}
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
|
||||
function saveAnaliticalList($pl) {
|
||||
$exists = array();
|
||||
if ($this->id != '') {
|
||||
$GLOBALS ['db']->query("DELETE FROM ecmsyntheticaccounts_analyticalaccounts WHERE ecmsyntheticaccount_id='" . $this->id . "'");
|
||||
}
|
||||
foreach ($pl as $p) {
|
||||
// insert new record
|
||||
$id = create_guid();
|
||||
$t = array(
|
||||
$id,
|
||||
$this->id,
|
||||
addslashes($p ['code']),
|
||||
addslashes($p ['name'])
|
||||
);
|
||||
$q = "INSERT INTO ecmsyntheticaccounts_analyticalaccounts VALUES ('" . implode("','", $t) . "')";
|
||||
$GLOBALS ['db']->query($q);
|
||||
$exists [] = $id;
|
||||
}
|
||||
}
|
||||
|
||||
function getAnaliticalList($array = false) {
|
||||
if (isset($this->id) && $this->id != '') {
|
||||
$query = "SELECT code, name FROM ecmsyntheticaccounts_analyticalaccounts WHERE ecmsyntheticaccount_id='" . $this->id . "' ORDER BY code DESC";
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
if ($r) {
|
||||
while ($row = $this->db->fetchByAssoc($r)) {
|
||||
$a_json_row ['code'] = $row ['code'];
|
||||
$a_json_row ['name'] = $row ['name'];
|
||||
$return_array [] = $a_json_row;
|
||||
}
|
||||
$json = getJSONobj();
|
||||
return $array ? $return_array : $return_array;
|
||||
}
|
||||
}
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
47
modules/EcmSyntheticAccounts/EditView.php
Executable file
47
modules/EcmSyntheticAccounts/EditView.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user;
|
||||
|
||||
|
||||
require_once ('include/time.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
$focus = new EcmSyntheticAccount();
|
||||
|
||||
if(isset($_REQUEST['record']) && $_REQUEST['record'] != '') {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
$focus->format_all_fields();
|
||||
}
|
||||
/*if (isset($_REQUEST['parent_id']) && $_REQUEST['parent_id']!='') {
|
||||
$a = new Account();
|
||||
$a->retrieve($_REQUEST['parent_id']);
|
||||
$focus->id=create_guid();
|
||||
$focus->parent_id = $a->id;
|
||||
$focus->parent_name = $a->name;
|
||||
$focus->payment_date = date('d.m.Y');
|
||||
global $current_user;
|
||||
$focus->assigned_user_id = $current_user->id;
|
||||
$focus->assigned_user_name = $current_user->full_name;
|
||||
$focus->format_all_fields();
|
||||
unset($a);
|
||||
}*/
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/EcmSyntheticAccounts/view/EditView/view.edit.my.php');
|
||||
|
||||
$edit = new ViewEditEcmSyntheticAccounts();
|
||||
$edit->ss = new Sugar_Smarty();
|
||||
$edit->module = 'EcmSyntheticAccounts';
|
||||
$edit->bean = $focus;
|
||||
//$edit->tplFile = 'include/EditView/EditViewClassic.tpl';
|
||||
|
||||
$ul = $focus->showStructureanAlyticalList();
|
||||
$edit->ss->assign('STRUCTUREANALYTICALPART_LIST', $ul);
|
||||
|
||||
$aal = $focus->getAnaliticalList();
|
||||
$edit->ss->assign('ANALYTICALACCOUNTS_LIST', $aal);
|
||||
$edit->preDisplay();
|
||||
echo $edit->display();
|
||||
?>
|
||||
41
modules/EcmSyntheticAccounts/Menu.php
Executable file
41
modules/EcmSyntheticAccounts/Menu.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
global $mod_strings, $app_strings, $sugar_config;
|
||||
|
||||
if(ACLController::checkAccess('EcmSyntheticAccounts', 'edit', true))$module_menu[]=Array("index.php?module=EcmSyntheticAccounts&action=EditView&return_module=EcmSyntheticAccounts&return_action=DetailView", $mod_strings['LNK_NEW_RECORD'],"CreateEcmSyntheticAccount", 'EcmSyntheticAccount');
|
||||
if(ACLController::checkAccess('EcmSyntheticAccounts', 'list', true))$module_menu[]=Array("index.php?module=EcmSyntheticAccounts&action=index&return_module=EcmSyntheticAccounts&return_action=DetailView", $mod_strings['LNK_LIST'],"EcmSyntheticAccount", 'EcmSyntheticAccount');
|
||||
29
modules/EcmSyntheticAccounts/helper.php
Executable file
29
modules/EcmSyntheticAccounts/helper.php
Executable file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
if (!defined('sugarEntry') || !sugarEntry) {
|
||||
die('-1');
|
||||
}
|
||||
if (!$_POST ['job'] || $_POST ['job'] == '') {
|
||||
die('-1');
|
||||
}
|
||||
switch ($_POST ['job']) {
|
||||
case 'checkCode' :
|
||||
checkCode ($_POST ['kod']);
|
||||
break;
|
||||
}
|
||||
|
||||
function checkCode($code) {
|
||||
$db = $GLOBALS ['db'];
|
||||
$query = "SELECT count(id) as c FROM ecmsyntheticaccounts WHERE account_code='" . $code."'";
|
||||
$r = $db->fetchByAssoc ( $db->query ( $query ) );
|
||||
if (! $r || ! $r ['c'] || $r ['c'] == '')
|
||||
$count = 0;
|
||||
else
|
||||
$count = intval ( $r ['c'] );
|
||||
|
||||
if($count > 0 ){
|
||||
$json = json_encode (true);
|
||||
}else{
|
||||
$json = json_encode (false);
|
||||
}
|
||||
print $json;
|
||||
}
|
||||
75
modules/EcmSyntheticAccounts/language/en_us.lang.php
Executable file
75
modules/EcmSyntheticAccounts/language/en_us.lang.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned User Id',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Assigned to',
|
||||
'LBL_ID' => 'ID',
|
||||
'LBL_DATE_ENTERED' => 'Date Created',
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified',
|
||||
'LBL_MODIFIED' => 'Modified By',
|
||||
'LBL_MODIFIED_ID' => 'Modified By Id',
|
||||
'LBL_MODIFIED_NAME' => 'Modified By Name',
|
||||
'LBL_CREATED' => 'Created By',
|
||||
'LBL_CREATED_ID' => 'Created By Id',
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
'LBL_DELETED' => 'Deleted',
|
||||
'LBL_NAME' => 'Nazwa',
|
||||
'LBL_CREATED_USER' => 'Created by User',
|
||||
'LBL_MODIFIED_USER' => 'Modified by User',
|
||||
'LBL_LIST_NAME' => 'Name',
|
||||
'LBL_EDIT_BUTTON' => 'Edit',
|
||||
'LBL_REMOVE' => 'Remove',
|
||||
'LBL_LIST_FORM_TITLE' => 'EcmSyntheticAccounts List',
|
||||
'LBL_MODULE_NAME' => 'EcmSyntheticAccounts',
|
||||
'LBL_MODULE_TITLE' => 'EcmSyntheticAccounts',
|
||||
'LBL_HOMEPAGE_TITLE' => 'My EcmSyntheticAccounts',
|
||||
'LNK_NEW_RECORD' => 'Create EcmSyntheticAccounts',
|
||||
'LNK_LIST' => 'View EcmSyntheticAccounts',
|
||||
'LNK_IMPORT_TMP_ACTIONS' => 'Import EcmSyntheticAccounts',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Search EcmSyntheticAccounts',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'View History',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
|
||||
'LBL_TMP_ACTIONS_SUBPANEL_TITLE' => 'EcmSyntheticAccounts',
|
||||
'LBL_NEW_FORM_TITLE' => 'New EcmSyntheticAccounts',
|
||||
'LBL_INDEKS' => 'Indeks',
|
||||
'LBL_TIME' => 'Norma',
|
||||
'LBL_UNIT_MEASURE' => 'Jednostka miary',
|
||||
'LBL_COST_ACTION' => 'Cena1',
|
||||
'LBL_COST_HOUR' => 'Cena 2',
|
||||
'LBL_COST_OTHER' => 'Cena3',
|
||||
'LBL_EDITVIEW_PANEL1' => 'Inne',
|
||||
);
|
||||
72
modules/EcmSyntheticAccounts/language/pl_pl.lang.php
Executable file
72
modules/EcmSyntheticAccounts/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
$mod_strings = array (
|
||||
'LBL_ASSIGNED_TO_ID' => 'Przypisano do Id',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Przypisano do',
|
||||
'LBL_ID' => 'ID',
|
||||
'LBL_DATE_ENTERED' => 'Data utworzenia',
|
||||
'LBL_DATE_MODIFIED' => 'Data modyfikacji',
|
||||
'LBL_MODIFIED' => 'Modyfikowano przez',
|
||||
'LBL_MODIFIED_ID' => 'Modyfikowano przez Id',
|
||||
'LBL_MODIFIED_NAME' => 'Modyfikowano przez',
|
||||
'LBL_CREATED' => 'Utworzone przez',
|
||||
'LBL_CREATED_ID' => 'Utworzone przez Id',
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
'LBL_DELETED' => 'Usunięte',
|
||||
'LBL_NAME' => 'Nazwa',
|
||||
'LBL_CREATED_USER' => 'Utworzone przez',
|
||||
'LBL_MODIFIED_USER' => 'Modyfikowane przez',
|
||||
'LBL_LIST_NAME' => 'Nazwa',
|
||||
'LBL_EDIT_BUTTON' => 'Edytuj',
|
||||
'LBL_REMOVE' => 'Usuń',
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista Plan kont',
|
||||
'LBL_MODULE_NAME' => 'Konta Syntetyczne',
|
||||
'LBL_MODULE_TITLE' => 'Konta Syntetyczne',
|
||||
'LBL_HOMEPAGE_TITLE' => 'Moje Konta Syntetyczne',
|
||||
'LNK_NEW_RECORD' => 'Utwórz konto',
|
||||
'LNK_LIST' => 'Lista Plan kont',
|
||||
'LNK_IMPORT_TMP_ACTIONS' => 'Importuj konta syntetyczne',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Szukaj konta syntetycznego',
|
||||
'LBL_HISTORY_SUBPANEL_TITLE' => 'Zobacz historie',
|
||||
'LBL_ACTIVITIES_SUBPANEL_TITLE' => 'Activities',
|
||||
'LBL_TMP_ACTIONS_SUBPANEL_TITLE' => 'Konta syntetyczne',
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowe konta syntetyczne',
|
||||
'LBL_ACCOUNT_TYPE' => 'Rodzaj konta',
|
||||
'LBL_ACCOUNTS_BALANCE' => 'Saldo w BO',
|
||||
'LBL_ACCOUNT_CODE' => 'Konto',
|
||||
'LBL_STRUCTURE_ANALYTICAL_PART' => 'Struktura części analitycznej',
|
||||
'LBL_ANALYTICAL_ACCOUNTS' => 'Konta analityczne',
|
||||
);
|
||||
54
modules/EcmSyntheticAccounts/metadata/SearchFields.php
Executable file
54
modules/EcmSyntheticAccounts/metadata/SearchFields.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
|
||||
$module_name = 'EcmSyntheticAccounts';
|
||||
$searchFields[$module_name] =
|
||||
array (
|
||||
'name' => 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
|
||||
);
|
||||
?>
|
||||
89
modules/EcmSyntheticAccounts/metadata/detailviewdefs.php
Executable file
89
modules/EcmSyntheticAccounts/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
$module_name = 'EcmSyntheticAccounts';
|
||||
$viewdefs [$module_name] = array(
|
||||
'DetailView' => array(
|
||||
'templateMeta' => array(
|
||||
'form' => array(
|
||||
'buttons' => array(
|
||||
0 => 'EDIT',
|
||||
1 => 'DELETE',
|
||||
)
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array(
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
array(
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
'includes' => array(
|
||||
array(
|
||||
'file' => 'modules/EcmSyntheticAccounts/js/DetailViewDocumentReady.js'
|
||||
),
|
||||
),
|
||||
'useTabs' => false,
|
||||
'tabDefs' => array(
|
||||
'DEFAULT' => array(
|
||||
'newTab' => false,
|
||||
'panelDefault' => 'expanded'
|
||||
),
|
||||
'LBL_EDITVIEW_PANEL1' => array(
|
||||
'newTab' => false,
|
||||
'panelDefault' => 'expanded'
|
||||
)
|
||||
),
|
||||
),
|
||||
'panels' => array(
|
||||
'default' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'account_code',
|
||||
'label' => 'LBL_ACCOUNT_CODE',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'name',
|
||||
'label' => 'LBL_NAME',
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'account_type',
|
||||
'label' => 'LBL_ACCOUNT_TYPE',
|
||||
)
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'accounts_balance',
|
||||
'label' => 'LBL_ACCOUNTS_BALANCE',
|
||||
)
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'structureanalyticalpart',
|
||||
'hideLabel' => false,
|
||||
'label' => 'LBL_STRUCTURE_ANALYTICAL_PART',
|
||||
'customCode' => "{include file='modules/EcmSyntheticAccounts/tpl/DetailViewStructureAnalyticalPart.tpl'}",
|
||||
),
|
||||
),
|
||||
),
|
||||
'LBL_ANALYTICAL_ACCOUNTS' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'structureanalyticalpart',
|
||||
'hideLabel' => true,
|
||||
//'label' => 'LBL_STRUCTURE_ANALYTICAL_PART',
|
||||
'customCode' => "{include file='modules/EcmSyntheticAccounts/tpl/DetailViewTableAnalyticalAccounts.tpl'}",
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
105
modules/EcmSyntheticAccounts/metadata/editviewdefs.php
Executable file
105
modules/EcmSyntheticAccounts/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
$module_name = 'EcmSyntheticAccounts';
|
||||
$viewdefs [$module_name] = array(
|
||||
'EditView' => array(
|
||||
'templateMeta' => array(
|
||||
'form' => array(
|
||||
'enctype' => 'multipart/form-data',
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
0 => array(
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
1 => array(
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
'useTabs' => false,
|
||||
'tabDefs' => array(
|
||||
'DEFAULT' => array(
|
||||
'newTab' => false,
|
||||
'panelDefault' => 'expanded'
|
||||
),
|
||||
'LBL_EDITVIEW_PANEL1' => array(
|
||||
'newTab' => false,
|
||||
'panelDefault' => 'expanded'
|
||||
)
|
||||
),
|
||||
'javascript' => '
|
||||
<script type="text/javascript" src="include/javascript/popup_parent_helper.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/jsolait/init.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/jsolait/lib/urllib.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_base.js"></script>
|
||||
<script type="text/javascript" src="include/javascript/jsclass_async.js"></script>
|
||||
<script type="text/javascript" src="include/JSON.js?s={$SUGAR_VERSION}"></script>',
|
||||
'includes' => array(
|
||||
0 => array(
|
||||
'file' => 'include/JSON.js'
|
||||
),
|
||||
1 => array(
|
||||
'file' => 'modules/EcmSyntheticAccounts/js/EditViewDocumentReady.js'
|
||||
),
|
||||
)
|
||||
),
|
||||
'panels' => array(
|
||||
'default' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'account_code',
|
||||
'label' => 'LBL_ACCOUNT_CODE',
|
||||
'displayParams' => array(
|
||||
'size' => 3
|
||||
)
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'name',
|
||||
'label' => 'LBL_NAME',
|
||||
'tabIndex' => '100',
|
||||
'displayParams' => array(
|
||||
'size' => 60
|
||||
)
|
||||
),
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'account_type',
|
||||
'label' => 'LBL_ACCOUNT_TYPE',
|
||||
'tabIndex' => '101',
|
||||
)
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'accounts_balance',
|
||||
'label' => 'LBL_ACCOUNTS_BALANCE',
|
||||
'tabIndex' => '102',
|
||||
)
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'structureanalyticalpart',
|
||||
'hideLabel' => false,
|
||||
'label' => 'LBL_STRUCTURE_ANALYTICAL_PART',
|
||||
'customCode' => "{include file='modules/EcmSyntheticAccounts/tpl/EditViewStructureAnalyticalPart.tpl'}",
|
||||
),
|
||||
),
|
||||
),
|
||||
'LBL_ANALYTICAL_ACCOUNTS' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'structureanalyticalpart',
|
||||
'hideLabel' => true,
|
||||
// 'label' => 'LBL_STRUCTURE_ANALYTICAL_PART',
|
||||
'customCode' => "{include file='modules/EcmSyntheticAccounts/tpl/EditViewTableAnalyticalAccounts.tpl'}",
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
35
modules/EcmSyntheticAccounts/metadata/listviewdefs.php
Executable file
35
modules/EcmSyntheticAccounts/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
echo '<script type="text/javascript" src="modules/EcmSyntheticAccounts/ListViewDocumentReady.js"></script>';
|
||||
$module_name = 'EcmSyntheticAccounts';
|
||||
$listViewDefs [$module_name] = array (
|
||||
'ACCOUNT_CODE' => array (
|
||||
'width' => '5%',
|
||||
'label' => 'LBL_ACCOUNT_CODE',
|
||||
'default' => true,
|
||||
'link' => true,
|
||||
'align' => 'right',
|
||||
),
|
||||
'NAME' => array (
|
||||
'width' => '35%',
|
||||
'label' => 'LBL_NAME',
|
||||
'default' => true,
|
||||
'link' => true,
|
||||
'align' => 'left',
|
||||
),
|
||||
'ACCOUNT_TYPE' => array (
|
||||
'type' => 'varchar',
|
||||
'label' => 'LBL_ACCOUNT_TYPE',
|
||||
'width' => '10%',
|
||||
'default' => true,
|
||||
'align' => 'left',
|
||||
),
|
||||
'ACCOUNTS_BALANCE' => array (
|
||||
'type' => 'varchar',
|
||||
'label' => 'LBL_ACCOUNTS_BALANCE',
|
||||
'link' => 'false',
|
||||
'width' => '10%',
|
||||
'default' => true,
|
||||
'align' => 'left',
|
||||
),
|
||||
);
|
||||
?>
|
||||
60
modules/EcmSyntheticAccounts/metadata/quickcreatedefs.php
Executable file
60
modules/EcmSyntheticAccounts/metadata/quickcreatedefs.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
|
||||
$module_name = 'EcmSyntheticAccounts';
|
||||
$viewdefs[$module_name]['QuickCreate'] = array(
|
||||
'templateMeta' => array('maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
),
|
||||
|
||||
|
||||
'panels' =>array (
|
||||
'default' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
'name',
|
||||
'assigned_user_name',
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
?>
|
||||
51
modules/EcmSyntheticAccounts/metadata/searchdefs.php
Executable file
51
modules/EcmSyntheticAccounts/metadata/searchdefs.php
Executable file
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
$module_name = 'EcmSyntheticAccounts';
|
||||
$searchdefs [$module_name] = array (
|
||||
'layout' => array (
|
||||
'basic_search' => array (
|
||||
'name' => array (
|
||||
'name' => 'name',
|
||||
'default' => true,
|
||||
'width' => '10%'
|
||||
),
|
||||
'account_type' => array (
|
||||
'type' => 'enum',
|
||||
'label' => 'LBL_ACCOUNT_TYPE',
|
||||
'width' => '10%',
|
||||
'default' => true,
|
||||
'name' => 'account_type'
|
||||
),
|
||||
'accounts_balance' => array(
|
||||
'type' => 'enum',
|
||||
'label' => 'LBL_ACCOUNTS_BALANCE',
|
||||
'width' => '10%',
|
||||
'default' => true,
|
||||
'name' => 'accounts_balance'
|
||||
),
|
||||
|
||||
),
|
||||
/* 'advanced_search' => array (
|
||||
0 => 'name',
|
||||
1 => array (
|
||||
'name' => 'assigned_user_id',
|
||||
'label' => 'LBL_ASSIGNED_TO',
|
||||
'type' => 'enum',
|
||||
'function' => array (
|
||||
'name' => 'get_user_array',
|
||||
'params' => array (
|
||||
0 => false
|
||||
)
|
||||
)
|
||||
)
|
||||
) */
|
||||
),
|
||||
'templateMeta' => array (
|
||||
'maxColumns' => '3',
|
||||
'maxColumnsBasic' => '4',
|
||||
'widths' => array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
)
|
||||
);
|
||||
?>
|
||||
41
modules/EcmSyntheticAccounts/metadata/studio.php
Executable file
41
modules/EcmSyntheticAccounts/metadata/studio.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
|
||||
/**
|
||||
* This file adds support for studio
|
||||
*/
|
||||
|
||||
?>
|
||||
73
modules/EcmSyntheticAccounts/metadata/subpanels/default.php
Executable file
73
modules/EcmSyntheticAccounts/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,73 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$module_name='EcmSyntheticAccounts';
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => $module_name),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
'list_fields' => array(
|
||||
'name'=>array(
|
||||
'vname' => 'LBL_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '45%',
|
||||
),
|
||||
'date_modified'=>array(
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'width' => '45%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => $module_name,
|
||||
'width' => '4%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => $module_name,
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
?>
|
||||
91
modules/EcmSyntheticAccounts/vardefs.php
Executable file
91
modules/EcmSyntheticAccounts/vardefs.php
Executable file
@@ -0,0 +1,91 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
$dictionary ['EcmSyntheticAccount'] = array (
|
||||
'table' => 'ecmsyntheticaccounts',
|
||||
'audited' => true,
|
||||
'duplicate_merge' => true,
|
||||
'fields' => array (
|
||||
'account_code' => array(
|
||||
'name' => 'account_code',
|
||||
'vname' => 'LBL_ACCOUNT_CODE',
|
||||
'type' => 'varchar',
|
||||
'len' => '3',
|
||||
'unified_search' => true,
|
||||
'comment' => 'First name of the contact',
|
||||
'merge_filter' => 'selected',
|
||||
'required' => true,
|
||||
'massupdate' => 0,
|
||||
'comments' => '',
|
||||
'help' => '',
|
||||
'importable' => 'true',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'duplicate_merge_dom_value' => '0',
|
||||
'audited' => true,
|
||||
'reportable' => true,
|
||||
'size' => '3',
|
||||
),
|
||||
'account_type' => array (
|
||||
'required' => true,
|
||||
'name' => 'account_type',
|
||||
'vname' => 'LBL_ACCOUNT_TYPE',
|
||||
'options' => 'ecmsyntheticaccounts_account_type',
|
||||
'type' => 'enum',
|
||||
'len' => '255',
|
||||
'massupdate' => false,
|
||||
'audited' => true,
|
||||
),
|
||||
'accounts_balance' => array (
|
||||
'required' => true,
|
||||
'name' => 'accounts_balance',
|
||||
'vname' => 'LBL_ACCOUNTS_BALANCE',
|
||||
'options' => 'ecmsyntheticaccounts_accounts_balance',
|
||||
'type' => 'enum',
|
||||
'len' => '255',
|
||||
'massupdate' => false,
|
||||
'audited' => true,
|
||||
),
|
||||
),
|
||||
'relationships' => array (),
|
||||
'optimistic_locking' => true,
|
||||
'unified_search' => true
|
||||
);
|
||||
if (! class_exists ( 'VardefManager' )) {
|
||||
require_once ('include/SugarObjects/VardefManager.php');
|
||||
}
|
||||
VardefManager::createVardef ( 'EcmSyntheticAccounts', 'EcmSyntheticAccount', array (
|
||||
'basic',
|
||||
'assignable'
|
||||
) );
|
||||
95
modules/EcmSyntheticAccounts/view/DetailView/view.detail.my.php
Executable file
95
modules/EcmSyntheticAccounts/view/DetailView/view.detail.my.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU 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 General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU 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 General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU 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 Apr 13, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
require_once('include/DetailView/DetailView2.php');
|
||||
|
||||
class ViewDetailMy extends SugarView{
|
||||
var $type ='detail';
|
||||
var $dv;
|
||||
var $tplFile = 'include/DetailView/DetailView.tpl';
|
||||
|
||||
function ViewDetailMy(){
|
||||
$this->options['show_subpanels'] = true;
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function preDisplay(){
|
||||
$metadataFile = null;
|
||||
$foundViewDefs = false;
|
||||
if(file_exists('custom/modules/' . $this->module . '/metadata/detailviewdefs.php')){
|
||||
$metadataFile = 'custom/modules/' . $this->module . '/metadata/detailviewdefs.php';
|
||||
$foundViewDefs = true;
|
||||
}else{
|
||||
if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
require_once('custom/modules/'.$this->module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$this->module]['detailviewdefs'])){
|
||||
$metadataFile = $metafiles[$this->module]['detailviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}elseif(file_exists('modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
require_once('modules/'.$this->module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$this->module]['detailviewdefs'])){
|
||||
$metadataFile = $metafiles[$this->module]['detailviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
$GLOBALS['log']->debug("metadatafile=". $metadataFile);
|
||||
if(!$foundViewDefs && file_exists('modules/'.$this->module.'/metadata/detailviewdefs.php')){
|
||||
$metadataFile = 'modules/'.$this->module.'/metadata/detailviewdefs.php';
|
||||
}
|
||||
$this->dv = new DetailView2();
|
||||
$this->dv->ss =& $this->ss;
|
||||
$this->dv->setup($this->module, $this->bean, $metadataFile, $this->tplFile);
|
||||
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(empty($this->bean->id)){
|
||||
global $app_strings;
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
$this->dv->process();
|
||||
echo $this->dv->display();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
186
modules/EcmSyntheticAccounts/view/EditView/view.edit.my.php
Executable file
186
modules/EcmSyntheticAccounts/view/EditView/view.edit.my.php
Executable file
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU 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 General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU 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 General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU 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 Apr 13, 2007
|
||||
|
||||
*
|
||||
|
||||
* To change the template for this generated file go to
|
||||
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
|
||||
*/
|
||||
|
||||
require_once('include/EditView/EditView2.php');
|
||||
|
||||
|
||||
|
||||
class ViewEditEcmSyntheticAccounts extends SugarView{
|
||||
|
||||
var $ev;
|
||||
|
||||
var $type ='edit';
|
||||
|
||||
var $useForSubpanel = false; //boolean variable to determine whether view can be used for subpanel creates
|
||||
|
||||
var $showTitle = true;
|
||||
|
||||
var $tplFile = 'include/EditView/EditView.tpl';
|
||||
|
||||
|
||||
|
||||
function ViewEditEcmSyntheticAccounts(){
|
||||
|
||||
parent::SugarView();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function preDisplay(){
|
||||
|
||||
$metadataFile = null;
|
||||
|
||||
$foundViewDefs = false;
|
||||
|
||||
if(file_exists('custom/modules/' . $this->module . '/metadata/editviewdefs.php')){
|
||||
|
||||
$metadataFile = 'custom/modules/' . $this->module . '/metadata/editviewdefs.php';
|
||||
|
||||
$foundViewDefs = true;
|
||||
|
||||
}else{
|
||||
|
||||
if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
|
||||
require_once('custom/modules/'.$this->module.'/metadata/metafiles.php');
|
||||
|
||||
if(!empty($metafiles[$this->module]['editviewdefs'])){
|
||||
|
||||
$metadataFile = $metafiles[$this->module]['editviewdefs'];
|
||||
|
||||
$foundViewDefs = true;
|
||||
|
||||
}
|
||||
|
||||
}elseif(file_exists('modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
|
||||
require_once('modules/'.$this->module.'/metadata/metafiles.php');
|
||||
|
||||
if(!empty($metafiles[$this->module]['editviewdefs'])){
|
||||
|
||||
$metadataFile = $metafiles[$this->module]['editviewdefs'];
|
||||
|
||||
$foundViewDefs = true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$GLOBALS['log']->debug("metadatafile=". $metadataFile);
|
||||
|
||||
if(!$foundViewDefs && file_exists('modules/'.$this->module.'/metadata/editviewdefs.php')){
|
||||
|
||||
$metadataFile = 'modules/'.$this->module.'/metadata/editviewdefs.php';
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$this->ev = new EditView();
|
||||
|
||||
$this->ev->ss =& $this->ss;
|
||||
|
||||
$this->ev->setup($this->module, $this->bean, $metadataFile, $this->tplFile);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function display(){
|
||||
|
||||
$this->ev->process();
|
||||
|
||||
echo $this->ev->display($this->showTitle);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user