Add php files

This commit is contained in:
2025-05-12 15:44:39 +00:00
parent c951760058
commit 82d5804ac4
9534 changed files with 2638137 additions and 0 deletions

View File

@@ -0,0 +1,392 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the icensed Software
* d) Assert any patent clais against the Licensor or Contributors, or
* which would in any wa restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ****************************************************************************** */
require_once('data/SugarBean.php');
require_once('include/utils.php');
class EcmGroupService extends SugarBean {
var $field_name_map = array();
// STANDARD FIELDS
var $id;
var $date_entered;
var $date_modified;
var $modified_user_id;
var $assigned_user_id;
var $name;
var $description;
//TABLE COLUMNS
// RELATED FIELDS
var $created_by;
var $created_by_name;
var $modified_by_name;
var $assigned_user_name;
// SUBPANELS RELATED
// MODULE OBJECT DETAILS
var $module_dir = "EcmGroupServices";
var $table_name = "ecmgroupservices";
var $object_name = "EcmGroupService";
//RELATED TABLE NAMES
// USED TO RETRIEVE RELATED FIELDS FROM FORM POSTS.
var $additional_column_fields = Array(
'assigned_user_name',
'assigned_user_id',
'modified_user_id',
'created_by',
);
//RELATIONSHIP FIELDS
var $relationship_fields = Array(
);
function EcmGroupService() {
parent::SugarBean();
$this->setupCustomFields('EcmGroupServices');
foreach ($this->field_defs as $field) {
$this->field_name_map[$field['name']] = $field;
}
}
var $new_schema = true;
function get_summary_text() {
return "$this->name";
}
function create_list_query($order_by, $where, $show_deleted = 0) {
// Fill in the assigned_user_name
$custom_join = $this->custom_fields->getJOIN();
$query = "SELECT ";
$query .= "ecmgroupservices.*
,users.user_name as assigned_user_name";
if ($custom_join) {
$query .= $custom_join['select'];
}
$query .= " FROM ecmgroupservices
LEFT JOIN users
ON ecmgroupservices.assigned_user_id=users.id";
$query .= " ";
if ($custom_join) {
$query .= $custom_join['join'];
}
$where_auto = '1=1';
if ($show_deleted == 0) {
$where_auto = " $this->table_name.deleted=0 ";
} else if ($show_deleted == 1) {
$where_auto = " $this->table_name.deleted=1 ";
}
if ($where != "")
$query .= "where $where AND " . $where_auto;
else
$query .= "where " . $where_auto;
if (substr_count($order_by, '.') > 0) {
$query .= " ORDER BY $order_by";
} else if ($order_by != "")
$query .= " ORDER BY $order_by";
else
$query .= " ORDER BY ecmgroupservices.name";
return $query;
}
function create_export_query($order_by, $where) {
$custom_join = $this->custom_fields->getJOIN();
$query = "SELECT
ecmgroupservices.*,
users.user_name assigned_user_name";
if ($custom_join) {
$query .= $custom_join['select'];
}
$query .= " FROM ecmgroupservices ";
$query .= " LEFT JOIN users
ON ecmgroupservices.assigned_user_id=users.id";
if ($custom_join) {
$query .= $custom_join['join'];
}
$query .= "";
$where_auto = " ecmgroupservices.deleted=0
";
if ($where != "")
$query .= " where $where AND " . $where_auto;
else
$query .= " where " . $where_auto;
if ($order_by != "")
$query .= " ORDER BY $order_by";
else
$query .= " ORDER BY ecmgroupservices.name";
return $query;
}
function fill_in_additional_list_fields() {
}
function fill_in_additional_detail_fields() {
//FILL IN THE ASSIGNED_USER_NAME
$this->assigned_user_name = get_assigned_user_name($this->assigned_user_id);
$this->created_by_name = get_assigned_user_name($this->created_by);
$this->modified_by_name = get_assigned_user_name($this->modified_user_id);
}
function get_list_view_data() {
global $current_language;
$this->fill_in_additional_detail_fields();
$app_list_strings = return_app_list_strings_language($current_language);
$mod_strings = return_module_language($current_language, 'EcmGroupServices');
$the_array = parent::get_list_view_data();
// THE NEW LISTVIEW CODE ONLY FETCHES COLUMNS THAT WE'RE DISPLAYING AND NOT ALL
// THE COLUMNS SO WE NEED THESE CHECKS.
$the_array['NAME'] = (($this->name == "") ? "<em>blank</em>" : $this->name);
$the_array['FORMATTED_NUMBER'] = $this->formatted_number;
return $the_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 = PearDatabase::groupservice(from_html($the_query_string));
array_push($where_clauses, "ecmgroupservices.name like '$the_query_string%'");
$the_where = "";
foreach ($where_clauses as $clause) {
if ($the_where != "")
$the_where .= " or ";
$the_where .= $clause;
}
return $the_where;
}
function set_notification_body($xtpl, $simplemodule) {
global $mod_strings, $app_list_strings;
$xtpl->assign("NAME", $simplemodule->name);
$xtpl->assign("DESCRIPTION", $simplemodule->description);
return $xtpl;
}
function bean_implements($interface) {
switch ($interface) {
case 'ACL':return true;
}
return false;
}
function save($check_notify = FALSE) {
$return_id = parent::save($check_notify);
return $return_id;
}
static function getPositionList($table, $first_empty = false) {
$query = "select `id`,`name` from `$table` where `deleted`='0' order by `name`";
$result = $GLOBALS['db']->query($query);
$arr = array();
if ($first_empty)
$arr[''] = ' ';
if ($result)
while ($row = $GLOBALS['db']->fetchByAssoc($result))
$arr[$row['id']] = $row['name'];
return $arr;
}
static function saveSettings($array) {
global $current_user;
//save admin settings
if (is_admin($current_user)) {
$arr = array(
'default_payment_condition' => $array['default_payment_condition'],
'default_delivery_condition' => $array['default_delivery_condition'],
'default_document_template' => $array['default_document_template'],
'default_representative_role_id' => $array['default_representative_role_id'],
'default_representative_extra_role_id' => $array['default_representative_extra_role_id'],
'default_manager_role_id' => $array['default_manager_role_id'],
'checkbox_demo' => ((isset($array['checkbox_demo']) && $array['checkbox_demo'] != '') ? 1 : 0),
'show_images_on_offers' => ((isset($array['show_images_on_offers']) && $array['show_images_on_offers'] != '') ? 1 : 0),
'creating_invoice_direct_from_quote' => ((isset($array['creating_invoice_direct_from_quote']) && $array['creating_invoice_direct_from_quote'] != '') ? 1 : 0),
'rows_on_item_list_global' => $array['rows_on_item_list_global'],
'row_item_height_global' => $array['row_item_height_global'],
'row_item_height_selected_global' => $array['row_item_height_selected_global'],
'quick_product_item_adding_global' => ((isset($array['quick_product_item_adding_global']) && $array['quick_product_item_adding_global'] != '') ? 1 : 0),
'show_pdf_in_div_global' => ((isset($array['show_pdf_in_div_global']) && $array['show_pdf_in_div_global'] != '') ? 1 : 0),
);
$str = "<?php\n\$ecmgroupservices_config = " . var_export($arr, true) . ";\n?>";
$config = fopen("modules/EcmGroupServices/config.php", "w");
fwrite($config, $str);
fclose($config);
}
//save user settings
if (!isset($array['rows_on_item_list']) || $array['rows_on_item_list'] == '')
$array['rows_on_item_list'] = 6;
$current_user->setPreference('rows_on_item_list', $array['rows_on_item_list'], 0, 'global', $current_user);
if (!isset($array['row_item_height']) || $array['row_item_height'] == '')
$array['row_item_height'] = 35;
$current_user->setPreference('row_item_height', $array['row_item_height'], 0, 'global', $current_user);
if (!isset($array['row_item_height_selected']) || $array['row_item_height_selected'] == '')
$array['row_item_height_selected'] = 70;
$current_user->setPreference('row_item_height_selected', $array['row_item_height_selected'], 0, 'global', $current_user);
if (isset($array['quick_product_item_adding']) && $array['quick_product_item_adding'])
$current_user->setPreference('quick_product_item_adding', 1, 0, 'global', $current_user);
else
$current_user->setPreference('quick_product_item_adding', 0, 0, 'global', $current_user);
//added 23.02.2009 michal
if (isset($array['show_pdf_in_div']) && $array['show_pdf_in_div'])
$current_user->setPreference('show_pdf_in_div', 1, 0, 'global', $current_user);
else
$current_user->setPreference('show_pdf_in_div', 0, 0, 'global', $current_user);
$current_user->setPreference('settings_user_save', 1, 0, 'global', $current_user);
}
static function loadSettings($user_roles = false) {
$arr = array();
error_reporting(0);
$file = 'modules/EcmGroupServices/config.php';
if (file_exists($file)) {
include($file);
if (isset($ecmgroupservices_config))
$arr = $ecmgroupservices_config;
if (is_array($arr['default_representative_role_id']))
$arr['default_representative_role_id'] = array_values($arr['default_representative_role_id']);
if (is_array($arr['default_representative_extra_role_id']))
$arr['default_representative_extra_role_id'] = array_values($arr['default_representative_extra_role_id']);
if (is_array($arr['default_manager_role_id']))
$arr['default_manager_role_id'] = array_values($arr['default_manager_role_id']);
if (!isset($arr['checkbox_demo']))
$arr['checkbox_demo'] = 0;
if (!isset($arr['show_images_on_offers']))
$arr['show_images_on_offers'] = 0;
if (!isset($arr['creating_invoice_direct_from_quote']))
$arr['creating_invoice_direct_from_quote'] = 0;
}
global $current_user;
$user_opt = $current_user->getPreference('rows_on_item_list');
if (!$user_opt || $user_opt == 0 || $user_opt == '')
$user_opt = 6;
$arr['rows_on_item_list'] = $user_opt;
$user_opt = $current_user->getPreference('row_item_height');
if (!$user_opt || $user_opt == 0 || $user_opt == '')
$user_opt = 35;
$arr['row_item_height'] = $user_opt;
$user_opt = $current_user->getPreference('row_item_height_selected');
if (!$user_opt || $user_opt == 0 || $user_opt == '')
$user_opt = 70;
$arr['row_item_height_selected'] = $user_opt;
$user_opt = $current_user->getPreference('quick_product_item_adding');
if (!$user_opt || $user_opt == 0 || $user_opt == '')
$user_opt = 0;
$arr['quick_product_item_adding'] = $user_opt;
$show_pdf = $current_user->getPreference('show_pdf_in_div');
if (!$show_pdf || $show_pdf == 0 || $show_pdf == '')
$show_pdf = 0;
$arr['show_pdf_in_div'] = $show_pdf;
$arr['settings_user_save'] = $current_user->getPreference('settings_user_save');
if ($user_roles == true) {
$arr['user_roles'] = EcmGroupService::getUserRole($current_user->id);
//is manager role
$arr_tmp = array_diff($arr['default_manager_role_id'], $arr['user_roles']);
if (is_array($arr_tmp))
$arr['user_manager_role'] = count($arr_tmp) < count($arr['default_manager_role_id']);
//is representative role
$arr_tmp = array_diff($arr['default_representative_role_id'], $arr['user_roles']);
if (is_array($arr_tmp))
$arr['user_representative_role'] = count($arr_tmp) < count($arr['default_representative_role_id']);
//is representative extra role
$arr_tmp = array_diff($arr['default_representative_extra_role_id'], $arr['user_roles']);
if (is_array($arr_tmp))
$arr['user_representative_extra_role'] = count($arr_tmp) < count($arr['default_representative_extra_role_id']);
}
return $arr;
}
static function getUserRole($id) {
$arr = array();
$query = "SELECT role_id FROM acl_roles_users WHERE user_id='$id' AND deleted='0'";
$result = $GLOBALS['db']->query($query);
if ($result) {
while ($row = $GLOBALS['db']->fetchByAssoc($result))
if ($row && isset($row['role_id']) && $row['role_id'] != '')
$arr[] = $row['role_id'];
}
return $arr;
}
}
?>

View File

@@ -0,0 +1,69 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ****************************************************************************** */
/* * *****************************************************************************
* CREATE JAVASCRIPT TO VALIDATE THE DATA ENTERED INTO A RECORD.
* ***************************************************************************** */
/*
function get_validate_record_js () {
}
*/
/* * *****************************************************************************
* CREATE FORM FOR MENU RAPID CREATE
* ***************************************************************************** */
/*
function get_new_record_form () {
}
*/
?>

View File

@@ -0,0 +1,79 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
$modules = array("EcmQuotes", "EcmServices", "EcmOrderConfirmations", "EcmDeliveryNotes", "EcmInvoiceOuts", "EcmPaymentConditions", "EcmDeliveryConditions");
//foreach($modules as $module)
//{
//if($_REQUEST['module']==$module)
//{
// $modules[7]="EcmProductLines";
// break;
//}
//}
//if(!$modules[7])
//{
//$modules[7]=$_REQUEST['module'];
//f($_REQUEST['module']!="EcmProductTaxs")$mmodules[]="EcmProductLines";
//}
//$more_modules=array("EcmProductBasis","EcmProductPackingTypes","EcmProductUsageUnits","EcmGlAccounts");
for ($i = 0; $i < count($more_modules); $i++) {
if ($more_modules[$i] == $_REQUEST['module'])
continue;
else
$mmodules[] = $more_modules[$i];
}
// $more_modules=$modules;
// var_dump($more_modules);
print '<ul class="tablist">';
foreach ($modules as $module) {
if (ACLController::checkAccess($module, 'list', true)) {
if ($_REQUEST['module'] == $module) {
$class1 = ' class="active"';
$class2 = ' class="current"';
} else {
$class1 = '';
$class2 = '';
}
if (file_exists('themes/default/images/' . $module . '.gif'))
$image = '<img src="themes/default/images/' . $module . '.gif" style="border:none;vertical-align:bottom;" />';
else
$image = '';
print '<li' . $class1 . '><a' . $class2 . ' href="index.php?module=' . $module . '&action=index">' . $image . '&nbsp;&nbsp;' . translate('LBL_MODULE_NAME', $module) . '</a></li>';
}
}
global $current_user;
if (is_admin($current_user)) {
if ($_REQUEST['action'] == "Settings") {
$class1 = ' class="active"';
$class2 = ' class="current"';
} else {
$class1 = '';
$class2 = '';
}
print '<li' . $class1 . '><a' . $class2 . ' href="index.php?module=EcmGroupServices&action=Settings">' . 'Settings' . '</a></li>';
}
//print '<li id="MoreHandle1" style="cursor: pointer; cursor: hand;" onMouseOver="tbButtonMouseOver(this.id,156,\'\',-1);"><a>&nbsp;&nbsp;&gt;&gt;&nbsp;&nbsp;</a></li></ul><br>';
print '</ul><br><div id="MoreMenu1" class="menu" onMouseOver="window.clearTimeout(SUGAR.themes.resetSubTabsTimer);" onMouseOut="SUGAR.themes.setResetTimer();">';
/*
foreach($more_modules as $more_module)
{
include("modules/".$more_module."/language/en_us.lang.php");
print '<a href="index.php?module='.$more_module.'&action=index" class="menuItem" id="'.$more_module.'Handle" parentid="MoreMenu1" onMouseOver="hiliteItem(this,\'yes\');SUGAR.themes.updateSubTabsDelay(SUGAR.themes.moreTab,\'{{MODULE_NAME|htmlspecialchars}\',\'{MODULE_NAME|htmlspecialchars}\');closeSubMenus(this);" onMouseOut="unhiliteItem(this);" onClick="SUGAR.themes.chooseTab(\''.$more_module.'\'); return true;">'.$mod_strings['LNK_'.strtoupper($more_module).'_LIST'].'</a>';
}
*/
print '</div>';
//include("modules/".$_REQUEST['module']."/language/en_us.lang.php");
?>

104
modules/EcmGroupServices/Menu.php Executable file
View File

@@ -0,0 +1,104 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ****************************************************************************** */
global $mod_strings;
// $module_menu [] = Array("index.php?module=EcmGroupServices&action=Settings&return_module=EcmGroupServices&return_action=DetailView", translate('LBL_SETTINGS_TITLE','EcmGroupServices'),"", 'EcmGroupServices');
?>

217
modules/EcmGroupServices/Save.php Executable file
View File

@@ -0,0 +1,217 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ****************************************************************************** */
require_once("modules/EcmGroupServices/EcmGroupService.php");
require_once('include/formbase.php');
$focus = new EcmGroupService();
if (isset($_POST['record']) && $_POST['record'] != '') {
$focus->retrieve($_POST['record']);
}
if (isset($focus->id) && $focus->id != '') {
$_POST['email_id'] = $focus->email_id;
}
if (!$focus->ACLAccess('Save')) {
ACLController::displayNoAccess(true);
sugar_cleanup(true);
}
/*
if (!empty($_POST['assigned_user_id']) && ($focus->assigned_user_id != $_POST['assigned_user_id']) && ($_POST['assigned_user_id'] != $current_user->id)) {
$check_notify = TRUE;
}else{
$check_notify = FALSE;
}
*/
$check_notify = FALSE;
/*
$json = getJSONobj();
$wi = $json->decode(htmlspecialchars_decode($_POST['work_items']));
$focus->work_items = $wi;
*/
foreach ($focus->column_fields as $field) {
if (isset($_POST[$field])) {
$value = $_POST[$field];
$focus->$field = $value;
}
}
foreach ($focus->additional_column_fields as $field) {
if (isset($_POST[$field])) {
$value = $_POST[$field];
$focus->$field = $value;
}
}
if (isset($_POST['to_is_vat_free']) && $_POST['to_is_vat_free'])
$focus->to_is_vat_free = 1; else
$focus->to_is_vat_free = 0;
$json = getJSONobj();
$pl = $json->decode(htmlspecialchars_decode($_POST['position_list']));
$focus->position_list = $pl;
$focus->save($check_notify);
$return_id = $focus->id;
echo $return_id;
//header("Location: index.php?module=EcmGroupServices&action=index");
//handleRedirect($return_id,'EcmGroupServices');
?>

View File

@@ -0,0 +1,175 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
// require_once('modules/EcmGroupServices/HeaderMenu.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".
* ****************************************************************************** */
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
global $app_list_strings;
require_once('modules/EcmGroupServices/EcmGroupService.php');
require_once('modules/EcmTexts/EcmText.php');
require_once ('include/time.php');
global $theme;
$theme_path = "themes/" . $theme . "/";
$image_path = $theme_path . "images/";
require_once ($theme_path . 'layout_utils.php');
$xtpl = new XTemplate('modules/EcmGroupServices/Settings.html');
$xtpl->assign("MOD", $mod_strings);
$xtpl->assign("APP", $app_strings);
if (isset($_REQUEST['return_module']))
$xtpl->assign("RETURN_MODULE", $_REQUEST['return_module']);
if (isset($_REQUEST['return_action']))
$xtpl->assign("RETURN_ACTION", $_REQUEST['return_action']);
if (isset($_REQUEST['return_id']))
$xtpl->assign("RETURN_ID", $_REQUEST['return_id']);
if (empty($_REQUEST['return_id']))
$xtpl->assign("RETURN_ACTION", 'index');
/*
$json = getJSONobj();
$scriptOpt = '<script language="javascript">
var MOD = '.str_replace('&quot;','\"',$json->encode($mod_strings)).';
</script>';
echo $scriptOpt;
*/
$cc = EcmGroupService::loadSettings();
if (is_admin($current_user)) {
$xtpl->assign("DEFAULT_PAYMENT_CONDITION_OPTIONS", get_select_options_with_id(EcmGroupService::getPositionList('ecmpaymentconditions', true), $cc['default_payment_condition']));
$xtpl->assign("DEFAULT_DELIVERY_CONDITION_OPTIONS", get_select_options_with_id(EcmGroupService::getPositionList('ecmdeliveryconditions', true), $cc['default_delivery_condition']));
$xtpl->assign("DEFAULT_DOCUMENT_TEMPLATE_OPTIONS", get_select_options_with_id(EcmGroupService::getPositionList('ecmdocumenttemplates'), $cc['default_document_template']));
$roles = EcmGroupService::getPositionList('acl_roles');
$xtpl->assign("DEFAULT_REPRESENTATIVE_ROLE_ID_OPTIONS", get_select_options_with_id($roles, $cc['default_representative_role_id']));
$xtpl->assign("DEFAULT_REPRESENTATIVE_EXTRA_ROLE_ID_OPTIONS", get_select_options_with_id($roles, $cc['default_representative_extra_role_id']));
$xtpl->assign("DEFAULT_MANAGER_ROLE_ID_OPTIONS", get_select_options_with_id($roles, $cc['default_manager_role_id']));
$xtpl->assign("CREATING_INVOICE_DIRECT_FROM_QUOTE", ($cc['creating_invoice_direct_from_quote'] == 1 ? 'CHECKED' : ''));
$xtpl->assign("CHECKBOX_DEMO", ($cc['checkbox_demo'] == 1 ? 'CHECKED' : ''));
$xtpl->assign("CHECKBOX_SHOW_IMAGES_ON_OFFERS", ($cc['show_images_on_offers'] == 1 ? 'CHECKED' : ''));
//added 23.12.2009 michal
$xtpl->assign("ROWS_ON_ITEM_LIST_GLOBAL", $cc['rows_on_item_list_global']);
$xtpl->assign("ROW_ITEM_HEIGHT_GLOBAL", $cc['row_item_height_global']);
$xtpl->assign("ROW_ITEM_HEIGHT_SELECTED_GLOBAL", $cc['row_item_height_selected_global']);
$xtpl->assign("QUICK_PRODUCT_ITEM_ADDING_GLOBAL", ($cc['quick_product_item_adding_global'] == 1 ? 'CHECKED' : ''));
$xtpl->assign("SHOW_PDF_IN_DIV_GLOBAL", ($cc['show_pdf_in_div_global'] == 1 ? 'CHECKED' : ''));
$xtpl->parse("main.admin_settings");
}
if ($cc['settings_user_save'])
$xtpl->assign("ROWS_ON_ITEM_LIST", $cc['rows_on_item_list']);
else
$xtpl->assign("ROWS_ON_ITEM_LIST", $cc['rows_on_item_list_global']);
if ($cc['settings_user_save'])
$xtpl->assign("ROW_ITEM_HEIGHT", $cc['row_item_height']);
else
$xtpl->assign("ROW_ITEM_HEIGHT", $cc['row_item_height_global']);
if ($cc['settings_user_save'])
$xtpl->assign("ROW_ITEM_HEIGHT_SELECTED", $cc['row_item_height_selected']);
else
$xtpl->assign("ROW_ITEM_HEIGHT_SELECTED", $cc['row_item_height_selected_global']);
if ($cc['settings_user_save'])
$xtpl->assign("QUICK_PRODUCT_ITEM_ADDING", ($cc['quick_product_item_adding'] == 1 ? 'CHECKED' : ''));
else
$xtpl->assign("QUICK_PRODUCT_ITEM_ADDING", ($cc['quick_product_item_adding_global'] == 1 ? 'CHECKED' : ''));
//added 23.12.2009 michal
if ($cc['settings_user_save'])
$xtpl->assign("SHOW_PDF_IN_DIV", ($cc['show_pdf_in_div'] == 1 ? 'CHECKED' : ''));
else
$xtpl->assign("SHOW_PDF_IN_DIV", ($cc['show_pdf_in_div_global'] == 1 ? 'CHECKED' : ''));
$xtpl->parse("main.my_own_settings");
echo "\n<p>\n";
echo get_module_title('EcmGroupServices', $GLOBALS['mod_strings']['LBL_SETTINGS_TITLE'], true);
echo "\n</p>\n";
$tabs = "";
$tabs.='<ul class="subpanelTablist" style="margin-top:10px;" id="groupTabsPanels">';
if (is_admin($current_user)) {
$tabs.='<li class="active" id="l_admin">
<a class="current" id="a_admin" href="javascript:showTab(\'admin\');">' . $mod_strings['LBL_ADMIN_SETTINGS'] . '</a>
</li>
<li class="" id="l_global">
<a class="other" id="a_global" href="javascript:showTab(\'global\');">' . $mod_strings['LBL_GLOBAL_SETTINGS'] . '</a>
</li>';
$tabs.='<li class="" id="l_user">
<a class="other" id="a_user" href="javascript:showTab(\'user\');">' . $mod_strings['LBL_MY_OWN_SETTINGS'] . '</a>
</li>
</ul>';
} else {
$tabs.='<li class="active" id="l_user">
<a class="current" id="a_user" href="javascript:showTab(\'user\');">' . $mod_strings['LBL_MY_OWN_SETTINGS'] . '</a>
</li>';
}
$tabs.='</ul>';
$xtpl->assign("TABS", $tabs);
$xtpl->parse("main");
$xtpl->out("main");
require_once('include/javascript/javascript.php');
$javascript = new javascript();
// $javascript->setFormName('PDFLanguages');
// $javascript->addAllFields('');
//BUILDER:START Pro only
// $javascript->addFieldGeneric( 'team_name', 'varchar', $app_strings['LBL_TEAM'] ,'true');
// $javascript->addToValidateBinaryDependency('team_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_TEAM'], 'false', '', 'team_id');
//BUILDER:END Pro only
// $javascript->addFieldGeneric('central_areacode', 'varchar', $mod_strings['LBL_CENTRAL_AREACODE'] , 'true');
// $javascript->addToValidateBinaryDependency('central_areacode', 'alpha' ,$app_strings['ERR_SQS_NO_MATCH_FIELD'].$mod_strings['LBL_CENTRAL_AREACODE'], 'false', '', 'team_id');
// $javascript->addToValidateBinaryDependency('assigned_user_name', 'alpha', $app_strings['ERR_SQS_NO_MATCH_FIELD'] . $app_strings['LBL_ASSIGNED_TO'], 'false', '', 'assigned_user_id');
echo $javascript->getScript();
?>

View File

@@ -0,0 +1,50 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * *******************************************************************************
* SugarCRM is a customer relationship management program developed by
* SugarCRM, Inc. Copyright (C) 2004 - 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".
* ****************************************************************************** */
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
require_once('modules/EcmGroupServices/EcmGroupService.php');
EcmGroupService::saveSettings($_POST);
header("Location: index.php?module=" . $_REQUEST['return_module'] . "&action=" . $_REQUEST['return_action']);
?>

View File

@@ -0,0 +1,18 @@
<?php
$ecmgroupservices_config = array (
'default_payment_condition' => '',
'default_delivery_condition' => '',
'default_document_template' => '20e764d0-7816-5115-475b-4f3d1be98260',
'default_representative_role_id' => NULL,
'default_representative_extra_role_id' => NULL,
'default_manager_role_id' => NULL,
'checkbox_demo' => 0,
'show_images_on_offers' => 1,
'creating_invoice_direct_from_quote' => 0,
'rows_on_item_list_global' => '',
'row_item_height_global' => '',
'row_item_height_selected_global' => '',
'quick_product_item_adding_global' => 0,
'show_pdf_in_div_global' => 0,
);
?>

View File

@@ -0,0 +1,173 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ****************************************************************************** */
$fields_array['EcmGroupService'] = array(
'column_fields' => Array(
'id',
'name',
'description',
'date_entered',
'date_modified',
'deleted',
'modified_user_id',
'assigned_user_id',
'created_by',
//NEW COLUMN FIELDS
'number',
'parent_type',
'parent_name',
'parent_id',
'type',
'ecmgroupservice_id',
'ecmgroupservice_name',
'status',
'register_date',
'sell_date',
'payment_date',
'parent_address_street',
'parent_address_city',
'parent_address_postalcode',
'parent_address_country',
'to_nip',
'subtotal',
'total',
'to_vatid',
'to_is_vat_free',
'header_text',
'footer_text',
'ads_text',
'template_id',
'template_name',
'email_id'
),
'list_fields' => Array(
'number',
'formatted_number',
'parent_type',
'parent_name',
'parent_id',
'type',
'ecmgroupservice_id',
'ecmgroupservice_name',
'status',
'register_date',
'sell_date',
'payment_date',
'parent_address_street',
'parent_address_city',
'parent_address_postalcode',
'parent_address_country',
'to_nip',
'subtotal',
'total',
'to_vatid',
'to_is_vat_free',
'header_text',
'footer_text',
'ads_text',
'template_id',
'template_name',
'email_id'
),
'required_fields' => array(
'number' => 1
),
);
?>

View File

@@ -0,0 +1,6 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
include('Settings.php');

View File

@@ -0,0 +1,88 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ****************************************************************************** */
$mod_strings = array(
//added 23.02.2009
'LBL_SHOW_PDF_IN_DIV' => 'Show PDF in div',
'LBL_GLOBAL_SETTINGS' => 'Global Settings',
//added 09.02.2009
'LBL_SHOW_IMAGES_ON_OFFERS' => 'Show images on offers',
// FOR SYSTEM USE
'LBL_MODULE_NAME' => 'Settings',
'LBL_MODULE_TITLE' => 'Settings: Home',
'LBL_MODULE_ID' => 'EcmSettings',
'LBL_SEARCH_FORM_TITLE' => 'Settings Search',
'LBL_LIST_FORM_TITLE' => 'Settings List',
'LBL_NEW_FORM_TITLE' => 'New Setting',
'LBL_DASHLET_MY_ECMGROUPServiceS' => 'Settings',
'LBL_SETTINGS_TITLE' => 'Settings',
'LBL_DEFAULT_MANAGER_ROLE_ID' => 'Manager Role',
'LBL_DEFAULT_REPRESENTATIVE_EXTRA_ROLE_ID' => 'Auto-Commiting Role',
'LBL_DEFAULT_REPRESENTATIVE_ROLE_ID' => 'Representative Role',
'LBL_DEFAULT_DELIVERY_CONDITION' => 'Default Delivery Condition',
'LBL_DEFAULT_PAYMENT_CONDITION' => 'Default Payment Condition',
'LBL_MY_OWN_SETTINGS' => 'My Own Settings',
'LBL_ADMIN_SETTINGS' => 'Admin Settings',
'LBL_ROWS_ON_ITEM_LIST' => 'Rows on item list',
'LBL_ROW_ITEM_HEIGHT' => 'Row item height',
'LBL_ROW_ITEM_HEIGHT_SELECTED' => 'Row item height selected',
'LBL_QUICK_PRODUCT_ITEM_ADDING' => 'Quick product item adding',
'LBL_CHECKBOX_DEMO' => '- 10 - Max Number of Records',
'LBL_CREATING_INVOICE_DIRECT_FROM_QUOTE' => 'Creating Invoice Direct From Quote',
'LBL_DEFAULT_DOCUMENT_TEMPLATE' => 'Default Document Template',
);
?>

View File

@@ -0,0 +1,83 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ****************************************************************************** */
$mod_strings = array(
// FOR SYSTEM USE
'LBL_MODULE_NAME' => 'Settings',
'LBL_MODULE_TITLE' => 'Settings: Home',
'LBL_MODULE_ID' => 'EcmSettings',
'LBL_SEARCH_FORM_TITLE' => 'Settings Search',
'LBL_LIST_FORM_TITLE' => 'Settings List',
'LBL_NEW_FORM_TITLE' => 'New Setting',
'LBL_DASHLET_MY_ECMGROUPServiceS' => 'Settings',
'LBL_SETTINGS_TITLE' => 'Settings',
'LBL_DEFAULT_MANAGER_ROLE_ID' => 'Manager Role',
'LBL_DEFAULT_REPRESENTATIVE_EXTRA_ROLE_ID' => 'Auto-Commiting Role',
'LBL_DEFAULT_REPRESENTATIVE_ROLE_ID' => 'Representative Role',
'LBL_DEFAULT_DELIVERY_CONDITION' => 'Default Delivery Condition',
'LBL_DEFAULT_PAYMENT_CONDITION' => 'Default Payment Condition',
'LBL_MY_OWN_SETTINGS' => 'My Own Settings',
'LBL_ADMIN_SETTINGS' => 'Admin Settings',
'LBL_ROWS_ON_ITEM_LIST' => 'Rows on item list',
'LBL_ROW_ITEM_HEIGHT' => 'Row item height',
'LBL_ROW_ITEM_HEIGHT_SELECTED' => 'Row item height selected',
'LBL_QUICK_PRODUCT_ITEM_ADDING' => 'Quick product item adding',
'LBL_CHECKBOX_DEMO' => '- 10 - Max Number of Records',
'LBL_CREATING_INVOICE_DIRECT_FROM_QUOTE' => 'Creating Invoice Direct From Quote',
'LBL_DEFAULT_DOCUMENT_TEMPLATE' => 'Default Document Template',
);
?>

View File

@@ -0,0 +1,88 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ****************************************************************************** */
$mod_strings = array(
//added 23.02.2009
'LBL_SHOW_PDF_IN_DIV' => 'Pokaz PDFa w divie',
'LBL_GLOBAL_SETTINGS' => 'Ustawienia Globalne',
//added 09.02.2009
'LBL_SHOW_IMAGES_ON_OFFERS' => 'Pokaz obrazki w PDFach',
// FOR SYSTEM USE
'LBL_MODULE_NAME' => 'Ustawienia',
'LBL_MODULE_TITLE' => 'Ustawienia: Home',
'LBL_MODULE_ID' => 'EcmSettings',
'LBL_SEARCH_FORM_TITLE' => 'Wyszukaj',
'LBL_LIST_FORM_TITLE' => 'Ustawienia',
'LBL_NEW_FORM_TITLE' => 'Nowe Ustaiwenia',
'LBL_DASHLET_MY_ECMGROUPServiceS' => 'Ustawienia',
'LBL_SETTINGS_TITLE' => 'Ustawienia',
'LBL_DEFAULT_MANAGER_ROLE_ID' => 'Menedzer Roli',
'LBL_DEFAULT_REPRESENTATIVE_EXTRA_ROLE_ID' => 'Rola Automatycznie Potwierdzajaca',
'LBL_DEFAULT_REPRESENTATIVE_ROLE_ID' => 'Rola Reprezentant',
'LBL_DEFAULT_DELIVERY_CONDITION' => 'Domyslne Warunki Dostawy',
'LBL_DEFAULT_PAYMENT_CONDITION' => 'Domyslne Warunki Platnosci',
'LBL_MY_OWN_SETTINGS' => 'Moje Wlasne Ustawienia',
'LBL_ADMIN_SETTINGS' => 'Ustawienia Admina',
'LBL_ROWS_ON_ITEM_LIST' => 'Liczba Wierszy w Liscie Produktów',
'LBL_ROW_ITEM_HEIGHT' => 'Wysokosc Wiersza',
'LBL_ROW_ITEM_HEIGHT_SELECTED' => 'Wysokosc Wybranego Wiersza',
'LBL_QUICK_PRODUCT_ITEM_ADDING' => 'Szybkie Dodawanie Produktu',
'LBL_CHECKBOX_DEMO' => '- 10 - Maksymalna Liczba Rekordów',
'LBL_CREATING_INVOICE_DIRECT_FROM_QUOTE' => 'Twórz Fakture Bezposrednio z Oferty',
'LBL_DEFAULT_DOCUMENT_TEMPLATE' => 'Domyslny Szablon',
);
?>

View File

@@ -0,0 +1,111 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ****************************************************************************** */
$searchFields['EcmGroupServices'] = array(
'name' => array('query_type' => 'default'),
'description' => array('query_type' => 'default'),
'current_user_only' => array('query_type' => 'default', 'db_field' => array('assigned_user_id'), 'my_items' => true),
'assigned_user_id' => array('query_type' => 'default'),
);
?>

View File

@@ -0,0 +1,278 @@
<?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".
* ****************************************************************************** */
global $app_list_strings;
$viewdefs['EcmGroupServices']['DetailView'] = array(
'templateMeta' => array(
'form' => array(
'buttons' => array('EDIT', 'DUPLICATE', 'DELETE',
array(
'customCode' => '<input name="groupservice_pdf" id="groupservice_pdf" title="{$MOD.LBL_GROUPService_PDF_BUTTON_TITLE}" accessKey="{$MOD.LBL_GROUPService_PDF_BUTTON_KEY}" class="button" onclick="window.location = \'index.php?module=EcmGroupServices&action=previewPDF&to_pdf=1&record={$fields.id.value}\';" type="button" value="{$MOD.LBL_GROUPService_PDF}">'
),
array(
'customCode' => '<input name="groupservice_to_invoice" id="groupservice_to_invoice" title="{$MOD.LBL_GROUPService_TO_INVOICE_BUTTON_TITLE}" accessKey="{$MOD.LBL_GROUPService_TO_INVOICE_BUTTON_KEY}" class="button" onclick="window.location = \'index.php?module=EcmInvoiceOuts&action=EditView&out_id={$fields.id.value}&out_module=EcmGroupServices&return_module=EcmGroupServices&return_action=DetailView&return_id={$fields.id.value}\';" type="button" value="{$MOD.LBL_GROUPService_TO_INVOICE}">'
),
/*
array(
'customCode' => '<input name="workreport_to_invoice" id="workreport_to_invoice" title="{$MOD.LBL_WORKREPORT_TO_INVOICE_BUTTON_TITLE}" accessKey="{$MOD.LBL_WORKREPORT_TO_INVOICE_BUTTON_KEY}" class="button" onclick="window.location = \'index.php?module=EcmInvoiceOuts&action=EditView&work_report_record={$fields.id.value}\';" type="button" value="{$MOD.LBL_WORKREPORT_TO_INVOICE}">'
),
*/
),
'hidden' => array(
'<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>',
'<input type="hidden" name="parent_type" id="parent_type" value="{$fields.parent_type.value}">',
'<input type="hidden" name="parent_id" id="parent_id" value="{$fields.parent_id.value}">',
'<input type="hidden" name="assigned_user_id" id="assigned_user_id" value="{$fields.assigned_user_id.value}">',
'<input type="hidden" name="email_id" id="email_id" value="">',
),
),
'maxColumns' => '2',
'widths' => array(
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30')
),
'includes' => array(
array('file' => 'include/JSON.js'),
array('file' => 'modules/EcmGroupServices/MyTable.js'),
array('file' => 'modules/EcmGroupServices/EcmGroupServicesDetailView.js'),
),
),
'panels' => array(
'DETAILS' => array(
array(array('type' => 'tab', 'active' => true, 'allCols' => true, 'hideLabel' => true, 'customCode' => '<b>{$MOD.LBL_DETAILS}</b>')),
array(
'formatted_number',
'assigned_user_name'
),
array(
'name',
'parent_name'
),
array(
'status',
'template_name'
),
array(
'register_date'
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' => '<br><b>{$MOD.LBL_TO_INFORMATIONS}</b>'
),
),
array('parent_address_street'),
array('parent_address_postalcode', 'to_nip'),
array('parent_address_city', 'to_vatid'),
array('parent_address_country',
array(
'name' => 'to_is_vat_free',
'tabIndex' => 't',
'customCode' => '<input type="checkbox" disabled="disabled" id="to_is_vat_free" name="to_is_vat_free" value="{$fields.to_is_vat_free.value}" {if $fields.to_is_vat_free.value == 1}checked{/if}>'
),
),
),
'ITEMS' => array(
array(array('type' => 'tab', 'allCols' => true, 'hideLabel' => true, 'customCode' => '<b>{$MOD.LBL_ITEMS}</b>')),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' => '
'
// .'{literal}'.
// '<script language="javascript">var parent_options='.$json->encode($app_list_strings['ecmworkitems_parent_dom']).';</script>'
// .'{/literal}'.
. '
<link rel="stylesheet" type="text/css" href="modules/EcmGroupServices/MyTable.css" />
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:300px;max-height:300px;overflow:auto;">
<table class="positions" style="width:100%;" id="itemsTable">
<thead id="head">
<tr id="tr">
<td width="6%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="10%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="44%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="7%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
<td width="13%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="8%">{$MOD.LBL_EDITTABLE_DISCOUNT}</td>
<td width="13%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
<table width="100%"" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="55%" class="dataLabel" valign="top">
&nbsp;
</td> <!--color:#b3b9cf;-->
<td width="40%" class="dataField" style="text-align: left;">
<br>
<table id="result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
<tr id="subtotal_tr">
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_SUBTOTAL}</td>
<td class="positionsField" style="border-top:0px;"><input type="text" style="border:0px;font-weight:900;width:100%;text-align:right;" readonly="readonly" name="subtotal" id="subtotal" value=\'{$fields.subtotal.value}\'></td>
</tr>
<tr id="total_tr">
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total" id="total" value=\'{$fields.total.value}\'></td>
</tr>
</table>
</td>
<td width="5%" class="dataField" style="text-align: left;">&nbsp;</td>
</tr>
</table>
',
)
),
),
'TEXTS' => array(
array(array('type' => 'tab', 'allCols' => true, 'hideLabel' => true, 'customCode' => '<b>{$MOD.LBL_TEXTS}</b>')),
array('header_text'),
array('footer_text'),
array('ads_text'),
),
'PREVIEW' => array(
array(array('type' => 'tab', 'allCols' => true, 'hideLabel' => true, 'customCode' => '<b>{$MOD.LBL_PREVIEW}</b>')),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' => '<span id="previewPDF" width="100%" height="100%"></span>'
),
),
),
'EMAIL' => array(
array(array('type' => 'tab', 'allCols' => true, 'hideLabel' => true, 'customCode' => '<b>{$MOD.LBL_EMAIL}</b>')),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' => '<span id="emailTAB" width="100%" height="100%"></span>'
),
),
),
),
);
?>

View File

@@ -0,0 +1,311 @@
<?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".
* ****************************************************************************** */
global $sugar_config;
/*
if((!isset($focus->footer_text) || $focus->footer_text == '') && (!isset($focus->name) || $focus->name == '') && (!isset($focus->id) || $focus->id == '')) $focus->footer_text = translate('LBL_DEFAULT_FOOTER_TEXT', 'EcmDocumentTemplates');
if((!isset($focus->header_text) || $focus->header_text == '') && (!isset($focus->name) || $focus->name == '') && (!isset($focus->id) || $focus->id == '')) $focus->header_text = translate('LBL_DEFAULT_HEADER_TEXT', 'EcmDocumentTemplates');
*/
$viewdefs['EcmGroupServices']['EditView'] = array(
'templateMeta' => array(
'form' => array(
'enctype' => 'multipart/form-data',
'buttons' => array(
array('customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="return SaveForm();" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">'),
//array('customCode' => '<input title="{$MOD.LBL_SEND_BUTTON_TITLE}" accessKey="{$MOD.LBL_SEND_BUTTON_KEY}" class="button" onclick="prepSave();this.form.email_action.value=\'Save\';this.form.email_send.value=\'1\';this.form.email_type.value=\'out\';return fill_form(\'out\', \'MOD.ERR_NOT_ADDRESSED\');return SaveForm(); return false;" type="submit" name="button" value="{$MOD.LBL_SEND_BUTTON_LABEL}">'),
array('customCode' => '<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="window.location=\'index.php?module=EcmGroupServices&action=DetailView&record=\'+this.form.record.value;" type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">'),
array('customCode' => '<input title="{$MOD.LBL_GO_TO_LIST_BUTTON_TITLE}" accessKey="{$MOD.LBL_GO_TO_LIST_BUTTON_KEY}" class="button" onclick="window.location=\'index.php?module=EcmGroupServices&action=index\'" type="button" name="button" value="{$MOD.LBL_GO_TO_LIST_BUTTON_LABEL}">'),
),
'hidden' => array(
'<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>',
'<input type="hidden" name="email_id" id="email_id" value=\'\'>', //{$fields.email_id.value}\'>',
// '<input type="hidden" name="total" id="total" value=\'{$fields.total.value}\'>',
),
),
'maxColumns' => '2',
'widths' => array(
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30'),
),
'includes' => array(
array('file' => 'include/JSON.js'),
array('file' => 'include/javascript/quicksearch.js'),
array('file' => 'modules/EcmGroupServices/formloader.js'),
array('file' => 'modules/EcmGroupServices/MyTable.js'),
array('file' => 'modules/EcmGroupServices/EcmGroupServices.js'),
),
),
'panels' => array(
'DETAILS' => array(
array(array('type' => 'tab', 'active' => true,)),
array(
array(
'name' => 'formatted_number',
'tabIndex' => 'f',
'customCode' => '<input readonly="readonly" type="text" name="formatted_number" id="formatted_number" value=\'{$fields.formatted_number.value}\'>
<input type="hidden" name="number" id="number" value=\'{$fields.number.value}\'>'
),
'assigned_user_name'
),
array(
'name',
'parent_name'
),
array(
'status',
array(
'label' => 'LBL_TEMPLATE_NAME',
'customCode' => '<select id="template_id" name="template_id" onChange="document.getElementById(\'template_name\').value=this.options[this.selectedIndex].text;">{$DOCUMENT_TEMPLATES_OPTIONS}</select><input type="hidden" id="template_name" name="template_name" value="{$fields.template_name.value}">'
),
),
array(
array(
'name' => 'register_date',
'type' => 'datetime',
'displayParams' => array('showFormats' => true)
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' => '<div class="tabForm" style="border-top:none;width:100%;height:1px;padding:0px;align:center;"></div><h4>{$MOD.LBL_TO_INFORMATIONS}</h4>'
),
),
array(
array(
'name' => 'parent_address_street',
'tabIndex' => 'p',
'customCode' => '<textarea id="parent_address_street" name="parent_address_street" rows="2" cols="30" maxlength="150">{$fields.parent_address_street.value}</textarea>',
),
),
array('parent_address_postalcode', 'to_nip'),
array('parent_address_city', 'to_vatid'),
array(
'parent_address_country',
array(
'name' => 'to_is_vat_free',
'tabIndex' => 't',
'customCode' => '<input type="checkbox" id="to_is_vat_free" name="to_is_vat_free" value="{$fields.to_is_vat_free.value}" {if $fields.to_is_vat_free.value == 1}checked{/if}>'
),
),
),
'ITEMS' => array(
array(array('type' => 'tab')),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' => '
'
// .'{literal}'.
// '<script language="javascript">var parent_options='.$json->encode($app_list_strings['ecmworkitems_parent_dom']).';</script>'
// .'{/literal}'.
. '
<link rel="stylesheet" type="text/css" href="modules/EcmGroupServices/MyTable.css" />
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:300px;max-height:300px;overflow:auto;">
<table class="positions" style="width:100%;" id="itemsTable">
<thead id="head">
<tr id="tr">
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="10%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="42%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
<td width="13%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="8%">{$MOD.LBL_EDITTABLE_DISCOUNT}</td>
<td width="13%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
<table width="100%"" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="55%" class="dataLabel" valign="top">
<a href="javascript: N.moveUpRow();" >{$MOD.LBL_MOVE_ROW_UP}</a> - <a href="javascript: N.moveDownRow();" >{$MOD.LBL_MOVE_ROW_DOWN}</a>
</td> <!--color:#b3b9cf;-->
<td width="40%" class="dataField" style="text-align: left;">
<br>
<table id="result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
<tr id="subtotal_tr">
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_SUBTOTAL}</td>
<td class="positionsField" style="border-top:0px;"><input type="text" style="border:0px;font-weight:900;width:100%;text-align:right;" readonly="readonly" name="subtotal" id="subtotal" value=\'{$fields.subtotal.value}\'></td>
</tr>
<tr id="total_tr">
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total" id="total" value=\'{$fields.total.value}\'></td>
</tr>
</table>
</td>
<td width="5%" class="dataField" style="text-align: left;">&nbsp;</td>
</tr>
</table>
',
)
),
),
'TEXTS' => array(
array(array('type' => 'tab')),
array(array('label' => 'LBL_HEADER_TEXT', 'customCode' => ''),),
array(array('tabIndex' => 'f', 'customCode' => '<textarea id="header_text" name="header_text" rows="5" style="width:100%;">{$fields.header_text.value}</textarea>')),
array(array('label' => 'LBL_FOOTER_TEXT', 'customCode' => ''),),
array(array('tabIndex' => 'f', 'customCode' => '<textarea id="footer_text" name="footer_text" rows="5" style="width:100%;">{$fields.footer_text.value}</textarea>')),
array(array('label' => 'LBL_ADS_TEXT', 'customCode' => '{$MFP.ads}'),),
array(array('tabIndex' => 'f', 'customCode' => '<textarea id="ads_text" name="ads_text" rows="5" style="width:100%;">{$fields.ads_text.value}</textarea>')),
),
'PREVIEW' => array(
array(array('type' => 'tab')),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' => '<span id=\'previewPDF\' width="100%" height="100%"></span>'
),
),
),
'EMAIL' => array(
array(
array(
'type' => 'tab',
)
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' => '<span id=\'emailTAB\' width="100%" height="100%"></span>'
),
),
),
),
);
?>

View File

@@ -0,0 +1,118 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ****************************************************************************** */
$listViewDefs["EcmGroupServices"] = array(
'STATUS' => array(
'width' => '5',
'label' => 'LBL_STATUS',
'default' => true,
'sortable' => false,
),
'FORMATTED_NUMBER' => array(
'width' => '12',
'label' => 'LBL_NUMBER',
'sortable' => true,
'link' => true,
//'customCode' => '<a href="index.php?module=EcmGroupServices&offset=1&return_module=EcmGroupServices&action=EditView&record={$ID}">{$FORMATTED_NUMBER}</a>',
'default' => true,
),
'NAME' => array(
'width' => '20',
'label' => 'LBL_NAME',
'default' => true,
'sortable' => false),
'TOTAL' => array(
'width' => '10',
'label' => 'LBL_TOTAL',
'default' => true,
),
'MODIFIED_BY_NAME' => array(
'width' => '10',
'label' => 'LBL_MODIFIED_USER',
'module' => 'Users',
'id' => 'USERS_ID',
'default' => false,
'sortable' => false,
'related_fields' => array('modified_user_id'),
),
'REGISTER_DATE' => array(
'width' => '15',
'label' => 'LBL_REGISTER_DATE',
'default' => true,
'sortable' => true,
),
'CONVERT' => array(
'width' => '2',
'label' => '&nbsp;',
'link' => true,
'default' => true,
'sortable' => false,
'customCode' => '<a href="index.php?module=EcmInvoiceOuts&action=EditView&out_id={$ID}&out_module=EcmGroupServices&return_module=EcmGroupServices&return_action=index"><img border="0" src="modules/EcmGroupServices/images/convert.gif" title="' . translate('LBL_LIST_TO_INVOICE', 'EcmGroupServices') . '" /></a>'
),
'PDF_URL' => array(
'width' => '2',
'label' => '&nbsp;',
'link' => true,
'default' => true,
'sortable' => false,
'customCode' => '<a href="index.php?module=EcmGroupServices&action=previewPDF&record={$ID}&to_pdf=1"><img border="0" src="themes/default/images/pdf.gif" title="PDF" /></a>'
),
'DUPLICATE' => array(
'width' => '2',
'label' => '&nbsp;',
'default' => true,
'customCode' => '<a href="index.php?module=EcmGroupServices&action=EditView&record={$ID}&isDuplicate=true"><img border="0" src="themes/default/images/duplicate.jpg" title="Duplicate" /></a>',
'sortable' => false,
),
);
?>

View File

@@ -0,0 +1,91 @@
<?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".
* ****************************************************************************** */
$searchdefs['EcmGroupServices'] = array(
'templateMeta' => array(
'maxColumns' => '3',
'widths' => array(
'label' => '10',
'field' => '30'
),
),
'layout' => array(
'basic_search' => array(
'name',
),
'advanced_search' => array(
'name',
),
),
);
?>

View File

@@ -0,0 +1,105 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/**
* Layout definition for Accounts
*
* 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".
*/
$layout_defs['EcmGroupServices']['subpanel_setup'] = array(
'notes' => array(
'order' => 15,
'module' => 'Notes',
'sort_order' => 'asc',
'sort_by' => 'date_modified',
'get_subpanel_data' => 'notes',
'add_subpanel_data' => 'note_id',
'subpanel_name' => 'ForEcmGroupServices',
'title_key' => 'LBL_NOTES_SUBPANEL_TITLE',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopSelectButton'),
array('widget_class' => 'SubPanelTopCreateButton'),
),
),
'emails' => array(
'order' => 15,
'module' => 'Emails',
'sort_order' => 'asc',
'sort_by' => 'date_modified',
'get_subpanel_data' => 'emails',
'add_subpanel_data' => 'emails_id',
'subpanel_name' => 'ForHistory',
'title_key' => 'LBL_EMAILS_SUBPANEL_TITLE',
'top_buttons' => array(),
),
);
?>

View File

@@ -0,0 +1,125 @@
<?php
if (!defined('sugarEntry') || !sugarEntry)
die('Not A Valid Entry Point');
/* * ***************************************************************************
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
* Version 1.1 ("License"); You may not use this file except in compliance
* with the License. You may obtain a copy of the License at
* http://opensource.org/licenses/rpl.php. Software distributed under the
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
* either express or implied.
*
* You may:
* a) Use and distribute this code exactly as you received without payment or
* a royalty or other fee.
* b) Create extensions for this code, provided that you make the extensions
* publicly available and document your modifications clearly.
* c) Charge for a fee for warranty or support or for accepting liability
* obligations for your customers.
*
* You may NOT:
* a) Charge for the use of the original code or extensions, including in
* electronic distribution models, such as ASP (Application Service
* Provider).
* b) Charge for the original source code or your extensions other than a
* nominal fee to cover distribution costs where such distribution
* involves PHYSICAL media.
* c) Modify or delete any pre-existing copyright notices, change notices,
* or License text in the Licensed Software
* d) Assert any patent claims against the Licensor or Contributors, or
* which would in any way restrict the ability of any third party to use the
* Licensed Software.
*
* You must:
* a) Document any modifications you make to this code including the nature of
* the change, the authors of the change, and the date of the change.
* b) Make the source code for any extensions you deploy available via an
* Electronic Distribution Mechanism such as FTP or HTTP download.
* c) Notify the licensor of the availability of source code to your extensions
* and include instructions on how to acquire the source code and updates.
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
* reproduce, perform, modify, sublicense, and distribute your extensions.
*
* The Original Code is: CommuniCore
* Olavo Farias
* 2006-04-7 olavo.farias@gmail.com
*
* The Initial Developer of the Original Code is CommuniCore.
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
* All Rights Reserved.
* ****************************************************************************** */
$dictionary['EcmGroupService'] = array(
'table' => "ecmgroupservices",
'comment' => 'EcmGroupServices',
'duplicate_merge' => true,
'unified_search' => true,
//FIELDS SECTION
'fields' => array(
//STANDARD FIELDS SECTION
),
//INDICES SECTION
'indices' => array(
array('name' => 'ecmgroupservices' . 'pk', 'type' => 'primary', 'fields' => array('id')),
array('name' => 'idx_' . 'ecmgroupservices' . '_name', 'type' => 'index', 'fields' => array('name'))
),
//RELATIONSHIPS SECTION
'relationships' => array(
),
//THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW
'optimistic_locking' => true,
);
?>