Add php files
This commit is contained in:
90
modules/EcmFkPackages/Delete.php
Executable file
90
modules/EcmFkPackages/Delete.php
Executable file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
*
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
/* * ******************************************************************************
|
||||
* Description: Deletes an Account record and then redirects the browser to the
|
||||
* defined return URL.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
* ****************************************************************************** */
|
||||
|
||||
global $mod_strings;
|
||||
|
||||
if (!isset($_REQUEST['record']))
|
||||
sugar_die($mod_strings['ERR_DELETE_RECORD']);
|
||||
|
||||
$focus = new EcmFkPackage();
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
if (!$focus->ACLAccess('Delete')) {
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
|
||||
//if (isset($_REQUEST['object']) && $_REQUEST['object'] = "ecmfkbookrevision") {
|
||||
// //delete ecmfkbook revision.
|
||||
// $focus = new EcmFkPackageRevision();
|
||||
//
|
||||
// UploadFile::unlink_file($_REQUEST['revision_id'], $_REQUEST['filename']);
|
||||
//} else {
|
||||
//delete ecmfkbook and its revisions.
|
||||
// $focus = new EcmFkPackage();
|
||||
// $focus->retrieve($_REQUEST['record']);
|
||||
//
|
||||
// $focus->load_relationships('revisions');
|
||||
// $revisions = $focus->get_linked_beans('revisions', 'EcmFkPackageRevision');
|
||||
//
|
||||
// if (!empty($revisions) && is_array($revisions)) {
|
||||
// foreach ($revisions as $key => $thisversion) {
|
||||
// UploadFile::unlink_file($thisversion->id, $thisversion->filename);
|
||||
// //mark the version deleted.
|
||||
// $thisversion->mark_deleted($thisversion->id);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
$focus->mark_deleted($_REQUEST['record']);
|
||||
|
||||
$uri = 'index.php?module=' . $_REQUEST['return_module'] . '&action=' . $_REQUEST['return_action'] . '&record=' . $_REQUEST['return_id'];
|
||||
|
||||
header('Location: ' . $uri);
|
||||
exit;
|
||||
184
modules/EcmFkPackages/DetailView.php
Executable file
184
modules/EcmFkPackages/DetailView.php
Executable file
@@ -0,0 +1,184 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
|
||||
//require_once('modules/EcmGroupFkPackages/HeaderMenu.php');
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||||
|
||||
require_once('modules/EcmFkPackages/EcmFkPackage.php');
|
||||
// require_once('modules/EcmFkPackages/Forms.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$file = 'modules/EcmGroupFkPackages/EcmGroupFkPackage.php';
|
||||
|
||||
if (file_exists($file)) {
|
||||
$cc = array();
|
||||
require_once($file);
|
||||
$cc = EcmGroupFkPackage::loadSettings();
|
||||
}
|
||||
|
||||
|
||||
$OPT = array();
|
||||
|
||||
$OPT['row_item_height'] = $cc['row_item_height'];
|
||||
$OPT['row_item_height_selected'] = $cc['row_item_height_selected'];
|
||||
$OPT['rows_on_item_list'] = $cc['rows_on_item_list'];
|
||||
$OPT['position_table_height'] = $OPT['row_item_height'] * $OPT['rows_on_item_list'] + 40 + $OPT['rows_on_item_list'] * 4;
|
||||
|
||||
$focus = new EcmFkPackage();
|
||||
|
||||
if (isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
if($focus->total == '')
|
||||
$focus->total = '0';
|
||||
|
||||
if($focus->subtotal == '')
|
||||
$focus->subtotal = '0';
|
||||
|
||||
$focus->format_all_fields();
|
||||
|
||||
if (isset($_REQUEST['status']) && $_REQUEST['status'] != '') {
|
||||
$focus->doNotAccepted();
|
||||
}
|
||||
|
||||
/*
|
||||
echo '<pre>PL:' . var_export($focus->getPositionList(true), true) . PHP_EOL;
|
||||
echo '<pre>PL:' . var_export($focus->getFkPackagePositionList(true), true) . PHP_EOL;
|
||||
echo '<pre>PL:' . var_export($focus->getIncomePositionList(true), true) . PHP_EOL;
|
||||
exit;
|
||||
*/
|
||||
|
||||
// $focus->position_list = str_replace('"', '\"', $focus->getPositionList());
|
||||
// $focus->fkpackages_list = str_replace('"', '\"', $focus->getFkPackagePositionList());
|
||||
// $focus->income_list = str_replace('"', '\"', $focus->getIncomePositionList());
|
||||
|
||||
$OPT['status'] = $focus->status;
|
||||
} else {
|
||||
$OPT['new_number'] = true;
|
||||
|
||||
$datef = $current_user->getPreference('datef');
|
||||
|
||||
if ($datef != '')
|
||||
$sugar_config['datef'];
|
||||
|
||||
$focus->register_date = date($datef);
|
||||
|
||||
$focus->payment_date = date($datef, mktime() + 30 * 24 * 60 * 60);
|
||||
|
||||
$focus->sell_date = date($datef);
|
||||
}
|
||||
|
||||
//if access 'Delete' is avaible for user than he is Manager and he can confirm Quotes.
|
||||
$OPT['user']['access']['send_email'] = $focus->ACLAccess("send_email");
|
||||
if (isset($_REQUEST['send_email']) && $_REQUEST['send_email'] == '1')
|
||||
$OPT['setTab'] = 'EMAIL';
|
||||
|
||||
$tmp = $current_user->getPreference('num_grp_sep');
|
||||
if (!isset($tmp) || $tmp == '' || $tmp == NULL)
|
||||
$tmp = $sugar_config['default_number_grouping_seperator'];
|
||||
|
||||
$OPT['sep_1000'] = $tmp;
|
||||
|
||||
$tmp = $current_user->getPreference('dec_sep');
|
||||
if (!isset($tmp) || $tmp == '' || $tmp == NULL)
|
||||
$tmp = $sugar_config['default_decimal_seperator'];
|
||||
|
||||
$OPT['dec_sep'] = $tmp;
|
||||
|
||||
$tmp = $current_user->getPreference('default_currency_significant_digits');
|
||||
if (!isset($tmp) || $tmp == '' || $tmp == NULL)
|
||||
$tmp = $sugar_config['default_currency_significant_digits'];
|
||||
|
||||
$OPT['dec_len'] = $tmp;
|
||||
|
||||
|
||||
$OPT['default_unit'] = "1";
|
||||
|
||||
$OPT['default_vat'] = "23.00";
|
||||
|
||||
$OPT['default_category'] = "";
|
||||
|
||||
$OPT['type'] = $focus->type;
|
||||
|
||||
$OPT['to_is_vat_free'] = $focus->to_is_vat_free;
|
||||
|
||||
$cq = $current_user->getPreference('confirm_quotes');
|
||||
$OPT['user']['confirm_quotes'] = ((isset($cq) && $cq) ? 1 : 0);
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$show_pdf = $current_user->getPreference('show_pdf_in_div');
|
||||
|
||||
if (!isset($show_pdf)) {
|
||||
require_once('modules/EcmGroupFkPackages/EcmGroupFkPackage.php');
|
||||
$cc = EcmGroupFkPackage::loadSettings();
|
||||
$show_pdf = $cc['show_pdf_in_div_global'];
|
||||
}
|
||||
|
||||
$scriptOpt = '
|
||||
<script language="javascript">
|
||||
var SHOW_PDF_IN_DIV =' . $show_pdf . ';
|
||||
var OPT = ' . str_replace('"', '\"', $json->encode($OPT)) . ';
|
||||
var MOD = ' . str_replace('"', '\"', $json->encode($mod_strings)) . ';
|
||||
var N, N2;
|
||||
</script>
|
||||
';
|
||||
|
||||
echo $scriptOpt;
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/EcmFkPackages/views/DetailView/view.detail.my.php');
|
||||
|
||||
$edit = new ViewDetailMy();
|
||||
$edit->ss = new Sugar_Smarty();
|
||||
|
||||
$edit->module = 'EcmFkPackages';
|
||||
$edit->bean = $focus;
|
||||
$edit->tplFile = 'include/ECM/EcmViews/DetailView/Tabs/DetailView.tpl';
|
||||
//$edit->bean->total = unformat_number($edit->bean->total);
|
||||
//$edit->bean->total = format_number($edit->bean->total);
|
||||
|
||||
$edit->preDisplay();
|
||||
|
||||
// $arr_template = $focus->getTemplateList();
|
||||
|
||||
if (isset($focus->template_id))
|
||||
$edit->ss->assign("DOCUMENT_TEMPLATES_OPTIONS", get_select_options_with_id($arr_template, $focus->template_id));
|
||||
else
|
||||
$edit->ss->assign("DOCUMENT_TEMPLATES_OPTIONS", get_select_options_with_id($arr_template, ''));
|
||||
|
||||
$focus->history = htmlspecialchars_decode($focus->history) ? : '[]';
|
||||
|
||||
//echo '<pre>' . var_export(strlen($focus->history), true) . '</pre>';
|
||||
//echo '<pre>' . var_export(json_decode($focus->history, true), true) . '</pre>';
|
||||
|
||||
$edit->ss->assign('HISTORY', json_decode($focus->history, true));
|
||||
|
||||
|
||||
$edit->ss->assign("POSITION_LIST", $focus->position_list);
|
||||
$edit->ss->assign("SERVICES_LIST", $focus->fkpackages_list);
|
||||
$edit->ss->assign("INCOME_LIST", $focus->income_list);
|
||||
|
||||
//echo '<pre>P' . var_export($focus->position_list, true) . '</pre>' . PHP_EOL;
|
||||
//echo '<pre>S' . var_export($focus->fkpackages_list, true) . '</pre>' . PHP_EOL;
|
||||
//echo '<pre>I' . var_export($focus->income_list, true) . '</pre>' . PHP_EOL;
|
||||
//exit;
|
||||
|
||||
// $edit->ss->assign("EMAIL_LINK", $focus->createSendEmailLink());
|
||||
|
||||
// $email_link_tab = '<script language="javascript">YAHOO.util.Event.addListener(window,"load",function(){setEMAIL = function(){' . $focus->createSendEmailLink() . '}});</script>';
|
||||
$edit->ss->assign("EMAIL_LINK_TAB", $email_link_tab);
|
||||
|
||||
$edit->ss->assign("OPT", $OPT);
|
||||
|
||||
echo $edit->display();
|
||||
|
||||
require_once('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles($focus, 'EcmFkPackages');
|
||||
echo $subpanel->display();
|
||||
91
modules/EcmFkPackages/DocumentSoap.php
Executable file
91
modules/EcmFkPackages/DocumentSoap.php
Executable file
@@ -0,0 +1,91 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('include/upload_file.php');
|
||||
|
||||
|
||||
require_once('include/upload_file.php');
|
||||
|
||||
class EcmFkPackageSoap{
|
||||
var $upload_file;
|
||||
function EcmFkPackageSoap(){
|
||||
$this->upload_file = new UploadFile('uploadfile');
|
||||
}
|
||||
|
||||
function saveFile($ecmfkpackage, $portal = false){
|
||||
global $sugar_config;
|
||||
|
||||
$focus = new EcmFkPackage();
|
||||
|
||||
|
||||
|
||||
if(!empty($ecmfkpackage['id'])){
|
||||
$focus->retrieve($ecmfkpackage['id']);
|
||||
}else{
|
||||
return '-1';
|
||||
}
|
||||
|
||||
if(!empty($ecmfkpackage['file'])){
|
||||
$decodedFile = base64_decode($ecmfkpackage['file']);
|
||||
$this->upload_file->set_for_soap($ecmfkpackage['filename'], $decodedFile);
|
||||
|
||||
$ext_pos = strrpos($this->upload_file->stored_file_name, ".");
|
||||
$this->upload_file->file_ext = substr($this->upload_file->stored_file_name, $ext_pos + 1);
|
||||
if (in_array($this->upload_file->file_ext, $sugar_config['upload_badext'])) {
|
||||
$this->upload_file->stored_file_name .= ".txt";
|
||||
$this->upload_file->file_ext = "txt";
|
||||
}
|
||||
|
||||
$revision = new EcmFkPackageRevision();
|
||||
$revision->filename = $this->upload_file->get_stored_file_name();
|
||||
$revision->file_mime_type = $this->upload_file->getMimeSoap($revision->filename);
|
||||
$revision->file_ext = $this->upload_file->file_ext;
|
||||
//$revision->ecmfkpackage_name = ;
|
||||
$revision->revision = $ecmfkpackage['revision'];
|
||||
$revision->ecmfkpackage_id = $document['id'];
|
||||
$revision->save();
|
||||
|
||||
$focus->ecmfkpackage_revision_id = $revision->id;
|
||||
$focus->save();
|
||||
$return_id = $revision->id;
|
||||
$this->upload_file->final_move($revision->id);
|
||||
}else{
|
||||
return '-1';
|
||||
}
|
||||
return $return_id;
|
||||
}
|
||||
}
|
||||
?>
|
||||
309
modules/EcmFkPackages/EcmFkPackage.php
Executable file
309
modules/EcmFkPackages/EcmFkPackage.php
Executable file
@@ -0,0 +1,309 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
*
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
require_once ('include/upload_file.php');
|
||||
|
||||
class EcmFkPackage extends SugarBean {
|
||||
|
||||
var $id;
|
||||
var $ecmfkpackage_name;
|
||||
var $description;
|
||||
var $category_id;
|
||||
var $subcategory_id;
|
||||
var $status_id;
|
||||
var $status;
|
||||
var $created_by;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $active_date;
|
||||
var $exp_date;
|
||||
var $ecmfkpackage_revision_id;
|
||||
var $filename;
|
||||
var $img_name;
|
||||
var $img_name_bare;
|
||||
var $related_doc_id;
|
||||
var $related_doc_name;
|
||||
var $related_doc_rev_id;
|
||||
var $related_doc_rev_number;
|
||||
var $is_template;
|
||||
var $template_type;
|
||||
//additional fields.
|
||||
var $revision;
|
||||
var $last_rev_create_date;
|
||||
var $last_rev_created_by;
|
||||
var $last_rev_created_name;
|
||||
var $file_url;
|
||||
var $file_url_noimage;
|
||||
var $table_name = "ecmfkpackages";
|
||||
var $object_name = "EcmFkPackage";
|
||||
var $user_preferences;
|
||||
var $encodeFields = Array();
|
||||
// This is used to retrieve related fields from form posts.
|
||||
var $additional_column_fields = Array(
|
||||
//'revision',
|
||||
);
|
||||
var $new_schema = true;
|
||||
var $module_dir = 'EcmFkPackages';
|
||||
var $save_file;
|
||||
var $relationship_fields = Array(
|
||||
'contract_id' => 'contracts',
|
||||
);
|
||||
|
||||
function EcmFkPackage() {
|
||||
parent :: SugarBean();
|
||||
$this->setupCustomFields('EcmFkPackages'); //parameter is module name
|
||||
//$this->disable_row_level_security = false;
|
||||
}
|
||||
|
||||
function save($check_notify = false) {
|
||||
if (empty($this->id) || $this->new_with_id) {
|
||||
if (false) { //!empty($this->uploadfile))
|
||||
$this->filename = $this->uploadfile;
|
||||
if (empty($this->id)) {
|
||||
$this->id = create_guid();
|
||||
$this->new_with_id = true;
|
||||
}
|
||||
$Revision = new EcmFkPackageRevision();
|
||||
//save revision.
|
||||
$Revision->change_log = translate('DEF_CREATE_LOG', 'EcmFkPackages');
|
||||
$Revision->revision = $this->revision;
|
||||
$Revision->ecmfkpackage_id = $this->id;
|
||||
$Revision->filename = $this->filename;
|
||||
$Revision->file_ext = $this->file_ext;
|
||||
$Revision->file_mime_type = $this->file_mime_type;
|
||||
$Revision->save();
|
||||
|
||||
//Move file saved during populatefrompost to match the revision id rather than ecmfkpackage id
|
||||
rename(UploadFile :: get_url($this->filename, $this->id), UploadFile :: get_url($this->filename, $Revision->id));
|
||||
|
||||
//update ecmfkpackage with latest revision id
|
||||
$this->process_save_dates = false; //make sure that conversion does not happen again.
|
||||
$this->ecmfkpackage_revision_id = $Revision->id;
|
||||
}
|
||||
|
||||
//set relationship field values if contract_id is passed (via subpanel create)
|
||||
if (!empty($_POST['contract_id'])) {
|
||||
$save_revision['ecmfkpackage_revision_id'] = $this->document_revision_id;
|
||||
$this->load_relationship('contracts');
|
||||
$this->contracts->add($_POST['contract_id'], $save_revision);
|
||||
}
|
||||
|
||||
if ((isset($_POST['load_signed_id']) and !empty($_POST['load_signed_id']))) {
|
||||
$query = "update linked_ecmfkpackages set deleted=1 where id='" . $_POST['load_signed_id'] . "'";
|
||||
$this->db->query($query);
|
||||
}
|
||||
}
|
||||
|
||||
return parent :: save($check_notify);
|
||||
}
|
||||
|
||||
function get_summary_text() {
|
||||
return "$this->ecmfkpackage_name";
|
||||
}
|
||||
|
||||
function is_authenticated() {
|
||||
return $this->authenticated;
|
||||
}
|
||||
|
||||
function fill_in_additional_list_fields() {
|
||||
$this->fill_in_additional_detail_fields();
|
||||
}
|
||||
|
||||
function fill_in_additional_detail_fields() {
|
||||
goto jump;
|
||||
|
||||
global $theme;
|
||||
global $current_language;
|
||||
global $timedate;
|
||||
global $locale;
|
||||
|
||||
parent::fill_in_additional_detail_fields();
|
||||
|
||||
$mod_strings = return_module_language($current_language, 'EcmFkPackages');
|
||||
|
||||
$query = "SELECT filename,revision,file_ext FROM ecmfkpackage_revisions WHERE id='$this->document_revision_id'";
|
||||
|
||||
$result = $this->db->query($query);
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
|
||||
//popuplate filename
|
||||
if (isset($row['filename']))
|
||||
$this->filename = $row['filename'];
|
||||
//$this->latest_revision = $row['revision'];
|
||||
if (isset($row['revision']))
|
||||
$this->revision = $row['revision'];
|
||||
|
||||
//populate the file url.
|
||||
//image is selected based on the extension name <ext>_icon_inline, extension is stored in ecmfkpackage_revisions.
|
||||
//if file is not found then default image file will be used.
|
||||
global $img_name;
|
||||
global $img_name_bare;
|
||||
if (!empty($row['file_ext'])) {
|
||||
$img_name = SugarThemeRegistry::current()->getImageURL(strtolower($row['file_ext']) . "_image_inline.gif");
|
||||
$img_name_bare = strtolower($row['file_ext']) . "_image_inline";
|
||||
}
|
||||
|
||||
//set default file name.
|
||||
if (!empty($img_name) && file_exists($img_name)) {
|
||||
$img_name = $img_name_bare;
|
||||
} else {
|
||||
$img_name = "def_image_inline"; //todo change the default image.
|
||||
}
|
||||
if ($this->ACLAccess('DetailView')) {
|
||||
$this->file_url = "<a href='index.php?entryPoint=download&id=" . basename(UploadFile :: get_url($this->filename, $this->ecmfkpackage_revision_id)) . "&type=EcmFkPackages' target='_blank'>" . SugarThemeRegistry::current()->getImage($img_name, 'alt="' . $mod_strings['LBL_LIST_VIEW_DOCUMENT'] . '" border="0"') . "</a>";
|
||||
$this->file_url_noimage = basename(UploadFile :: get_url($this->filename, $this->ecmfkpackage_revision_id));
|
||||
} else {
|
||||
$this->file_url = "";
|
||||
$this->file_url_noimage = "";
|
||||
}
|
||||
|
||||
//get last_rev_by user name.
|
||||
$query = "SELECT first_name,last_name, ecmfkpackage_revisions.date_entered as rev_date FROM users, document_revisions WHERE users.id = document_revisions.created_by and document_revisions.id = '$this->document_revision_id'";
|
||||
$result = $this->db->query($query, true, "Eror fetching user name: ");
|
||||
$row = $this->db->fetchByAssoc($result);
|
||||
if (!empty($row)) {
|
||||
$this->last_rev_created_name = $locale->getLocaleFormattedName($row['first_name'], $row['last_name']);
|
||||
|
||||
$this->last_rev_create_date = $timedate->to_display_date_time($row['rev_date']);
|
||||
}
|
||||
|
||||
global $app_list_strings;
|
||||
if (!empty($this->status_id)) {
|
||||
//_pp($this->status_id);
|
||||
$this->status = $app_list_strings['ecmfkpackage_status_dom'][$this->status_id];
|
||||
}
|
||||
$this->related_doc_name = EcmFkPackage::get_ecmfkpackage_name($this->related_doc_id);
|
||||
$this->related_doc_rev_number = EcmFkPackageRevision::get_ecmfkpackage_revision_name($this->related_doc_rev_id);
|
||||
$this->save_file = basename($this->file_url_noimage);
|
||||
|
||||
jump:
|
||||
}
|
||||
|
||||
function list_view_parse_additional_sections(& $list_form, $xTemplateSection) {
|
||||
return $list_form;
|
||||
}
|
||||
|
||||
function create_export_query(&$order_by, &$where, $relate_link_join = '') {
|
||||
$custom_join = $this->custom_fields->getJOIN(true, true, $where);
|
||||
if ($custom_join)
|
||||
$custom_join['join'] .= $relate_link_join;
|
||||
$query = "SELECT
|
||||
ecmfkpackages.*";
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join['select'];
|
||||
}
|
||||
$query .= " FROM ecmfkpackages ";
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join['join'];
|
||||
}
|
||||
|
||||
$where_auto = " ecmfkpackages.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 ecmfkpackages.document_name";
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
function get_list_view_data() {
|
||||
global $current_language;
|
||||
|
||||
$app_list_strings = return_app_list_strings_language($current_language);
|
||||
|
||||
$ecmfkpackage_fields = $this->get_list_view_array();
|
||||
|
||||
$ecmfkbook_fields['PACKAGE_AMOUNT_COLORED'] = (floatval($amount = $ecmfkbook_fields['PACKAGE_AMOUNT']) > 0) ? ('<span style="color: #f00; font-weight: bold;">' . $amount . '</span>') : $amount;
|
||||
|
||||
//$ecmfkpackage_fields['FILE_URL'] = $this->file_url;
|
||||
//$ecmfkpackage_fields['FILE_URL_NOIMAGE'] = $this->file_url_noimage;
|
||||
//$ecmfkpackage_fields['LAST_REV_CREATED_BY'] = $this->last_rev_created_name;
|
||||
//$ecmfkpackage_fields['CATEGORY_ID'] = empty ($this->category_id) ? "" : $app_list_strings['document_category_dom'][$this->category_id];
|
||||
//$ecmfkpackage_fields['SUBCATEGORY_ID'] = empty ($this->subcategory_id) ? "" : $app_list_strings['document_subcategory_dom'][$this->subcategory_id];
|
||||
//$ecmfkpackage_fields['DOCUMENT_NAME_JAVASCRIPT'] = $GLOBALS['db']->helper->escape_quote($document_fields['DOCUMENT_NAME']);
|
||||
|
||||
/*
|
||||
echo '<pre>' . var_export($this->field_defs, true) . '</pre>';
|
||||
echo '<pre>' . var_export($ecmfkpackage_fields, true) . '</pre>';
|
||||
exit;
|
||||
*/
|
||||
|
||||
return $ecmfkpackage_fields;
|
||||
}
|
||||
|
||||
function mark_relationships_deleted($id) {
|
||||
//do nothing, this call is here to avoid default delete processing since
|
||||
//delete.php handles deletion of ecmfkpackage revisions.
|
||||
}
|
||||
|
||||
function bean_implements($interface) {
|
||||
switch ($interface) {
|
||||
case 'ACL' :
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//static function.
|
||||
function get_ecmfkpackage_name($doc_id) {
|
||||
if (empty($doc_id))
|
||||
return null;
|
||||
|
||||
$db = DBManagerFactory::getInstance();
|
||||
$query = "select ecmfkpackage_name from documents where id='$doc_id'";
|
||||
$result = $db->query($query);
|
||||
if (!empty($result)) {
|
||||
$row = $db->fetchByAssoc($result);
|
||||
if (!empty($row)) {
|
||||
return $row['ecmfkpackage_name'];
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
315
modules/EcmFkPackages/EditView.php
Executable file
315
modules/EcmFkPackages/EditView.php
Executable file
@@ -0,0 +1,315 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
global $sugar_config, $current_user, $mod_strings, $current_user, $app_list_strings;
|
||||
|
||||
// include_once('modules/EcmQuotes/EcmQuote.php');
|
||||
require_once('modules/EcmFkPackages/EcmFkPackage.php');
|
||||
// require_once('modules/EcmFkPackages/Forms.php');
|
||||
require_once('include/json_config.php');
|
||||
|
||||
$json_config = new json_config();
|
||||
|
||||
$file = 'modules/EcmGroupFkPackages/EcmGroupFkPackage.php';
|
||||
if (file_exists($file)) {
|
||||
$cc = array();
|
||||
require_once($file);
|
||||
$cc = EcmGroupFkPackage::loadSettings();
|
||||
}
|
||||
|
||||
$OPT = array();
|
||||
|
||||
$OPT['row_item_height'] = $cc['row_item_height'];
|
||||
$OPT['row_item_height_selected'] = $cc['row_item_height_selected'];
|
||||
$OPT['rows_on_item_list'] = $cc['rows_on_item_list'];
|
||||
$OPT['position_table_height'] = $OPT['row_item_height'] * $OPT['rows_on_item_list'] + 40 + $OPT['rows_on_item_list'] * 4;
|
||||
$OPT['quick_product_item_adding'] = $cc['quick_product_item_adding'];
|
||||
$OPT['check_parent_id'] = true;
|
||||
$cq = $current_user->getPreference('confirm_quotes');
|
||||
$OPT['user']['confirm_quotes'] = ((isset($cq) && $cq) ? 1 : 0);
|
||||
|
||||
$focus = new EcmFkPackage();
|
||||
|
||||
$OPT['auto_commiting'] = $focus->ACLAccess('auto_commiting');
|
||||
|
||||
if (isset($_REQUEST['record'])) {
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
if (isset($focus->id) && $focus->id != '') {
|
||||
if ($focus->accepted == 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
$focus->format_all_fields();
|
||||
|
||||
// $focus->position_list = str_replace('"', '\'', $focus->getPositionList());
|
||||
// $focus->fkpackages_list = str_replace('"', '\'', $focus->getFkPackagePositionList());
|
||||
// $focus->income_list = str_replace('"', '\'', $focus->getIncomePositionList());
|
||||
|
||||
if (!isset($focus->status) || $focus->status == '')
|
||||
$focus->status = 's10';
|
||||
elseif ($focus->status = 's40')
|
||||
$focus->status = 's10';
|
||||
|
||||
//$focus->deleteReservations();
|
||||
// $focus->unreserve();
|
||||
|
||||
$OPT['save_temp_reservations'] = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$OPT['new_number'] = true;
|
||||
$focus->status = 'registered';
|
||||
}
|
||||
|
||||
if ($_REQUEST['ecmquote_id']) {
|
||||
$quo = new EcmQuote();
|
||||
$quo->retrieve($_REQUEST['ecmquote_id']);
|
||||
|
||||
$arr = array('parent_id', 'parent_name', 'status', 'name', 'register_date', 'currency_id', 'template_id', 'validtill_date', 'is_vat_free', 'to_vatid', 'ecmlanguage', 'parent_address_street', 'parent_address_city', 'parent_address_postalcode', 'parent_address_country', 'parent_name_copy', 'parent_contact_name', 'parent_contact_title', 'show_primary_params', 'show_advanced_params');
|
||||
|
||||
foreach ($arr as $a) {
|
||||
$focus->$a = $quo->$a;
|
||||
}
|
||||
}
|
||||
|
||||
$OPT['user']['access']['send_email'] = $focus->ACLAccess('send_email');
|
||||
$OPT['old_status'] = (isset($focus->status) && $focus->status != '') ? $focus->status : 'not_accepted';
|
||||
|
||||
if ($_REQUEST['isDuplicate'] == 'true') {
|
||||
$_POST['isDuplicate'] = true;
|
||||
$focus->id = '';
|
||||
$OPT['isDuplicate'] = ture;
|
||||
$OPT['new_number'] = true;
|
||||
}
|
||||
|
||||
if (!isset($focus->discount) || $focus->discount == '')
|
||||
$focus->discount = 0.00;
|
||||
|
||||
if ($OPT['new_number'] == true) {
|
||||
$datef = $current_user->getPreference('datef');
|
||||
|
||||
if ($datef != '')
|
||||
$sugar_config['datef'];
|
||||
|
||||
$focus->register_date = date($datef);
|
||||
$focus->payment_date = date($datef, mktime() + 30 * 24 * 60 * 60);
|
||||
$focus->sell_date = date($datef);
|
||||
}
|
||||
|
||||
$tmp = $current_user->getPreference('num_grp_sep');
|
||||
if (!isset($tmp) || $tmp == '' || $tmp == NULL)
|
||||
$tmp = $sugar_config['default_number_grouping_seperator'];
|
||||
|
||||
$OPT['sep_1000'] = $tmp;
|
||||
|
||||
$tmp = $current_user->getPreference('dec_sep');
|
||||
if (!isset($tmp) || $tmp == '' || $tmp == NULL)
|
||||
$tmp = $sugar_config['default_decimal_seperator'];
|
||||
|
||||
$OPT['dec_sep'] = $tmp;
|
||||
|
||||
$tmp = $current_user->getPreference('default_currency_significant_digits');
|
||||
|
||||
if (!isset($tmp) || $tmp == '' || $tmp == NULL)
|
||||
$tmp = $sugar_config['default_currency_significant_digits'];
|
||||
|
||||
$OPT['dec_len'] = $tmp;
|
||||
|
||||
$OPT['default_unit'] = 'SZT.';
|
||||
$OPT['default_vat'] = '23.00';
|
||||
$OPT['default_category'] = '';
|
||||
$OPT['default_currency'] = '-99';
|
||||
$OPT['type'] = $focus->type;
|
||||
$OPT['to_is_vat_free'] = $focus->to_is_vat_free;
|
||||
|
||||
require_once('modules/EcmTexts/EcmText.php');
|
||||
foreach ($app_list_strings['ecmlanguages_dom'] as $key => $value) {
|
||||
$data = EcmText::LoadText(null, null, 'EcmFkPackages', $key);
|
||||
if (isset($data[0]) && isset($data[0]['data']))
|
||||
$d = $data[0]['data']; else {
|
||||
$d = $PDFLL;
|
||||
if (!isset($d['labels']))
|
||||
$d['labels'] = $PDFLL['labels'];
|
||||
|
||||
if (!isset($d['texts']['Contacts']['header_text']))
|
||||
$d['texts']['Contacts']['header_text'] = $mod_strings['LBL_DEFAULT_CONTACT_HEADER_TEXT'];
|
||||
|
||||
if (!isset($d['texts']['Contacts']['footer_text']))
|
||||
$d['texts']['Contacts']['footer_text'] = $mod_strings['LBL_DEFAULT_CONTACT_FOOTER_TEXT'];
|
||||
|
||||
if (!isset($d['texts']['Contacts']['ads_text']))
|
||||
$d['texts']['Contacts']['ads_text'] = $mod_strings['LBL_DEFAULT_CONTACT_ADS_TEXT'];
|
||||
|
||||
if (!isset($d['texts']['Accounts']['header_text']))
|
||||
$d['texts']['Accounts']['header_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_HEADER_TEXT'];
|
||||
|
||||
if (!isset($d['texts']['Accounts']['footer_text']))
|
||||
$d['texts']['Accounts']['footer_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_FOOTER_TEXT'];
|
||||
|
||||
if (!isset($d['texts']['Accounts']['ads_text']))
|
||||
$d['texts']['Accounts']['ads_text'] = $mod_strings['LBL_DEFAULT_ACCOUNT_ADS_TEXT'];
|
||||
}
|
||||
$OPT['ecmlanguage'][$key]['texts'] = $d['texts'];
|
||||
}
|
||||
|
||||
$show_pdf = $current_user->getPreference('show_pdf_in_div');
|
||||
if (!isset($show_pdf)) {
|
||||
require_once('modules/EcmGroupFkPackages/EcmGroupFkPackage.php');
|
||||
$cc = EcmGroupFkPackage::loadSettings();
|
||||
$show_pdf = $cc['show_pdf_in_div_global'];
|
||||
}
|
||||
|
||||
$w = $GLOBALS[db]->query('select name,id,value from ecmvats where deleted=\'0\' order by name');
|
||||
$nvats = mysql_num_rows($w);
|
||||
while ($r = $GLOBALS[db]->fetchByAssoc($w)) {
|
||||
$VAT[$r['id']] = array(
|
||||
'id' => $r['id'],
|
||||
'name' => $r['name'],
|
||||
'value' => $r['value']
|
||||
);
|
||||
}
|
||||
|
||||
//echo '<pre>' . var_export($OPT, true); exit;
|
||||
$json = getJSONobj();
|
||||
$scriptOpt = '
|
||||
<script language="javascript">
|
||||
var SHOW_PDF_IN_DIV = ' . ($show_pdf ? : 'false') . ';
|
||||
var OPT = ' . str_replace('"', '"', $json->encode($OPT)) . ';
|
||||
var MOD = ' . str_replace('"', '"', $json->encode($mod_strings)) . ';
|
||||
var N, N2;
|
||||
</script>
|
||||
';
|
||||
|
||||
echo $scriptOpt;
|
||||
|
||||
require_once('include/MVC/View/SugarView.php');
|
||||
require_once('modules/EcmFkPackages/views/EditView/view.edit.ecmfkpackages.php');
|
||||
|
||||
$edit = new ViewEditEcmFkPackages();
|
||||
$edit->ss = new Sugar_Smarty();
|
||||
$edit->module = 'EcmFkPackages';
|
||||
$edit->bean = $focus;
|
||||
$edit->tplFile = 'include/ECM/EcmViews/EditView/Tabs/EditView.tpl';
|
||||
|
||||
// Build rw stock and pw stock option lists.
|
||||
$w = $GLOBALS['db']->query("select name,id from ecmstocks where deleted='0' order by name asc");
|
||||
|
||||
$stock_id = ($focus->stock_id ? : $GLOBALS['app_list_strings']['ecmfkpackages_stock_id_dom']);
|
||||
$pw_stock_id = ($focus->pw_stock_id ? : $GLOBALS['app_list_strings']['ecmfkpackages_pw_stock_id_dom']);
|
||||
|
||||
$stocks[] = $pw_stocks[] = '<option value="">' . $GLOBALS['app_list_strings']['stock_select'] . '</option>';
|
||||
|
||||
while ($r = $GLOBALS['db']->fetchByAssoc($w)) {
|
||||
$option = '<option value="'. $r['id'] . '"%s>' . $r['name'] . '</option>';
|
||||
|
||||
$stock_selected = $r['id'] == $stock_id;
|
||||
$pw_stock_selected = $r['id'] == $pw_stock_id;
|
||||
|
||||
array_push($stocks , sprintf($option, $stock_selected ? ' selected' : ''));
|
||||
array_push($pw_stocks , sprintf($option, $pw_stock_selected ? ' selected' : ''));
|
||||
}
|
||||
|
||||
$status = array();
|
||||
foreach($app_list_strings['ecmfkpackages_status_dom'] as $key => $value)
|
||||
{
|
||||
$option = '<option value="'. $key . '"%s>' . $value . '</option>';
|
||||
|
||||
$selected = ($key == $focus->status);
|
||||
//var_dump($key, $value, $selected);
|
||||
|
||||
array_push($status , sprintf($option, $selected ? ' selected' : ''));
|
||||
}
|
||||
|
||||
$edit->ss->assign('STATUS', implode($status));
|
||||
|
||||
$repair_status = array();
|
||||
foreach($app_list_strings['ecmfkpackages_repair_status_dom'] as $key => $value) {
|
||||
$option = '<option value="' . $key . '"%s>' . $value . '</option>';
|
||||
|
||||
$selected = ($key == $focus->repair_status);
|
||||
|
||||
array_push($repair_status, sprintf($option, $selected ? ' selected' : ''));
|
||||
}
|
||||
|
||||
$edit->ss->assign('REPAIR_STATUS', implode($repair_status));
|
||||
|
||||
$focus->history = htmlspecialchars_decode($focus->history) ? : '[]';
|
||||
|
||||
//echo '<pre>' . var_export(strlen($focus->history), true) . '</pre>';
|
||||
//echo '<pre>' . var_export(json_decode($focus->history, true), true) . '</pre>';
|
||||
|
||||
$edit->ss->assign('HISTORY', json_decode($focus->history, true));
|
||||
|
||||
$edit->ss->assign('STOCK', implode($stocks));
|
||||
$edit->ss->assign('PW_STOCK', implode($pw_stocks));
|
||||
$edit->ss->assign('OPT', $OPT);
|
||||
$edit->preDisplay();
|
||||
|
||||
// Build templates option list.
|
||||
// $arr_template = $focus->getTemplateList();
|
||||
|
||||
// $tt = array();
|
||||
|
||||
// foreach ($arr_template as $k => $v) {
|
||||
// $option = '<option value="'. $k . '"%s>' . $v . '</option>';
|
||||
|
||||
// $selected = ($k == $focus->template_id);
|
||||
|
||||
// array_push($tt , sprintf($option, $selected ? ' selected' : ''));
|
||||
// }
|
||||
|
||||
// $edit->ss->assign('DOCUMENT_TEMPLATES_OPTIONS', implode($tt));
|
||||
|
||||
if (count($_REQUEST['check']) > 0) {
|
||||
foreach ($_REQUEST['check'] as $ch) {
|
||||
$r = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query('select * from ecmquoteitems where id=' . $ch . ''));
|
||||
$pos = EcmQuote::getPosition($r);
|
||||
$pos['item_id'] = $ch;
|
||||
$ret[] = $pos;
|
||||
}
|
||||
//print_r($ret);die();
|
||||
$focus->position_list = $json->encode($ret);
|
||||
}
|
||||
|
||||
if (!$focus->id)
|
||||
$temp_id = create_guid();
|
||||
else
|
||||
$temp_id = $focus->id;
|
||||
|
||||
$edit->ss->assign('TEMP_ID', $temp_id);
|
||||
|
||||
$pk = array(
|
||||
array(
|
||||
'wn' => 123.0,
|
||||
'amo' => 123.1,
|
||||
'ma' => 123.2,
|
||||
),
|
||||
);
|
||||
|
||||
$regisry = array(
|
||||
array(
|
||||
'wn' => 321.0,
|
||||
'amo' => 321.1,
|
||||
'ma' => 321.2,
|
||||
),
|
||||
);
|
||||
|
||||
$pkTemp = $json->encode($pk);
|
||||
$registryTemp = $json->encode($regisry);
|
||||
|
||||
echo '<pre>' . var_export($pkTemp, true) . '</pre>';
|
||||
echo '<pre>' . var_export($registryTemp, true) . '</pre>';
|
||||
//exit;
|
||||
|
||||
$edit->ss->assign('PK_LIST', $pkTemp);
|
||||
$edit->ss->assign('REGISTRY_LIST', $registryTemp);
|
||||
|
||||
// $edit->ss->assign('MFP', $focus->loadParserArray());
|
||||
|
||||
echo $edit->display();
|
||||
|
||||
//echo '<div id='subpanels'>';
|
||||
//require_once('subpanels.php');
|
||||
//echo '</div>';
|
||||
52
modules/EcmFkPackages/GetLatestRevision.php
Executable file
52
modules/EcmFkPackages/GetLatestRevision.php
Executable file
@@ -0,0 +1,52 @@
|
||||
<?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".
|
||||
********************************************************************************/
|
||||
//updates the link between contract and ecmfkpackage with latest revision of
|
||||
//the ecmfkpackage and sends the control back to calling page.
|
||||
|
||||
require_once('modules/EcmFkPackages/EcmFkPackage.php');
|
||||
require_once('include/formbase.php');
|
||||
if (!empty($_REQUEST['record'])) {
|
||||
|
||||
$ecmfkpackage = new EcmFkPackage();
|
||||
$ecmfkpackage->retrieve($_REQUEST['record']);
|
||||
if (!empty($ecmfkpackage->document_revision_id) && !empty($_REQUEST['get_latest_for_id'])) {
|
||||
$query="update linked_ecmfkpackages set document_revision_id='{$document->document_revision_id}', date_modified='".gmdate($GLOBALS['timedate']->get_db_date_time_format())."' where id ='{$_REQUEST['get_latest_for_id']}' ";
|
||||
$ecmfkpackage->db->query($query);
|
||||
}
|
||||
}
|
||||
handleRedirect();
|
||||
?>
|
||||
79
modules/EcmFkPackages/Menu.php
Executable file
79
modules/EcmFkPackages/Menu.php
Executable file
@@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the 'Powered by
|
||||
* SugarCRM' logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* 'Powered by SugarCRM'.
|
||||
* ****************************************************************************** */
|
||||
|
||||
/* * *******************************************************************************
|
||||
* Description: TODO To be written.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
* ****************************************************************************** */
|
||||
|
||||
global $mod_strings;
|
||||
global $current_user;
|
||||
|
||||
|
||||
if (ACLController::checkAccess('EcmFkPackages', 'edit', true))
|
||||
$module_menu[] = array(
|
||||
'index.php?module=EcmFkPackages&action=EditView&return_module=EcmFkPackages&return_action=DetailView',
|
||||
$mod_strings['LNK_NEW_DOCUMENT'],
|
||||
'CreateEcmFkPackages',
|
||||
);
|
||||
|
||||
if (ACLController::checkAccess('EcmFkPackages', 'list', true)) {
|
||||
$module_menu[] = array(
|
||||
'index.php?module=EcmFkPackages&action=index',
|
||||
$mod_strings['LNK_DOCUMENT_LIST'],
|
||||
'EcmFkPackages',
|
||||
);
|
||||
}
|
||||
|
||||
if (ACLController::checkAccess('EcmFkPackages', 'edit', true)) {
|
||||
$admin = new Administration();
|
||||
$admin->retrieveSettings();
|
||||
$user_merge = $current_user->getPreference('mailmerge_on');
|
||||
|
||||
if ($user_merge == 'on' && isset($admin->settings['system_mailmerge_on']) && $admin->settings['system_mailmerge_on']) {
|
||||
$module_menu[] = array(
|
||||
'index.php?module=MailMerge&action=index&reset=true',
|
||||
$mod_strings['LNK_NEW_MAIL_MERGE'],
|
||||
'EcmFkPackages',
|
||||
);
|
||||
}
|
||||
}
|
||||
46
modules/EcmFkPackages/Popup.php
Executable file
46
modules/EcmFkPackages/Popup.php
Executable file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
require_once('modules/EcmFkPackages/Popup_picker.php');
|
||||
|
||||
$popup = new Popup_Picker();
|
||||
|
||||
echo $popup->process_page();
|
||||
|
||||
?>
|
||||
219
modules/EcmFkPackages/Popup_picker.php
Executable file
219
modules/EcmFkPackages/Popup_picker.php
Executable file
@@ -0,0 +1,219 @@
|
||||
<?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 $theme;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//include tree view classes.
|
||||
require_once('include/ytree/Tree.php');
|
||||
require_once('include/ytree/Node.php');
|
||||
|
||||
require_once('modules/EcmFkPackages/TreeData.php');
|
||||
|
||||
class Popup_Picker
|
||||
{
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function Popup_Picker()
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
function _get_where_clause()
|
||||
{
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query']))
|
||||
{
|
||||
$where_clauses = array();
|
||||
append_where_clause($where_clauses, "ecmfkpackage_name", "documents.document_name");
|
||||
append_where_clause($where_clauses, "category_id", "ecmfkpackages.category_id");
|
||||
append_where_clause($where_clauses, "subcategory_id", "ecmfkpackages.subcategory_id");
|
||||
append_where_clause($where_clauses, "template_type", "ecmfkpackages.template_type");
|
||||
append_where_clause($where_clauses, "is_template", "ecmfkpackages.is_template");
|
||||
|
||||
$where = generate_where_statement($where_clauses);
|
||||
}
|
||||
return $where;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function process_page()
|
||||
{
|
||||
global $theme;
|
||||
global $mod_strings;
|
||||
global $app_strings;
|
||||
global $currentModule;
|
||||
global $sugar_version, $sugar_config;
|
||||
global $app_list_strings;
|
||||
global $sugar_config;
|
||||
|
||||
$b_from_ecmfkpackages=false;
|
||||
if (isset($_REQUEST['caller']) && $_REQUEST['caller']=='EcmFkPackages') {
|
||||
$b_from_ecmfkpackages=true;
|
||||
}
|
||||
|
||||
//initalize template
|
||||
$form = new XTemplate('modules/EcmFkPackages/Popup_picker.html');
|
||||
$form->assign('MOD', $mod_strings);
|
||||
$form->assign('APP', $app_strings);
|
||||
$form->assign('THEME', $theme);
|
||||
$form->assign('MODULE_NAME', $currentModule);
|
||||
|
||||
//tree header.
|
||||
$doctree=new Tree('doctree');
|
||||
$doctree->set_param('module','EcmFkPackages');
|
||||
if ($b_from_ecmfkpackages) {
|
||||
$doctree->set_param('caller','EcmFkPackages');
|
||||
$href_string = "javascript:populate_parent_search('doctree')";
|
||||
} else {
|
||||
$href_string = "javascript:populate_search('doctree')";
|
||||
}
|
||||
|
||||
$nodes=get_category_nodes($href_string);
|
||||
foreach ($nodes as $node) {
|
||||
$doctree->add_node($node);
|
||||
}
|
||||
$form->assign("TREEHEADER",$doctree->generate_header());
|
||||
$form->assign("TREEINSTANCE",$doctree->generate_nodes_array());
|
||||
|
||||
$site_data = "<script> var site_url= {\"site_url\":\"".getJavascriptSiteURL()."\"};</script>\n";
|
||||
$form->assign("SITEURL",$site_data);
|
||||
|
||||
$form->parse('main.SearchHeader.TreeView');
|
||||
$treehtml = $form->text('main.SearchHeader.TreeView');
|
||||
$form->reset('main.SearchHeader.TreeView');
|
||||
//end tree
|
||||
|
||||
if (isset($_REQUEST['caller']) && $_REQUEST['caller']=='EcmFkPackages') {
|
||||
///process treeview and return.
|
||||
return insert_popup_header($theme).$treehtml.insert_popup_footer();
|
||||
}
|
||||
|
||||
////////////////////////process full search form and list view.//////////////////////////////
|
||||
$output_html = '';
|
||||
$where = '';
|
||||
$where = $this->_get_where_clause();
|
||||
|
||||
|
||||
$name = empty($_REQUEST['name']) ? '' : $_REQUEST['name'];
|
||||
$ecmfkpackage_name = empty($_REQUEST['document_name']) ? '' : $_REQUEST['document_name'];
|
||||
$category_id = empty($_REQUEST['category_id']) ? '' : $_REQUEST['category_id'];
|
||||
$subcategory_id = empty($_REQUEST['subcategory_id']) ? '' : $_REQUEST['subcategory_id'];
|
||||
$template_type = empty($_REQUEST['template_type']) ? '' : $_REQUEST['template_type'];
|
||||
$is_template = empty($_REQUEST['is_template']) ? '' : $_REQUEST['is_template'];
|
||||
$request_data = empty($_REQUEST['request_data']) ? '' : $_REQUEST['request_data'];
|
||||
|
||||
|
||||
$hide_clear_button = empty($_REQUEST['hide_clear_button']) ? false : true;
|
||||
$button = "<form action='index.php' method='post' name='form' id='form'>\n";
|
||||
if(!$hide_clear_button)
|
||||
{
|
||||
$button .= "<input type='button' name='button' class='button' onclick=\"send_back('','');\" title='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CLEAR_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CLEAR_BUTTON_LABEL']." ' />\n";
|
||||
}
|
||||
$button .= "<input type='submit' name='button' class='button' onclick=\"window.close();\" title='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_TITLE']."' accesskey='"
|
||||
.$app_strings['LBL_CANCEL_BUTTON_KEY']."' value=' "
|
||||
.$app_strings['LBL_CANCEL_BUTTON_LABEL']." ' />\n";
|
||||
$button .= "</form>\n";
|
||||
|
||||
$form->assign('NAME', $name);
|
||||
$form->assign('DOCUMENT_NAME', $ecmfkpackage_name);
|
||||
$form->assign('request_data', $request_data);
|
||||
$form->assign("CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['ecmfkpackage_category_dom'], $category_id));
|
||||
$form->assign("SUB_CATEGORY_OPTIONS", get_select_options_with_id($app_list_strings['ecmfkpackage_subcategory_dom'], $subcategory_id));
|
||||
$form->assign("IS_TEMPLATE_OPTIONS", get_select_options_with_id($app_list_strings['checkbox_dom'], $is_template));
|
||||
$form->assign("TEMPLATE_TYPE_OPTIONS", get_select_options_with_id($app_list_strings['ecmfkpackage_template_type_dom'], $template_type));
|
||||
|
||||
|
||||
ob_start();
|
||||
insert_popup_header($theme);
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], '', false);
|
||||
|
||||
$form->parse('main.SearchHeader');
|
||||
$output_html .= $form->text('main.SearchHeader');
|
||||
|
||||
// Reset the sections that are already in the page so that they do not print again later.
|
||||
$form->reset('main.SearchHeader');
|
||||
|
||||
//add tree view to output_html.
|
||||
$output_html .= $treehtml;
|
||||
|
||||
// create the listview
|
||||
$seed_bean = new EcmFkPackage();
|
||||
$ListView = new ListView();
|
||||
$ListView->show_select_menu = false;
|
||||
$ListView->show_delete_button = false;
|
||||
$ListView->show_export_button = false;
|
||||
$ListView->process_for_popups = true;
|
||||
$ListView->setXTemplate($form);
|
||||
$ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']);
|
||||
$ListView->setHeaderText($button);
|
||||
$ListView->setQuery($where, '', 'ecmfkpackage_name', 'DOCUMENT');
|
||||
$ListView->setModStrings($mod_strings);
|
||||
|
||||
ob_start();
|
||||
$ListView->processListView($seed_bean, 'main', 'DOCUMENT');
|
||||
$output_html .= ob_get_contents();
|
||||
ob_end_clean();
|
||||
|
||||
$output_html .= insert_popup_footer();
|
||||
return $output_html;
|
||||
}
|
||||
} // end of class Popup_Picker
|
||||
?>
|
||||
139
modules/EcmFkPackages/TreeData.php
Executable file
139
modules/EcmFkPackages/TreeData.php
Executable file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
require_once('include/ytree/Node.php');
|
||||
|
||||
|
||||
|
||||
//function returns an array of objects of Node type.
|
||||
function get_node_data($params,$get_array=false) {
|
||||
$ret=array();
|
||||
$click_level=$params['TREE']['depth'];
|
||||
$subcat_id=$params['NODES'][$click_level]['id'];
|
||||
$cat_id=$params['NODES'][$click_level-1]['id'];
|
||||
$href=true;
|
||||
if (isset($params['TREE']['caller']) and $params['TREE']['caller']=='EcmFkPackages' ) {
|
||||
$href=false;
|
||||
}
|
||||
$nodes=get_ecmfkpackages($cat_id,$subcat_id,$href);
|
||||
foreach ($nodes as $node) {
|
||||
$ret['nodes'][]=$node->get_definition();
|
||||
}
|
||||
$json = new JSON(JSON_LOOSE_TYPE);
|
||||
$str=$json->encode($ret);
|
||||
return $str;
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
*
|
||||
*/
|
||||
function get_category_nodes($href_string){
|
||||
$nodes=array();
|
||||
global $mod_strings;
|
||||
global $app_list_strings;
|
||||
$query="select distinct category_id, subcategory_id from ecmfkpackages where deleted=0 order by category_id, subcategory_id";
|
||||
$result=$GLOBALS['db']->query($query);
|
||||
$current_cat_id=null;
|
||||
$cat_node=null;
|
||||
while (($row=$GLOBALS['db']->fetchByAssoc($result))!= null) {
|
||||
|
||||
if (empty($row['category_id'])) {
|
||||
$cat_id='null';
|
||||
$cat_name=$mod_strings['LBL_CAT_OR_SUBCAT_UNSPEC'];
|
||||
} else {
|
||||
$cat_id=$row['category_id'];
|
||||
$cat_name=$app_list_strings['ecmfkpackage_category_dom'][$row['category_id']];
|
||||
}
|
||||
if (empty($current_cat_id) or $current_cat_id != $cat_id) {
|
||||
$current_cat_id = $cat_id;
|
||||
if (!empty($cat_node)) $nodes[]=$cat_node;
|
||||
|
||||
$cat_node = new Node($cat_id, $cat_name);
|
||||
$cat_node->set_property("href", $href_string);
|
||||
$cat_node->expanded = true;
|
||||
$cat_node->dynamic_load = false;
|
||||
}
|
||||
|
||||
if (empty($row['subcategory_id'])) {
|
||||
$subcat_id='null';
|
||||
$subcat_name=$mod_strings['LBL_CAT_OR_SUBCAT_UNSPEC'];
|
||||
} else {
|
||||
$subcat_id=$row['subcategory_id'];
|
||||
$subcat_name=$app_list_strings['ecmfkpackage_subcategory_dom'][$row['subcategory_id']];
|
||||
}
|
||||
$subcat_node = new Node($subcat_id, $subcat_name);
|
||||
$subcat_node->set_property("href", $href_string);
|
||||
$subcat_node->expanded = false;
|
||||
$subcat_node->dynamic_load = true;
|
||||
|
||||
$cat_node->add_node($subcat_node);
|
||||
}
|
||||
if (!empty($cat_node)) $nodes[]=$cat_node;
|
||||
|
||||
return $nodes;
|
||||
}
|
||||
|
||||
function get_ecmfkpackages($cat_id, $subcat_id,$href=true) {
|
||||
$nodes=array();
|
||||
$href_string = "javascript:select_ecmfkpackage('doctree')";
|
||||
$query="select * from ecmfkpackages where deleted=0";
|
||||
if ($cat_id != 'null') {
|
||||
$query.=" and category_id='$cat_id'";
|
||||
} else {
|
||||
$query.=" and category_id is null";
|
||||
}
|
||||
|
||||
if ($subcat_id != 'null') {
|
||||
$query.=" and subcategory_id='$subcat_id'";
|
||||
} else {
|
||||
$query.=" and subcategory_id is null";
|
||||
}
|
||||
$result=$GLOBALS['db']->query($query);
|
||||
$current_cat_id=null;
|
||||
while (($row=$GLOBALS['db']->fetchByAssoc($result))!= null) {
|
||||
$node = new Node($row['id'], $row['ecmfkpackage_name']);
|
||||
if ($href) {
|
||||
$node->set_property("href", $href_string);
|
||||
}
|
||||
$node->expanded = true;
|
||||
$node->dynamic_load = false;
|
||||
|
||||
$nodes[]=$node;
|
||||
}
|
||||
return $nodes;
|
||||
}
|
||||
?>
|
||||
3
modules/EcmFkPackages/_Save.php
Executable file
3
modules/EcmFkPackages/_Save.php
Executable file
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
|
||||
return;
|
||||
127
modules/EcmFkPackages/class.dbf.php
Executable file
127
modules/EcmFkPackages/class.dbf.php
Executable file
@@ -0,0 +1,127 @@
|
||||
<?php
|
||||
class dbf_class {
|
||||
|
||||
var $dbf_num_rec; //Number of records in the file
|
||||
var $dbf_num_field; //Number of columns in each row
|
||||
var $dbf_names = array(); //Information on each column ['name'],['len'],['type']
|
||||
//These are private....
|
||||
var $_raw; //The raw input file
|
||||
var $_rowsize; //Length of each row
|
||||
var $_hdrsize; //Length of the header information (offset to 1st record)
|
||||
var $_memos; //The raw memo file (if there is one).
|
||||
|
||||
function dbf_class($filename)
|
||||
{
|
||||
if ( !file_exists($filename)) {
|
||||
echo 'Not a valid DBF file !!!(1)'; exit;
|
||||
}
|
||||
$tail=substr($filename,-4);
|
||||
if (strcasecmp($tail, '.dbf')!=0) {
|
||||
echo 'Not a valid DBF file !!!'; exit;
|
||||
}
|
||||
|
||||
//Read the File
|
||||
$handle = fopen($filename, "r");
|
||||
if (!$handle) { echo "Cannot read DBF file - tutaj"; exit; }
|
||||
$filesize = filesize($filename);
|
||||
$this->_raw = fread ($handle, $filesize);
|
||||
fclose ($handle);
|
||||
//Make sure that we indeed have a dbf file...
|
||||
if(!(ord($this->_raw[0]) == 3 || ord($this->_raw[0]) == 131) && ord($this->_raw[$filesize]) != 26) {
|
||||
echo 'Not a valid DBF file !!!'; exit;
|
||||
}
|
||||
// 3= file without DBT memo file; 131 ($83)= file with a DBT.
|
||||
$arrHeaderHex = array();
|
||||
for($i=0; $i<32; $i++){
|
||||
$arrHeaderHex[$i] = str_pad(dechex(ord($this->_raw[$i]) ), 2, "0", STR_PAD_LEFT);
|
||||
}
|
||||
//Initial information
|
||||
$line = 32;//Header Size
|
||||
//Number of records
|
||||
$this->dbf_num_rec= hexdec($arrHeaderHex[7].$arrHeaderHex[6].$arrHeaderHex[5].$arrHeaderHex[4]);
|
||||
$this->_hdrsize= hexdec($arrHeaderHex[9].$arrHeaderHex[8]);//Header Size+Field Descriptor
|
||||
//Number of fields
|
||||
$this->_rowsize = hexdec($arrHeaderHex[11].$arrHeaderHex[10]);
|
||||
$this->dbf_num_field = floor(($this->_hdrsize - $line ) / $line ) ;//Number of Fields
|
||||
|
||||
//Field properties retrieval looping
|
||||
for($j=0; $j<$this->dbf_num_field; $j++){
|
||||
$name = '';
|
||||
$beg = $j*$line+$line;
|
||||
for($k=$beg; $k<$beg+11; $k++){
|
||||
if(ord($this->_raw[$k])!=0){
|
||||
$name .= $this->_raw[$k];
|
||||
}
|
||||
}
|
||||
$this->dbf_names[$j]['name']= $name;//Name of the Field
|
||||
$this->dbf_names[$j]['len']= ord($this->_raw[$beg+16]);//Length of the field
|
||||
$this->dbf_names[$j]['type']= $this->_raw[$beg+11];
|
||||
}
|
||||
/*
|
||||
if (ord($this->_raw[0])==131) { //See if this has a memo file with it...
|
||||
//Read the File
|
||||
$tail=substr($tail,-1,1); //Get the last character...
|
||||
if ($tail=='F'){ //See if upper or lower case
|
||||
$tail='T'; //Keep the case the same
|
||||
} else {
|
||||
$tail='t';
|
||||
}
|
||||
|
||||
$memoname = substr($filename,0,strlen($filename)-1).$tail;
|
||||
|
||||
$memoname = $filemane;
|
||||
echo $memoname.'<br>';
|
||||
$handle = fopen($memoname, "r");
|
||||
if (!$handle) { echo "Cannot read DBT file - tutaj"; exit; }
|
||||
$filesize = filesize($memoname);
|
||||
$this->_memos = fread ($handle, $filesize);
|
||||
fclose ($handle);
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
function getRow($recnum) {
|
||||
$memoeot = chr(26).chr(26);
|
||||
$rawrow = substr($this->_raw,$recnum*$this->_rowsize+$this->_hdrsize,$this->_rowsize);
|
||||
$rowrecs = array();
|
||||
$beg=1;
|
||||
if (ord($rawrow[0])==42) {
|
||||
return false; //Record is deleted...
|
||||
}
|
||||
for ($i=0; $i<$this->dbf_num_field; $i++) {
|
||||
$col=trim(substr($rawrow,$beg,$this->dbf_names[$i]['len']));
|
||||
if ($this->dbf_names[$i]['type']!='M') {
|
||||
|
||||
$rowrecs[]=$col;
|
||||
} else {
|
||||
$memobeg=$col*512; //Find start of the memo block (0=header so it works)
|
||||
$memoend=strpos($this->_memos,$memoeot,$memobeg); //Find the end of the memo
|
||||
$rowrecs[]=substr($this->_memos,$memobeg,$memoend-$memobeg);
|
||||
}
|
||||
$beg+=$this->dbf_names[$i]['len'];
|
||||
}
|
||||
return $rowrecs;
|
||||
}
|
||||
|
||||
function getRowAssoc($recnum) {
|
||||
$rawrow = substr($this->_raw,$recnum*$this->_rowsize+$this->_hdrsize,$this->_rowsize);
|
||||
$rowrecs = array();
|
||||
$beg=1;
|
||||
if (ord($rawrow[0])==42) {
|
||||
return false; //Record is deleted...
|
||||
}
|
||||
for ($i=0; $i<$this->dbf_num_field; $i++) {
|
||||
$col=trim(substr($rawrow,$beg,$this->dbf_names[$i]['len']));
|
||||
if ($this->dbf_names[$i]['type']!='M') {
|
||||
$rowrecs[$this->dbf_names[$i]['name']]=$col;
|
||||
} else {
|
||||
$memobeg=$col*512; //Find start of the memo block (0=header so it works)
|
||||
$memoend=strpos($this->_memos,$memoeot,$memobeg); //Find the end of the memo
|
||||
$rowrecs[$this->dbf_names[$i]['name']]=substr($this->_memos,$memobeg,$memoend-$memobeg);
|
||||
}
|
||||
$beg+=$this->dbf_names[$i]['len'];
|
||||
}
|
||||
return $rowrecs;
|
||||
}
|
||||
}
|
||||
?>
|
||||
6
modules/EcmFkPackages/controller.php
Executable file
6
modules/EcmFkPackages/controller.php
Executable file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
|
||||
class EcmFkPackagesController extends SugarController {
|
||||
|
||||
}
|
||||
83
modules/EcmFkPackages/field_arrays.php
Executable file
83
modules/EcmFkPackages/field_arrays.php
Executable file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Contains field arrays that are used for caching
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
$fields_array['EcmFkPackage'] = array ('column_fields' => Array("id"
|
||||
,"ecmfkpackage_name"
|
||||
,"description"
|
||||
,"category_id"
|
||||
,"subcategory_id"
|
||||
,"status_id"
|
||||
,"active_date"
|
||||
,"exp_date"
|
||||
,"date_entered"
|
||||
,"date_modified"
|
||||
,"created_by"
|
||||
,"modified_user_id"
|
||||
,"ecmfkpackage_revision_id"
|
||||
,"related_doc_id"
|
||||
,"related_doc_rev_id"
|
||||
,"is_template"
|
||||
,"template_type"
|
||||
),
|
||||
'list_fields' => Array("id"
|
||||
,"ecmfkpackage_name"
|
||||
,"description"
|
||||
,"category_id"
|
||||
,"subcategory_id"
|
||||
,"status_id"
|
||||
,"active_date"
|
||||
,"exp_date"
|
||||
,"date_entered"
|
||||
,"date_modified"
|
||||
,"created_by"
|
||||
,"modified_user_id"
|
||||
,"ecmfkpackage_revision_id"
|
||||
,"last_rev_create_date"
|
||||
,"last_rev_created_by"
|
||||
,"latest_revision"
|
||||
,"file_url"
|
||||
,"file_url_noimage"
|
||||
),
|
||||
'required_fields' => Array("ecmfkpackage_name"=>1,"active_date"=>1,"revision"=>1),
|
||||
);
|
||||
?>
|
||||
63
modules/EcmFkPackages/helper.php
Executable file
63
modules/EcmFkPackages/helper.php
Executable file
@@ -0,0 +1,63 @@
|
||||
<?
|
||||
function create_guid()
|
||||
{
|
||||
$microTime = microtime();
|
||||
list($a_dec, $a_sec) = explode(" ", $microTime);
|
||||
|
||||
$dec_hex = sprintf("%x", $a_dec* 1000000);
|
||||
$sec_hex = sprintf("%x", $a_sec);
|
||||
|
||||
ensure_length($dec_hex, 5);
|
||||
ensure_length($sec_hex, 6);
|
||||
|
||||
$guid = "";
|
||||
$guid .= $dec_hex;
|
||||
$guid .= create_guid_section(3);
|
||||
$guid .= '-';
|
||||
$guid .= create_guid_section(4);
|
||||
$guid .= '-';
|
||||
$guid .= create_guid_section(4);
|
||||
$guid .= '-';
|
||||
$guid .= create_guid_section(4);
|
||||
$guid .= '-';
|
||||
$guid .= $sec_hex;
|
||||
$guid .= create_guid_section(6);
|
||||
|
||||
return $guid;
|
||||
|
||||
}
|
||||
|
||||
function create_guid_section($characters)
|
||||
{
|
||||
$return = "";
|
||||
for($i=0; $i<$characters; $i++)
|
||||
{
|
||||
$return .= sprintf("%x", mt_rand(0,15));
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
||||
function ensure_length(&$string, $length)
|
||||
{
|
||||
$strlen = strlen($string);
|
||||
if($strlen < $length)
|
||||
{
|
||||
$string = str_pad($string,$length,"0");
|
||||
}
|
||||
else if($strlen > $length)
|
||||
{
|
||||
$string = substr($string, 0, $length);
|
||||
}
|
||||
}
|
||||
function ch($str){
|
||||
return iconv("IBM852","UTF-8",$str);
|
||||
}
|
||||
function checkCharset($testString, $targetString){
|
||||
$out=false;
|
||||
$encoding=array("ASCII","ISO-8859-1","ISO-8859-2","ISO-8859-3","ISO-8859-4","ISO-8859-5","ISO-8859-7","ISO-8859-9","ISO-8859-10","ISO-8859-13","ISO-8859-14","ISO-8859-15","ISO-8859-16","KOI8-R","KOI8-U","KOI8-RU","CP1250","CP1251","CP1252","CP1253","CP1254","CP1257","CP850","CP866","Mac Roman","Mac CentralEurope","Mac Iceland","Mac Croatian","Mac Romania","Mac Cyrillic","Mac Ukraine","Mac Greek","Mac Turkish", "Macintosh","ISO-8859-6","ISO-8859-8", "CP1255","CP1256", "CP862","Mac Hebrew","Mac Arabic","EUC-JP", "SHIFT_JIS", "CP932", "ISO-2022-JP", "ISO-2022-JP-2", "ISO-2022-JP-1","EUC-CN","HZ","GBK","GB18030","EUC-TW","BIG5","CP950","BIG5-HKSCS","ISO-2022-CN","ISO-2022-CN-EXT","EUC-KR","CP949","ISO-2022-KR","JOHAB","ARMSCII-8","Georgian-Academy","Georgian-PS","KOI8-T","TIS-620","CP874","MacThai","MuleLao-1","CP1133","VISCII","TCVN","CP1258","HP-ROMAN8","NEXTSTEP","UTF-8","UCS-2","UCS-2BE","UCS-2LE","UCS-4","UCS-4BE","UCS-4LE","UTF-16","UTF-16BE","UTF-16LE","UTF-32","UTF-32BE","UTF-32LE","UTF-7","C99","JAVA","UCS-2-INTERNAL","UCS-4-INTERNAL","CP437","CP737","CP775","CP850","CP852","CP853","CP855","CP857","CP858","CP860","CP861","CP863","CP865","CP869","CP1125","CP864","EUC-JISX0213","Shift_JISX0213","ISO-2022-JP-3","TDS565","RISCOS-LATIN1");
|
||||
foreach($encoding as $v){
|
||||
if(iconv($v, "utf-8", $testString) === $targetString){$out=$v;}
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
?>
|
||||
122
modules/EcmFkPackages/import.php
Executable file
122
modules/EcmFkPackages/import.php
Executable file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
|
||||
echo PHP_EOL;
|
||||
|
||||
#set_time_limit(9999999999);
|
||||
|
||||
$sql = mysql_connect('localhost', 'root', 'sgpmk777');
|
||||
|
||||
mysql_select_db('crm');
|
||||
$GLOBALS['db']->query('SET NAMES utf8;');
|
||||
|
||||
function getmicrotime() {
|
||||
list($usec, $sec) = explode(' ', microtime());
|
||||
return ((float) $usec + (float) $sec);
|
||||
}
|
||||
|
||||
function getnr($nr_sys) {
|
||||
$dbfi = new dbf_class('_INDEKSY.DBF');
|
||||
|
||||
$num_rec = $dbfi->dbf_num_rec;
|
||||
|
||||
for ($i = 0; $i < $num_rec; $i++) {
|
||||
$indeks = $dbfi->getRowAssoc($i);
|
||||
|
||||
if ($indeks['INDEKS'] == $nr_sys) {
|
||||
return ch($indeks['NR_SYSTEM']);
|
||||
}
|
||||
}
|
||||
|
||||
return 'BRAK INDEKSU';
|
||||
}
|
||||
|
||||
function addBook($r, $c = false) {
|
||||
//'01-' . str_pad($r['MIESIAC'], 2, '0', STR_PAD_LEFT) . '-' . str_pad($r['ROK'], 2, '0', STR_PAD_LEFT),
|
||||
$now = new DateTime();
|
||||
|
||||
$dateBook = clone $now;
|
||||
$dateBook->setDate(substr($r['D_KSIEG'], 0, 4), substr($r['D_KSIEG'], 4, 2), substr($r['D_KSIEG'], 6, 2));
|
||||
$dateBook->setTime(0, 0, 0);
|
||||
|
||||
$dateEcmFkPackage = clone $now;
|
||||
$dateEcmFkPackage->setDate(substr($r['DAT_DOK'], 0, 4), substr($r['DAT_DOK'], 4, 2), substr($r['DAT_DOK'], 6, 2));
|
||||
$dateEcmFkPackage->setTime(0, 0, 0);
|
||||
|
||||
$bookDate = clone $now;
|
||||
$bookDate->setDate(2000 + $r['ROK'], $r['MIESIAC'], 1); // temp + 2000 (?)
|
||||
$bookDate->setTime(0, 0, 0);
|
||||
|
||||
$arr = array(
|
||||
'id' => create_guid(),
|
||||
'date_entered' => date('Y-m-d H:i:s'),
|
||||
//'date_modified' => null,
|
||||
'date_book' => $dateBook->format('Y-m-d H:i:s'),
|
||||
'date_document' => $dateEcmFkPackage->format('Y-m-d H:i:s'),
|
||||
//'modified_user_id' => null,
|
||||
'created_by' => 'd9c0007b-1247-5e82-31b6-4f168a01d290', // ems
|
||||
'description' => $r['OPIS_1'] . PHP_EOL . $r['OPIS_2'],
|
||||
//'deleted' => null,
|
||||
'book_date' => $bookDate->format('Y-m-d H:i:s'),
|
||||
'book_name' => $r['NR_DOK'],
|
||||
'book_number' => $r['NR_SYS'],
|
||||
'book_amount' => $r['KWOTA'],
|
||||
'book_acc_wn' => $r['K_SYN_WN'] . (($analWn = $r['K_ANAL_WN']) ? ('-' . $analWn) : ''),
|
||||
'book_acc_ma' => $r['K_SYN_MA'] . (($analMa = $r['K_ANAL_MA']) ? ('-' . $analMa) : ''),
|
||||
'book_position' => $r['POZ_DOK'],
|
||||
'book_symbol' => $r['SYM_DOK'],
|
||||
'book_identifier' => $r['ID_DOK'],
|
||||
);
|
||||
|
||||
/*
|
||||
echo var_export($r, true);
|
||||
echo PHP_EOL . PHP_EOL;
|
||||
echo var_export($arr, true);
|
||||
exit;
|
||||
*/
|
||||
|
||||
$arr = array_filter($arr, 'strlen');
|
||||
|
||||
foreach ($arr as $k => $v) {
|
||||
$in[] = sprintf('`%s` = \'%s\'', $k, $v);
|
||||
}
|
||||
|
||||
$query = 'INSERT INTO `ecmfkpackages` SET ' . implode(', ', $in) . ';';
|
||||
|
||||
/*
|
||||
echo $query . PHP_EOL;
|
||||
exit;
|
||||
*/
|
||||
|
||||
$GLOBALS['db']->query($query);
|
||||
|
||||
if($e = mysql_error()) {
|
||||
echo __LINE__ . ' => ' . var_export(mysql_error(), true) . PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
if(true == $c)
|
||||
echo $arr['id'] . PHP_EOL;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
include_once('class.dbf.php');
|
||||
include_once('helper.php');
|
||||
|
||||
$dbfp = new dbf_class('pk__08__.DBF');
|
||||
$num_recp = $dbfp->dbf_num_rec;
|
||||
|
||||
|
||||
for ($i = 0; $i < $num_recp; $i++) {
|
||||
$rowp = $dbfp->getRowAssoc($i);
|
||||
|
||||
$add += addBook($rowp) ? 1 : 0;
|
||||
}
|
||||
|
||||
$start = getmicrotime();
|
||||
$koniec = getmicrotime();
|
||||
|
||||
echo 'Podsumowanie:' . PHP_EOL . 'W dbf: ' . $num_recp . PHP_EOL . 'Dodano: ' . $add . PHP_EOL;
|
||||
echo 'Czas trawania:' . (($koniec - $start) / 60) . ' minut';
|
||||
|
||||
mysql_close($sql);
|
||||
167
modules/EcmFkPackages/language/en_us.lang.php
Executable file
167
modules/EcmFkPackages/language/en_us.lang.php
Executable file
@@ -0,0 +1,167 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: Defines the English language pack for the base application.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
$mod_strings = array (
|
||||
//module
|
||||
'LBL_MODULE_NAME' => 'EcmFkPackages',
|
||||
'LBL_MODULE_TITLE' => 'EcmFkPackages: Home',
|
||||
'LNK_NEW_DOCUMENT' => 'Create EcmFkPackage',
|
||||
'LNK_DOCUMENT_LIST'=> 'View EcmFkPackages',
|
||||
'LBL_DOC_REV_HEADER' => 'EcmFkPackage Revisions',
|
||||
'LBL_SEARCH_FORM_TITLE'=> 'EcmFkPackage Search',
|
||||
//vardef labels
|
||||
'LBL_DOCUMENT_ID' => 'EcmFkPackage ID',
|
||||
'LBL_NAME' => 'EcmFkPackage Name',
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
'LBL_CATEGORY' => 'Category',
|
||||
'LBL_SUBCATEGORY' => 'Sub Category',
|
||||
'LBL_STATUS' => 'Status',
|
||||
'LBL_CREATED_BY'=> 'Created by',
|
||||
'LBL_DATE_ENTERED'=> 'Date Entered',
|
||||
'LBL_DATE_MODIFIED'=> 'Date Modified',
|
||||
'LBL_DELETED' => 'Deleted',
|
||||
'LBL_MODIFIED'=> 'Modified by ID',
|
||||
'LBL_MODIFIED_USER' => 'Modified by',
|
||||
'LBL_CREATED'=> 'Created by',
|
||||
'LBL_REVISIONS'=>'Revisions',
|
||||
'LBL_RELATED_DOCUMENT_ID'=>'Related EcmFkPackage ID',
|
||||
'LBL_RELATED_DOCUMENT_REVISION_ID'=>'Related EcmFkPackage Revision ID',
|
||||
'LBL_IS_TEMPLATE'=>'Is a Template',
|
||||
'LBL_TEMPLATE_TYPE'=>'EcmFkPackage Type',
|
||||
'LBL_ASSIGNED_TO_NAME'=>'Assigned to:',
|
||||
'LBL_REVISION_NAME' => 'Revision Number',
|
||||
'LBL_MIME' => 'Mime Type',
|
||||
'LBL_REVISION' => 'Revision',
|
||||
'LBL_DOCUMENT' => 'Related EcmFkPackage',
|
||||
'LBL_LATEST_REVISION' => 'Latest Revision',
|
||||
'LBL_CHANGE_LOG'=> 'Change Log',
|
||||
'LBL_ACTIVE_DATE'=> 'Publish Date',
|
||||
'LBL_EXPIRATION_DATE' => 'Expiration Date',
|
||||
'LBL_FILE_EXTENSION' => 'File Extension',
|
||||
'LBL_LAST_REV_MIME_TYPE' => 'Last revision MIME type',
|
||||
'LBL_CAT_OR_SUBCAT_UNSPEC'=>'Unspecified',
|
||||
//quick search
|
||||
'LBL_NEW_FORM_TITLE' => 'New EcmFkPackage',
|
||||
//ecmfkpackage edit and detail view
|
||||
'LBL_DOC_NAME' => 'EcmFkPackage Name:',
|
||||
'LBL_FILENAME' => 'File Name:',
|
||||
'LBL_DOC_VERSION' => 'Revision:',
|
||||
'LBL_CATEGORY_VALUE' => 'Category:',
|
||||
'LBL_SUBCATEGORY_VALUE'=> 'Sub Category:',
|
||||
'LBL_DOC_STATUS'=> 'Status:',
|
||||
'LBL_LAST_REV_CREATOR' => 'Revision Created By:',
|
||||
'LBL_LASTEST_REVISION_NAME' => 'Lastest revision name:',
|
||||
'LBL_SELECTED_REVISION_NAME' => 'Selected revision name:',
|
||||
'LBL_CONTRACT_STATUS' => 'Contract status:',
|
||||
'LBL_CONTRACT_NAME' => 'Contract name:',
|
||||
'LBL_LAST_REV_DATE' => 'Revision Date:',
|
||||
'LBL_DOWNNLOAD_FILE'=> 'Download File:',
|
||||
'LBL_DET_RELATED_DOCUMENT'=>'Related EcmFkPackage:',
|
||||
'LBL_DET_RELATED_DOCUMENT_VERSION'=>"Related EcmFkPackage Revision:",
|
||||
'LBL_DET_IS_TEMPLATE'=>'Template? :',
|
||||
'LBL_DET_TEMPLATE_TYPE'=>'EcmFkPackage Type:',
|
||||
'LBL_DOC_DESCRIPTION'=>'Description:',
|
||||
'LBL_DOC_ACTIVE_DATE'=> 'Publish Date:',
|
||||
'LBL_DOC_EXP_DATE'=> 'Expiration Date:',
|
||||
|
||||
//ecmfkpackage list view.
|
||||
'LBL_LIST_FORM_TITLE' => 'EcmFkPackage List',
|
||||
'LBL_LIST_DOCUMENT' => 'EcmFkPackage',
|
||||
'LBL_LIST_CATEGORY' => 'Category',
|
||||
'LBL_LIST_SUBCATEGORY' => 'Sub Category',
|
||||
'LBL_LIST_REVISION' => 'Revision',
|
||||
'LBL_LIST_LAST_REV_CREATOR' => 'Published By',
|
||||
'LBL_LIST_LAST_REV_DATE' => 'Revision Date',
|
||||
'LBL_LIST_VIEW_DOCUMENT'=>'View',
|
||||
'LBL_LIST_DOWNLOAD'=> 'Download',
|
||||
'LBL_LIST_ACTIVE_DATE' => 'Publish Date',
|
||||
'LBL_LIST_EXP_DATE' => 'Expiration Date',
|
||||
'LBL_LIST_STATUS'=>'Status',
|
||||
'LBL_LINKED_ID' => 'Linked id',
|
||||
'LBL_SELECTED_REVISION_ID' => 'Selected revision id',
|
||||
'LBL_LATEST_REVISION_ID' => 'Latest revision id',
|
||||
'LBL_SELECTED_REVISION_FILENAME' => 'Selected revision filename',
|
||||
'LBL_FILE_URL' => 'File url',
|
||||
'LBL_REVISIONS_PANEL' => 'Revision Details',
|
||||
'LBL_REVISIONS_SUBPANEL' => 'Revisions',
|
||||
|
||||
//ecmfkpackage search form.
|
||||
'LBL_SF_DOCUMENT' => 'EcmFkPackage Name:',
|
||||
'LBL_SF_CATEGORY' => 'Category:',
|
||||
'LBL_SF_SUBCATEGORY'=> 'Sub Category:',
|
||||
'LBL_SF_ACTIVE_DATE' => 'Publish Date:',
|
||||
'LBL_SF_EXP_DATE'=> 'Expiration Date:',
|
||||
|
||||
'DEF_CREATE_LOG' => 'EcmFkPackage Created',
|
||||
|
||||
//error messages
|
||||
'ERR_DOC_NAME'=>'EcmFkPackage Name',
|
||||
'ERR_DOC_ACTIVE_DATE'=>'Publish Date',
|
||||
'ERR_DOC_EXP_DATE'=> 'Expiration Date',
|
||||
'ERR_FILENAME'=> 'File Name',
|
||||
'ERR_DOC_VERSION'=> 'EcmFkPackage Version',
|
||||
'ERR_DELETE_CONFIRM'=> 'Do you want to delete this ecmfkpackage revision?',
|
||||
'ERR_DELETE_LATEST_VERSION'=> 'You are not allowed to delete the latest revision of a ecmfkpackage.',
|
||||
'LNK_NEW_MAIL_MERGE' => 'Mail Merge',
|
||||
'LBL_MAIL_MERGE_DOCUMENT' => 'Mail Merge Template:',
|
||||
|
||||
'LBL_TREE_TITLE' => 'EcmFkPackages',
|
||||
//sub-panel vardefs.
|
||||
'LBL_LIST_DOCUMENT_NAME'=>'EcmFkPackage Name',
|
||||
'LBL_CONTRACT_NAME'=>'Contract Name:',
|
||||
'LBL_LIST_IS_TEMPLATE'=>'Template?',
|
||||
'LBL_LIST_TEMPLATE_TYPE'=>'EcmFkPackage Type',
|
||||
'LBL_LIST_SELECTED_REVISION'=>'Selected Revision',
|
||||
'LBL_LIST_LATEST_REVISION'=>'Latest Revision',
|
||||
'LBL_CONTRACTS_SUBPANEL_TITLE'=>'Related Contracts',
|
||||
'LBL_LAST_REV_CREATE_DATE'=>'Last Revision Create Date',
|
||||
//'LNK_DOCUMENT_CAT'=>'EcmFkPackage Categories',
|
||||
'LBL_CONTRACTS' => 'Contracts',
|
||||
'LBL_CREATED_USER' => 'Created User',
|
||||
'LBL_THEREVISIONS_SUBPANEL_TITLE' => 'Reversions',
|
||||
'LBL_DOCUMENT_INFORMATION' => 'EcmFkPackage Overview',
|
||||
);
|
||||
|
||||
|
||||
?>
|
||||
173
modules/EcmFkPackages/language/pl_pl.lang.php
Executable file
173
modules/EcmFkPackages/language/pl_pl.lang.php
Executable 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 SugarCRM Public License Version
|
||||
* 1.1.3 ("License"); You may not use this file except in compliance with the
|
||||
* License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* All copies of the Covered Code must include on each user interface screen:
|
||||
* (i) the "Powered by SugarCRM" logo and
|
||||
* (ii) the SugarCRM copyright notice
|
||||
* in the same form as they appear in the distribution. See full license for
|
||||
* requirements.
|
||||
*
|
||||
* The Original Code is: SugarCRM Open Source
|
||||
* The Initial Developer of the Original Code is SugarCRM, Inc.
|
||||
* Portions created by SugarCRM are Copyright (C) 2004-2005 SugarCRM, Inc.;
|
||||
*
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________.
|
||||
* ****************************************************************************** */
|
||||
|
||||
/* * *******************************************************************************
|
||||
* pl_pl.lang.ext.php,v for SugarCRM 4.5.1-->>
|
||||
* Translator: Krzysztof Morawski
|
||||
* All Rights Reserved.
|
||||
* Any bugs report welcome: krzysiek<at>kmmgroup<dot>pl
|
||||
*
|
||||
* Contributor(s): ______________________________________..
|
||||
* ****************************************************************************** */
|
||||
|
||||
$mod_strings = array(
|
||||
'LBL_EDITABLE_POSITION' => 'Lp.',
|
||||
'LBL_EDITABLE_WN' => 'Winien',
|
||||
'LBL_EDITABLE_AMOUNT' => 'Wartość',
|
||||
'LBL_EDITABLE_MA' => 'Ma',
|
||||
'LBL_EDITABLE_OPTIONS' => 'Opcje',
|
||||
// mh 07-05-13
|
||||
'LBL_PK' => 'Polecenie księgowania',
|
||||
'LBL_PK_TAB' => 'PK',
|
||||
'LBL_REGISTRY' => 'Rejestry',
|
||||
'LBL_REGISTRY_TAB' => 'Rejestry',
|
||||
//
|
||||
'LBL_ECMFKPACKAGE_INFORMATION' => 'Informacje',
|
||||
'LBL_ECMFKPACKAGE_DETAILS' => 'Szczegóły',
|
||||
//mh 30-04-13
|
||||
'LBL_ID' => 'Id',
|
||||
'LBL_DATE_ENTERED' => 'Data wprowadzenia',
|
||||
'LBL_DATE_MODIFIED' => 'Data modyfikacji',
|
||||
'LBL_DATE_PACKAGE' => 'Data księgowania',
|
||||
'LBL_DATE_DOCUMENT' => 'Data dokumentu',
|
||||
'LBL_MODIFIED_USER_ID' => 'Utworzony przez',
|
||||
'LBL_CREATED_BY' => 'Utworzony przez',
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
'LBL_DELETED' => 'Usunięty',
|
||||
'LBL_PACKAGE_DATE' => 'Data księgi',
|
||||
'LBL_PACKAGE_NAME' => 'Numer dokumentu',
|
||||
'LBL_PACKAGE_NUMBER' => 'Numer systemowy',
|
||||
'LBL_PACKAGE_AMOUNT' => 'Kwota',
|
||||
'LBL_BOOK_AMOUNT_COLORED' => 'Kwota',
|
||||
'LBL_PACKAGE_ACC_MA' => 'Ma',
|
||||
'LBL_PACKAGE_ACC_WN' => 'Winien',
|
||||
'LBL_PACKAGE_POSITION' => 'Pozycja',
|
||||
'LBL_PACKAGE_SYMBOL' => 'Symbol',
|
||||
'LBL_PACKAGE_IDENTIFIER' => 'Identyfikator',
|
||||
//module
|
||||
'LBL_MODULE_NAME' => 'Dokumenty',
|
||||
'LBL_MODULE_TITLE' => 'Dokumenty: Strona główna',
|
||||
'LNK_NEW_DOCUMENT' => 'Utwórz dokument',
|
||||
'LNK_DOCUMENT_LIST' => 'Lista dokumentów',
|
||||
'LBL_DOC_REV_HEADER' => 'Wersja dokumentu',
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Szukanie dokumentów',
|
||||
//vardef labels
|
||||
'LBL_DOCUMENT_ID' => 'ID dokumentu',
|
||||
'LBL_NAME' => 'Nazwa dokumentu',
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
'LBL_CATEGORY' => 'Kategoria',
|
||||
'LBL_SUBCATEGORY' => 'Podkategoria',
|
||||
'LBL_STATUS' => 'Status',
|
||||
'LBL_CREATED_BY' => 'Utworzony przez',
|
||||
'LBL_DATE_ENTERED' => 'Data wprowadzenia',
|
||||
'LBL_DATE_MODIFIED' => 'Data modyfikacji',
|
||||
'LBL_DELETED' => 'Usunięty',
|
||||
'LBL_MODIFIED' => 'Zmodyfikowany przez ID',
|
||||
'LBL_MODIFIED_USER' => 'Zmodyfikowany przez',
|
||||
'LBL_CREATED' => 'Utworzony przez',
|
||||
'LBL_REVISIONS' => 'Wersje',
|
||||
'LBL_RELATED_DOCUMENT_ID' => 'ID dokumentów połączonych',
|
||||
'LBL_RELATED_DOCUMENT_REVISION_ID' => 'ID wersji dokumentów połączonych',
|
||||
'LBL_IS_TEMPLATE' => 'Jest szablonem',
|
||||
'LBL_TEMPLATE_TYPE' => 'Typ dokumentu',
|
||||
'LBL_ASSIGNED_TO_NAME' => 'Przydzielone do:',
|
||||
'LBL_REVISION_NAME' => 'Numer wersji',
|
||||
'LBL_MIME' => 'Typ mime',
|
||||
'LBL_REVISION' => 'Wersja',
|
||||
'LBL_DOCUMENT' => 'Połączone dokumenty',
|
||||
'LBL_LATEST_REVISION' => 'Najnowsza wersja',
|
||||
'LBL_CHANGE_LOG' => 'Dziennik zmian',
|
||||
'LBL_ACTIVE_DATE' => 'Data publikacji',
|
||||
'LBL_EXPIRATION_DATE' => 'Data wyganiecia',
|
||||
'LBL_FILE_EXTENSION' => 'Rozszerzenie pliku',
|
||||
'LBL_CAT_OR_SUBCAT_UNSPEC' => 'Niesprecyzowany',
|
||||
//quick search
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowy dokument',
|
||||
//ecmfkpackage edit and detail view
|
||||
'LBL_DOC_NAME' => 'Nazwa dokumentu:',
|
||||
'LBL_FILENAME' => 'Nazwa pliku:',
|
||||
'LBL_DOC_VERSION' => 'Wersja:',
|
||||
'LBL_CATEGORY_VALUE' => 'Kategoria:',
|
||||
'LBL_SUBCATEGORY_VALUE' => 'Podkategoria:',
|
||||
'LBL_DOC_STATUS' => 'Status:',
|
||||
'LBL_LAST_REV_CREATOR' => 'Wersja utworzona przez:',
|
||||
'LBL_LAST_REV_DATE' => 'Data wersji:',
|
||||
'LBL_DOWNNLOAD_FILE' => 'Ściągnij plik:',
|
||||
'LBL_DET_RELATED_DOCUMENT' => 'Dokumenty połączone:',
|
||||
'LBL_DET_RELATED_DOCUMENT_VERSION' => "Wersja dokumentów połaczonych:",
|
||||
'LBL_DET_IS_TEMPLATE' => 'Szkic? :',
|
||||
'LBL_DET_TEMPLATE_TYPE' => 'Typ dokumentu:',
|
||||
'LBL_TEAM' => 'Zespół:',
|
||||
'LBL_DOC_DESCRIPTION' => 'Opis:',
|
||||
'LBL_DOC_ACTIVE_DATE' => 'Data publikacji:',
|
||||
'LBL_DOC_EXP_DATE' => 'Data wygaśnięcia:',
|
||||
//ecmfkpackage list view.
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista dokumentów',
|
||||
'LBL_LIST_DOCUMENT' => 'Dokument',
|
||||
'LBL_LIST_CATEGORY' => 'Kategoria',
|
||||
'LBL_LIST_SUBCATEGORY' => 'Podkategoria',
|
||||
'LBL_LIST_REVISION' => 'Wersja',
|
||||
'LBL_LIST_LAST_REV_CREATOR' => 'Opublikowany przez',
|
||||
'LBL_LIST_LAST_REV_DATE' => 'Data wersji',
|
||||
'LBL_LIST_VIEW_DOCUMENT' => 'Podgląd',
|
||||
'LBL_LIST_DOWNLOAD' => 'Pobierz',
|
||||
'LBL_LIST_ACTIVE_DATE' => 'Data publikacji',
|
||||
'LBL_LIST_EXP_DATE' => 'Data wygaśnięcia',
|
||||
'LBL_LIST_STATUS' => 'Status',
|
||||
//ecmfkpackage search form.
|
||||
'LBL_SF_DOCUMENT' => 'Nazwa dokumentu:',
|
||||
'LBL_SF_CATEGORY' => 'Kategoria:',
|
||||
'LBL_SF_SUBCATEGORY' => 'Podkategoria:',
|
||||
'LBL_SF_ACTIVE_DATE' => 'Data publikacji:',
|
||||
'LBL_SF_EXP_DATE' => 'Data wygaśnięcia:',
|
||||
'DEF_CREATE_LOG' => 'Dokument utworzony przez',
|
||||
//error messages
|
||||
'ERR_DOC_NAME' => 'Nazwa dokumentu',
|
||||
'ERR_DOC_ACTIVE_DATE' => 'Data publikacji',
|
||||
'ERR_DOC_EXP_DATE' => 'Data wygaśniecia',
|
||||
'ERR_FILENAME' => 'Nazwa pliku',
|
||||
'ERR_DOC_VERSION' => 'Wersja dokumentu',
|
||||
'ERR_DELETE_CONFIRM' => 'Czy chcesz usunąć tę wersję dokumentu?',
|
||||
'ERR_DELETE_LATEST_VERSION' => 'Nie jesteś uprawiony do usunięcia najnowszej wersji dokumentu.',
|
||||
'LNK_NEW_MAIL_MERGE' => 'Scalanie poczty',
|
||||
'LBL_MAIL_MERGE_DOCUMENT' => 'Szablon scalania poczty:',
|
||||
'LBL_TREE_TITLE' => 'Dokumenty',
|
||||
//sub-panel vardefs.
|
||||
'LBL_LIST_DOCUMENT_NAME' => 'Nazwa dokument',
|
||||
'LBL_CONTRACT_NAME' => 'Nazwa kontraktu:',
|
||||
'LBL_LIST_IS_TEMPLATE' => 'Szkic?',
|
||||
'LBL_LIST_TEMPLATE_TYPE' => 'Typ dokumentu',
|
||||
'LBL_LIST_SELECTED_REVISION' => 'Wybrane wersje',
|
||||
'LBL_LIST_LATEST_REVISION' => 'Najnowsze wydanie',
|
||||
'LBL_CONTRACTS_SUBPANEL_TITLE' => 'Połączone kontrakty',
|
||||
'LBL_LAST_REV_CREATE_DATE' => 'Data utworzenia ostatniego wydania',
|
||||
//'LNK_DOCUMENT_CAT'=>'EcmFkPackage Categories',
|
||||
'LBL_CONTRACTS' => 'Kontrakty',
|
||||
'LBL_CREATED_USER' => 'Użytkownik tworzący',
|
||||
'LBL_THEREVISIONS_SUBPANEL_TITLE' => 'Rewersje',
|
||||
);
|
||||
62
modules/EcmFkPackages/metadata/SearchFields.php
Executable file
62
modules/EcmFkPackages/metadata/SearchFields.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
*
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
$searchFields['EcmFkPackages'] = array(
|
||||
// 'ecmfkpackage_name' => array(
|
||||
// 'query_type' => 'default',
|
||||
// ),
|
||||
// 'category_id' => array(
|
||||
// 'query_type' => 'default',
|
||||
// 'options' => 'ecmfkpackage_category_dom',
|
||||
// 'template_var' => 'CATEGORY_OPTIONS',
|
||||
// ),
|
||||
// 'subcategory_id' => array(
|
||||
// 'query_type' => 'default',
|
||||
// 'options' => 'ecmfkpackage_subcategory_dom',
|
||||
// 'template_var' => 'SUBCATEGORY_OPTIONS',
|
||||
// ),
|
||||
// 'active_date' => array(
|
||||
// 'query_type' => 'default',
|
||||
// ),
|
||||
// 'exp_date' => array(
|
||||
// 'query_type' => 'default',
|
||||
// ),
|
||||
);
|
||||
238
modules/EcmFkPackages/metadata/_listviewdefs.php
Executable file
238
modules/EcmFkPackages/metadata/_listviewdefs.php
Executable file
@@ -0,0 +1,238 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
*
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
$listViewDefs['EcmFkPackages'] = array(
|
||||
// 'ID' => array(
|
||||
// 'label' => 'LBL_ID',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'DATE_ENTERED' => array(
|
||||
// 'label' => 'LBL_DATE_ENTERED',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'DATE_MODIFIED' => array(
|
||||
// 'label' => 'LBL_DATE_MODIFIED',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'DATE_BOOK' => array(
|
||||
// 'label' => 'LBL_DATE_BOOK',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'DATE_DOCUMENT' => array(
|
||||
// 'label' => 'LBL_DATE_DOCUMENT',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'MODIFIED_USER_ID' => array(
|
||||
// 'label' => 'LBL_MODIFIED_USER_ID',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'CREATED_BY' => array(
|
||||
// 'label' => 'LBL_CREATED_BY',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'DESCRIPTION' => array(
|
||||
// 'label' => 'LBL_DESCRIPTION',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'DELETED' => array(
|
||||
// 'label' => 'LBL_DELETED',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'BOOK_DATE' => array(
|
||||
// 'label' => 'LBL_BOOK_DATE',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'BOOK_NAME' => array(
|
||||
// 'label' => 'LBL_BOOK_NAME',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'BOOK_NUMBER' => array(
|
||||
// 'label' => 'LBL_BOOK_NUMBER',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'BOOK_AMOUNT' => array(
|
||||
// 'label' => 'LBL_BOOK_AMOUNT',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'BOOK_ACC_MA' => array(
|
||||
// 'label' => 'LBL_BOOK_ACC_MA',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'BOOK_ACC_WN' => array(
|
||||
// 'label' => 'LBL_BOOK_ACC_WN',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'BOOK_POSITION' => array(
|
||||
// 'label' => 'LBL_BOOK_POSITION',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'BOOK_SYMBOL' => array(
|
||||
// 'label' => 'LBL_BOOK_SYMBOL',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'BOOK_IDENTIFIER' => array(
|
||||
// 'label' => 'LBL_BOOK_IDENTIFIER',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'FILE_URL' => array(
|
||||
// 'width' => '2%',
|
||||
// 'label' => ' ',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'related_fields' => array(
|
||||
// 0 => 'ecmfkpackage_revision_id',
|
||||
// ),
|
||||
// 'sortable' => false,
|
||||
// 'studio' => false,
|
||||
// ),
|
||||
// 'DOCUMENT_NAME' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_NAME',
|
||||
// 'link' => true,
|
||||
// 'default' => true,
|
||||
// 'bold' => true,
|
||||
// ),
|
||||
// 'CATEGORY_ID' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_LIST_CATEGORY',
|
||||
// 'default' => true,
|
||||
// ),
|
||||
// 'SUBCATEGORY_ID' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_LIST_SUBCATEGORY',
|
||||
// 'default' => true,
|
||||
// ),
|
||||
// 'LAST_REV_CREATE_DATE' => array(
|
||||
// 'width' => '10%',
|
||||
// 'label' => 'LBL_LIST_LAST_REV_DATE',
|
||||
// 'default' => true,
|
||||
// 'sortable' => false,
|
||||
// 'related_fields' => array(
|
||||
// 0 => 'ecmfkpackage_revision_id',
|
||||
// ),
|
||||
// ),
|
||||
//
|
||||
'BOOK_NUMBER' => array(
|
||||
'label' => 'LBL_BOOK_NUMBER',
|
||||
'link' => false,
|
||||
'default' => false,
|
||||
'bold' => false,
|
||||
),
|
||||
/*
|
||||
'BOOK_NAME' => array(
|
||||
'label' => 'LBL_BOOK_NAME',
|
||||
'link' => true,
|
||||
'default' => false,
|
||||
'bold' => true,
|
||||
),
|
||||
'BOOK_AMOUNT' => array(
|
||||
'label' => 'LBL_BOOK_AMOUNT',
|
||||
'link' => false,
|
||||
'default' => false,
|
||||
'bold' => false,
|
||||
),
|
||||
'DATE_DOCUMENT' => array(
|
||||
'label' => 'LBL_DATE_DOCUMENT',
|
||||
'link' => false,
|
||||
'default' => false,
|
||||
'bold' => false,
|
||||
),
|
||||
'BOOK_DATE' => array(
|
||||
'label' => 'LBL_BOOK_DATE',
|
||||
'link' => false,
|
||||
'default' => false,
|
||||
'bold' => false,
|
||||
),
|
||||
*/
|
||||
// 'CREATED_BY_NAME' => array(
|
||||
// 'width' => '2%',
|
||||
// 'label' => 'LBL_CREATED_BY',
|
||||
// 'default' => true,
|
||||
// 'sortable' => false,
|
||||
// ),
|
||||
// 'MODIFIED_BY_NAME' => array(
|
||||
// 'width' => '10%',
|
||||
// 'label' => 'LBL_MODIFIED_USER',
|
||||
// 'module' => 'Users',
|
||||
// 'id' => 'USERS_ID',
|
||||
// 'default' => false,
|
||||
// 'sortable' => false,
|
||||
// 'related_fields' => array(
|
||||
// 0 => 'modified_user_id',
|
||||
// ),
|
||||
// ),
|
||||
);
|
||||
186
modules/EcmFkPackages/metadata/detailviewdefs.php
Executable file
186
modules/EcmFkPackages/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
*
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
$viewdefs['EcmFkPackages']['DetailView'] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '2',
|
||||
'form' => array(
|
||||
'hidden' => array(
|
||||
'<input type="hidden" name="old_id" value="{$fields.ecmfkpackage_revision_id.value}">',
|
||||
),
|
||||
),
|
||||
'widths' => array(
|
||||
array(
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
array(
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
),
|
||||
),
|
||||
'panels' => array(
|
||||
'LBL_ECMFKPACKAGE_INFORMATION' => array(
|
||||
array(
|
||||
'date_entered',
|
||||
'date_modified',
|
||||
),
|
||||
// array(
|
||||
// 'modified_user_id',
|
||||
// 'created_by',
|
||||
// ),
|
||||
// array(
|
||||
// 'created_by_link',
|
||||
// 'modified_user_link',
|
||||
// ),
|
||||
array(
|
||||
'created_by_name',
|
||||
'modified_by_name',
|
||||
),
|
||||
),
|
||||
'LBL_ECMFKPACKAGE_DETAILS' => array(
|
||||
array(
|
||||
'date_package',
|
||||
'date_document',
|
||||
),
|
||||
array(
|
||||
'description',
|
||||
//'deleted',
|
||||
),
|
||||
array(
|
||||
'package_date',
|
||||
'package_name',
|
||||
),
|
||||
array(
|
||||
'package_number',
|
||||
'package_amount',
|
||||
),
|
||||
array(
|
||||
'package_acc_ma',
|
||||
'package_acc_wn',
|
||||
),
|
||||
array(
|
||||
'package_position',
|
||||
'package_symbol',
|
||||
),
|
||||
array(
|
||||
'package_identifier',
|
||||
),
|
||||
),
|
||||
'LBL_PK_TAB' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'pk_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' =>
|
||||
'
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmFkPackages/MyTable.css" />
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmFkPackages/AjaxSearch/AjaxSearch.css" />
|
||||
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="pkTableDIV">
|
||||
<table class="positions" style="width:100%;" id="pkTable">
|
||||
<thead id="head">
|
||||
<tr id="tr">
|
||||
<td width="20%">{$MOD.LBL_EDITABLE_POSITION}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_WN}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_AMOUNT}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_MA}</td>
|
||||
<td width="5%">{$MOD.LBL_EDITABLE_OPTIONS}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
',
|
||||
)
|
||||
),
|
||||
),
|
||||
'LBL_REGISTRY_TAB' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'registry_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' =>
|
||||
'
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmFkPackages/MyTable.css" />
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmFkPackages/AjaxSearch/AjaxSearch.css" />
|
||||
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="registryTableDIV">
|
||||
<table class="positions" style="width:100%;" id="registryTable">
|
||||
<thead id="head">
|
||||
<tr id="tr">
|
||||
<td width="20%">{$MOD.LBL_EDITABLE_POSITION}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_WN}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_AMOUNT}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_MA}</td>
|
||||
<td width="5%">{$MOD.LBL_EDITABLE_OPTIONS}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
',
|
||||
)
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
/*
|
||||
id
|
||||
date_entered
|
||||
date_modified
|
||||
date_package
|
||||
date_document
|
||||
modified_user_id
|
||||
created_by
|
||||
description
|
||||
deleted
|
||||
package_date
|
||||
package_name
|
||||
package_number
|
||||
package_amount
|
||||
package_acc_ma
|
||||
package_acc_wn
|
||||
package_position
|
||||
package_symbol
|
||||
package_identifier
|
||||
*/
|
||||
213
modules/EcmFkPackages/metadata/editviewdefs.php
Executable file
213
modules/EcmFkPackages/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,213 @@
|
||||
<?php
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
*
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
$viewdefs['EcmFkPackages']['EditView'] = array(
|
||||
'templateMeta' => array(
|
||||
'form' => array(
|
||||
'enctype' => 'multipart/form-data',
|
||||
'hidden' => array(
|
||||
'<input type="hidden" name="old_id" value="{$fields.ecmfkpackage_revision_id.value}">',
|
||||
'<input type="hidden" name="contract_id" value="{$smarty.request.contract_id}">',
|
||||
'<input type="hidden" name="pk_list" id="pk_list" value=\'{$PK_LIST}\'>',
|
||||
'<input type="hidden" name="registry_list" id="registry_list" value=\'{$REGISTRY_LIST}\'>',
|
||||
),
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array(
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
array(
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
),
|
||||
/*
|
||||
'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>
|
||||
<script type="text/javascript" src="modules/EcmFkPackages/ecmfkpackages.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
|
||||
',
|
||||
*/
|
||||
'includes' => array(
|
||||
// array(
|
||||
// 'file' => 'include/JSON.js',
|
||||
// ),
|
||||
// array(
|
||||
// 'file' => 'include/javascript/quicksearch.js',
|
||||
// ),
|
||||
// array(
|
||||
// 'file' => 'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js',
|
||||
// ),
|
||||
// array(
|
||||
// 'file' => 'modules/EcmFkPackages/AjaxSearch/AjaxSearch.js',
|
||||
// ),
|
||||
array(
|
||||
'file' => 'modules/EcmFkPackages/formloader.js',
|
||||
),
|
||||
array(
|
||||
'file' => 'modules/EcmFkPackages/MyTable.js',
|
||||
),
|
||||
array(
|
||||
'file' => 'modules/EcmFkPackages/EcmFkPackages.js',
|
||||
),
|
||||
array(
|
||||
'file' => 'modules/EcmFkPackages/EcmFkPackagesEditView.js',
|
||||
),
|
||||
array(
|
||||
'file' => 'modules/EcmProducts/mintajax.js',
|
||||
),
|
||||
array(
|
||||
'file' => 'modules/EcmProducts/helper.js',
|
||||
),
|
||||
),
|
||||
),
|
||||
'panels' => array(
|
||||
'LBL_ECMFKPACKAGE_INFORMATION' => array(
|
||||
// array(
|
||||
// 'date_entered',
|
||||
// 'date_modified',
|
||||
// ),
|
||||
// array(
|
||||
// 'modified_user_id',
|
||||
// 'created_by',
|
||||
// ),
|
||||
// array(
|
||||
// 'created_by_link',
|
||||
// 'modified_user_link',
|
||||
// ),
|
||||
array(
|
||||
'created_by_name',
|
||||
'modified_by_name',
|
||||
),
|
||||
),
|
||||
'LBL_ECMFKPACKAGE_DETAILS' => array(
|
||||
array(
|
||||
'date_package',
|
||||
'date_document',
|
||||
),
|
||||
array(
|
||||
'description',
|
||||
'deleted',
|
||||
),
|
||||
array(
|
||||
'package_date',
|
||||
'package_name',
|
||||
),
|
||||
array(
|
||||
'package_number',
|
||||
'package_amount',
|
||||
),
|
||||
array(
|
||||
'package_acc_ma',
|
||||
'package_acc_wn',
|
||||
),
|
||||
array(
|
||||
'package_position',
|
||||
'package_symbol',
|
||||
),
|
||||
array(
|
||||
'package_identifier',
|
||||
),
|
||||
),
|
||||
'LBL_PK_TAB' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'pk_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' =>
|
||||
'
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmFkPackages/MyTable.css" />
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmFkPackages/AjaxSearch/AjaxSearch.css" />
|
||||
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="pkTableDIV">
|
||||
<table class="positions" style="width:100%;" id="pkTable">
|
||||
<thead id="head">
|
||||
<tr id="tr">
|
||||
<td width="20%">{$MOD.LBL_EDITABLE_POSITION}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_WN}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_AMOUNT}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_MA}</td>
|
||||
<td width="5%">{$MOD.LBL_EDITABLE_OPTIONS}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
',
|
||||
)
|
||||
),
|
||||
),
|
||||
'LBL_REGISTRY_TAB' => array(
|
||||
array(
|
||||
array(
|
||||
'name' => 'registry_panel',
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' =>
|
||||
'
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmFkPackages/MyTable.css" />
|
||||
<link rel="stylesheet" type="text/css" href="modules/EcmFkPackages/AjaxSearch/AjaxSearch.css" />
|
||||
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="registryTableDIV">
|
||||
<table class="positions" style="width:100%;" id="registryTable">
|
||||
<thead id="head">
|
||||
<tr id="tr">
|
||||
<td width="20%">{$MOD.LBL_EDITABLE_POSITION}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_WN}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_AMOUNT}</td>
|
||||
<td width="25%">{$MOD.LBL_EDITABLE_MA}</td>
|
||||
<td width="5%">{$MOD.LBL_EDITABLE_OPTIONS}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tbody">
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
',
|
||||
)
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
176
modules/EcmFkPackages/metadata/listviewdefs.php
Executable file
176
modules/EcmFkPackages/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,176 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
*
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
$listViewDefs['EcmFkPackages'] = array(
|
||||
// 'ID' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_ID',
|
||||
// 'link' => false,
|
||||
// 'default' => false,
|
||||
// 'bold' => false,
|
||||
// ),
|
||||
// 'DATE_ENTERED' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_DATE_ENTERED',
|
||||
// 'link' => false,
|
||||
// 'default' => true,
|
||||
// 'bold' => false,
|
||||
// ),
|
||||
// 'DATE_MODIFIED' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_DATE_MODIFIED',
|
||||
// 'link' => false,
|
||||
// 'default' => false,
|
||||
// 'bold' => false,
|
||||
// ),
|
||||
// 'DATE_PACKAGE' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_DATE_PACKAGE',
|
||||
// 'link' => false,
|
||||
// 'default' => false,
|
||||
// 'bold' => false,
|
||||
// ),
|
||||
// 'MODIFIED_USER_ID' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_MODIFIED_USER_ID',
|
||||
// 'link' => false,
|
||||
// 'default' => false,
|
||||
// 'bold' => false,
|
||||
// ),
|
||||
// 'CREATED_BY' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_CREATED_BY',
|
||||
// 'link' => false,
|
||||
// 'default' => false,
|
||||
// 'bold' => false,
|
||||
// ),
|
||||
// 'DELETED' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_DELETED',
|
||||
// 'link' => false,
|
||||
// 'default' => false,
|
||||
// 'bold' => false,
|
||||
// ),
|
||||
'PACKAGE_NUMBER' => array(
|
||||
'width' => '40%',
|
||||
'label' => 'LBL_PACKAGE_NUMBER',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'bold' => false,
|
||||
),
|
||||
'PACKAGE_SYMBOL' => array(
|
||||
'width' => '40%',
|
||||
'label' => 'LBL_PACKAGE_SYMBOL',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'bold' => false,
|
||||
),
|
||||
'PACKAGE_NAME' => array(
|
||||
'width' => '40%',
|
||||
'label' => 'LBL_PACKAGE_NAME',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'bold' => false,
|
||||
),
|
||||
'DATE_DOCUMENT' => array(
|
||||
'width' => '40%',
|
||||
'label' => 'LBL_DATE_DOCUMENT',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'bold' => false,
|
||||
),
|
||||
// 'PACKAGE_AMOUNT' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_PACKAGE_AMOUNT',
|
||||
// 'link' => false,
|
||||
// 'default' => true,
|
||||
// 'bold' => false,
|
||||
// ),
|
||||
'PACKAGE_AMOUNT_COLORED' => array(
|
||||
'width' => '40%',
|
||||
'label' => 'LBL_PACKAGE_AMOUNT_COLORED',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'bold' => false,
|
||||
),
|
||||
'PACKAGE_ACC_WN' => array(
|
||||
'width' => '40%',
|
||||
'label' => 'LBL_PACKAGE_ACC_WN',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'bold' => false,
|
||||
),
|
||||
'PACKAGE_ACC_MA' => array(
|
||||
'width' => '40%',
|
||||
'label' => 'LBL_PACKAGE_ACC_MA',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'bold' => false,
|
||||
),
|
||||
// 'PACKAGE_POSITION' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_PACKAGE_POSITION',
|
||||
// 'link' => false,
|
||||
// 'default' => true,
|
||||
// 'bold' => false,
|
||||
// ),
|
||||
'PACKAGE_IDENTIFIER' => array(
|
||||
'width' => '40%',
|
||||
'label' => 'LBL_PACKAGE_IDENTIFIER',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'bold' => false,
|
||||
),
|
||||
'DESCRIPTION' => array(
|
||||
'width' => '40%',
|
||||
'label' => 'LBL_DESCRIPTION',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'bold' => false,
|
||||
),
|
||||
// 'PACKAGE_DATE' => array(
|
||||
// 'width' => '40%',
|
||||
// 'label' => 'LBL_PACKAGE_DATE',
|
||||
// 'link' => false,
|
||||
// 'default' => true,
|
||||
// 'bold' => false,
|
||||
// ),
|
||||
);
|
||||
106
modules/EcmFkPackages/metadata/quickcreatedefs.php
Executable file
106
modules/EcmFkPackages/metadata/quickcreatedefs.php
Executable file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
$viewdefs['EcmFkPackages']['QuickCreate'] = array(
|
||||
'templateMeta' => array('form' => array('enctype'=>'multipart/form-data',
|
||||
'hidden'=>array('<input type="hidden" name="old_id" value="{$fields.ecmfkpackage_revision_id.value}">',
|
||||
'<input type="hidden" name="parent_id" value="{$smarty.request.parent_id}">',
|
||||
'<input type="hidden" name="parent_type" value="{$smarty.request.parent_type}">',)),
|
||||
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
array('label' => '10', 'field' => '30'),
|
||||
array('label' => '10', 'field' => '30')
|
||||
),
|
||||
'includes' =>
|
||||
array (
|
||||
array('file' => 'include/javascript/popup_parent_helper.js'),
|
||||
array('file' => 'include/jsolait/init.js'),
|
||||
array('file' => 'include/jsolait/lib/urllib.js'),
|
||||
array('file' => 'include/javascript/jsclass_base.js'),
|
||||
array('file' => 'include/javascript/jsclass_async.js'),
|
||||
array('file' => 'modules/EcmFkPackages/ecmfkpackages.js'),
|
||||
),
|
||||
),
|
||||
'panels' =>array (
|
||||
'default' =>
|
||||
array (
|
||||
|
||||
array (
|
||||
|
||||
array('name'=>'uploadfile',
|
||||
'customCode' => '<input type="hidden" name="escaped_ecmfkpackage_name"><input name="uploadfile" type="file" size="30" maxlength="" onchange="setvalue(this);" value="{$fields.filename.value}">{$fields.filename.value}',
|
||||
'displayParams'=>array('required'=>true),
|
||||
),
|
||||
'status_id',
|
||||
),
|
||||
|
||||
array (
|
||||
'ecmfkpackage_name',
|
||||
array('name'=>'revision',
|
||||
'customCode' => '<input name="revision" type="text" value="{$fields.revision.value}">'
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array (
|
||||
'name' => 'template_type',
|
||||
'label' => 'LBL_DET_TEMPLATE_TYPE',
|
||||
),
|
||||
array (
|
||||
'name' => 'is_template',
|
||||
'label' => 'LBL_DET_IS_TEMPLATE',
|
||||
),
|
||||
),
|
||||
|
||||
array (
|
||||
array('name'=>'active_date','displayParams'=>array('required'=>true)),
|
||||
'category_id',
|
||||
),
|
||||
|
||||
array (
|
||||
'exp_date',
|
||||
'subcategory_id',
|
||||
),
|
||||
|
||||
|
||||
array (
|
||||
array('name'=>'description', 'displayParams'=>array('rows'=>10, 'cols'=>120)),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
);
|
||||
?>
|
||||
89
modules/EcmFkPackages/metadata/searchdefs.php
Executable file
89
modules/EcmFkPackages/metadata/searchdefs.php
Executable file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
*
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
$searchdefs['EcmFkPackages'] = array(
|
||||
'templateMeta' => array(
|
||||
'maxColumns' => '2',
|
||||
'widths' => array(
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
),
|
||||
'layout' => array(
|
||||
'basic_search' => array(
|
||||
// 'id',
|
||||
'date_entered',
|
||||
'date_modified',
|
||||
'date_package',
|
||||
'date_document',
|
||||
// 'modified_user_id',
|
||||
// 'created_by',
|
||||
// 'description',
|
||||
'deleted',
|
||||
// 'package_date',
|
||||
// 'package_name',
|
||||
// 'package_number',
|
||||
// 'package_amount',
|
||||
// 'package_acc_ma',
|
||||
// 'package_acc_wn',
|
||||
// 'package_position',
|
||||
// 'package_symbol',
|
||||
// 'package_identifier',
|
||||
),
|
||||
'advanced_search' => array(
|
||||
// 'id',
|
||||
'date_entered',
|
||||
'date_modified',
|
||||
'date_package',
|
||||
'date_document',
|
||||
// 'modified_user_id',
|
||||
// 'created_by',
|
||||
// 'description',
|
||||
'deleted',
|
||||
// 'package_date',
|
||||
'package_name',
|
||||
'package_number',
|
||||
// 'package_amount',
|
||||
// 'package_acc_ma',
|
||||
// 'package_acc_wn',
|
||||
// 'package_position',
|
||||
'package_symbol',
|
||||
'package_identifier',
|
||||
),
|
||||
),
|
||||
);
|
||||
66
modules/EcmFkPackages/metadata/studio.php
Executable file
66
modules/EcmFkPackages/metadata/studio.php
Executable file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
*
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
$GLOBALS['studioDefs']['EcmFkPackages'] = array(
|
||||
'LBL_DETAILVIEW' => array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmFkPackages/DetailView.html',
|
||||
'php_file' => 'modules/EcmFkPackages/DetailView.php',
|
||||
'type' => 'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW' => array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmFkPackages/EditView.html',
|
||||
'php_file' => 'modules/EcmFkPackages/EditView.php',
|
||||
'type' => 'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW' => array(
|
||||
'template' => 'listview',
|
||||
'meta_file' => 'modules/EcmFkPackages/listviewdefs.php',
|
||||
'type' => 'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM' => array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmFkPackages/SearchForm.html',
|
||||
'php_file' => 'modules/EcmFkPackages/ListView.php',
|
||||
'type' => 'SearchForm',
|
||||
),
|
||||
);
|
||||
55
modules/EcmFkPackages/metadata/subpaneldefs.php
Executable file
55
modules/EcmFkPackages/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$layout_defs['EcmFkPackages'] = array(
|
||||
// list of what Subpanels to show in the DetailView
|
||||
'subpanel_setup' => array(
|
||||
'therevisions' => array(
|
||||
'order' => 10,
|
||||
'sort_order' => 'desc',
|
||||
'sort_by' => 'revision',
|
||||
'module' => 'EcmFkPackageRevisions',
|
||||
'subpanel_name' => 'default',
|
||||
'title_key' => 'LBL_DOC_REV_HEADER',
|
||||
'get_subpanel_data' => 'revisions',
|
||||
'fill_in_additional_fields'=>true,
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
90
modules/EcmFkPackages/metadata/subpanels/ForContractType.php
Executable file
90
modules/EcmFkPackages/metadata/subpanels/ForContractType.php
Executable file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmFkPackages','field_to_name_array'=>array('ecmfkpackage_revision_id'=>'REL_ATTRIBUTE_document_revision_id')),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields'=> array(
|
||||
'ecmfkpackage_name'=> array(
|
||||
'name' => 'ecmfkpackage_name',
|
||||
'vname' => 'LBL_LIST_DOCUMENT_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
'is_template'=>array(
|
||||
'name' => 'is_template',
|
||||
'vname' => 'LBL_LIST_IS_TEMPLATE',
|
||||
'width' => '5%',
|
||||
'widget_type'=>'checkbox',
|
||||
),
|
||||
'template_type'=>array(
|
||||
'name' => 'template_types',
|
||||
'vname' => 'LBL_LIST_TEMPLATE_TYPE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'latest_revision'=>array(
|
||||
'name' => 'latest_revision',
|
||||
'vname' => 'LBL_LATEST_REVISION',
|
||||
'width' => '10%',
|
||||
'sortable' => false
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
'ecmfkpackage_revision_id'=>array(
|
||||
'usage'=>'query_only'
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
110
modules/EcmFkPackages/metadata/subpanels/default.php
Executable file
110
modules/EcmFkPackages/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmFkPackages','field_to_name_array'=>array('ecmfkpackage_revision_id'=>'REL_ATTRIBUTE_document_revision_id')),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields'=> array(
|
||||
'object_image'=>array(
|
||||
'vname' => 'LBL_OBJECT_IMAGE',
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
'image2'=>'attachment',
|
||||
'image2_url_field'=>array('id_field'=>'selected_revision_id','filename_field'=>'selected_revision_filename'),
|
||||
'attachment_image_only'=>true,
|
||||
|
||||
),
|
||||
'ecmfkpackage_name'=> array(
|
||||
'name' => 'ecmfkpackage_name',
|
||||
'vname' => 'LBL_LIST_DOCUMENT_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
'is_template'=>array(
|
||||
'name' => 'is_template',
|
||||
'vname' => 'LBL_LIST_IS_TEMPLATE',
|
||||
'width' => '5%',
|
||||
'widget_type'=>'checkbox',
|
||||
),
|
||||
'template_type'=>array(
|
||||
'name' => 'template_types',
|
||||
'vname' => 'LBL_LIST_TEMPLATE_TYPE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'selected_revision_name'=>array(
|
||||
'name' => 'selected_revision_name',
|
||||
'vname' => 'LBL_LIST_SELECTED_REVISION',
|
||||
'width' => '10%',
|
||||
),
|
||||
'latest_revision_name'=>array(
|
||||
'name' => 'latest_revision_name',
|
||||
'vname' => 'LBL_LIST_LATEST_REVISION',
|
||||
'width' => '10%',
|
||||
),
|
||||
'get_latest'=>array(
|
||||
'widget_class' => 'SubPanelGetLatestButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
'load_signed'=>array(
|
||||
'widget_class' => 'SubPanelLoadSignedButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'vname' => 'LBL_EDIT_BUTTON',
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'vname' => 'LBL_REMOVE',
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
88
modules/EcmFkPackages/subpanels/ForContractType.php
Executable file
88
modules/EcmFkPackages/subpanels/ForContractType.php
Executable file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmFkPackages','field_to_name_array'=>array('ecmfkpackage_revision_id'=>'REL_ATTRIBUTE_document_revision_id')),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields'=> array(
|
||||
'ecmfkpackage_name'=> array(
|
||||
'name' => 'ecmfkpackage_name',
|
||||
'vname' => 'LBL_LIST_DOCUMENT_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
'is_template'=>array(
|
||||
'name' => 'is_template',
|
||||
'vname' => 'LBL_LIST_IS_TEMPLATE',
|
||||
'width' => '5%',
|
||||
'widget_type'=>'checkbox',
|
||||
),
|
||||
'template_type'=>array(
|
||||
'name' => 'template_types',
|
||||
'vname' => 'LBL_LIST_TEMPLATE_TYPE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'latest_revision'=>array(
|
||||
'name' => 'latest_revision',
|
||||
'vname' => 'LBL_LATEST_REVISION',
|
||||
'width' => '10%',
|
||||
'sortable' => false
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
'ecmfkpackage_revision_id'=>array(
|
||||
'usage'=>'query_only'
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
107
modules/EcmFkPackages/subpanels/default.php
Executable file
107
modules/EcmFkPackages/subpanels/default.php
Executable file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmFkPackages','field_to_name_array'=>array('ecmfkpackage_revision_id'=>'REL_ATTRIBUTE_document_revision_id')),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields'=> array(
|
||||
'object_image'=>array(
|
||||
'widget_class' => 'SubPanelIcon',
|
||||
'width' => '2%',
|
||||
'image2'=>'attachment',
|
||||
'image2_url_field'=>array('id_field'=>'selected_revision_id','filename_field'=>'selected_revision_filename'),
|
||||
'attachment_image_only'=>true,
|
||||
|
||||
),
|
||||
'ecmfkpackage_name'=> array(
|
||||
'name' => 'ecmfkpackage_name',
|
||||
'vname' => 'LBL_LIST_DOCUMENT_NAME',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '30%',
|
||||
),
|
||||
'is_template'=>array(
|
||||
'name' => 'is_template',
|
||||
'vname' => 'LBL_LIST_IS_TEMPLATE',
|
||||
'width' => '5%',
|
||||
'widget_type'=>'checkbox',
|
||||
),
|
||||
'template_type'=>array(
|
||||
'name' => 'template_types',
|
||||
'vname' => 'LBL_LIST_TEMPLATE_TYPE',
|
||||
'width' => '15%',
|
||||
),
|
||||
'selected_revision_name'=>array(
|
||||
'name' => 'selected_revision_name',
|
||||
'vname' => 'LBL_LIST_SELECTED_REVISION',
|
||||
'width' => '10%',
|
||||
),
|
||||
'latest_revision_name'=>array(
|
||||
'name' => 'latest_revision_name',
|
||||
'vname' => 'LBL_LIST_LATEST_REVISION',
|
||||
'width' => '10%',
|
||||
),
|
||||
'get_latest'=>array(
|
||||
'widget_class' => 'SubPanelGetLatestButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
'load_signed'=>array(
|
||||
'widget_class' => 'SubPanelLoadSignedButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
'remove_button'=>array(
|
||||
'widget_class' => 'SubPanelRemoveButton',
|
||||
'module' => 'EcmFkPackages',
|
||||
'width' => '5%',
|
||||
),
|
||||
),
|
||||
);
|
||||
?>
|
||||
274
modules/EcmFkPackages/vardefs.php
Executable file
274
modules/EcmFkPackages/vardefs.php
Executable file
@@ -0,0 +1,274 @@
|
||||
<?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".
|
||||
* ****************************************************************************** */
|
||||
|
||||
//VardefManager::createVardef('EcmFkPackages', 'EcmFkpackage', array('default'));
|
||||
//return;
|
||||
//echo '<pre>' . var_export($dictionary['EcmFkPackage'], true);
|
||||
//exit;
|
||||
|
||||
$dictionary['EcmFkPackage'] = array(
|
||||
'table' => 'ecmfkpackages',
|
||||
'fields' => array(
|
||||
'id' => array(
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => true,
|
||||
'reportable' => true,
|
||||
'comment' => 'Unique identifier',
|
||||
),
|
||||
'date_entered' => array(
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'LBL_DATE_ENTERED',
|
||||
'type' => 'date',
|
||||
'group' => 'created_by_name',
|
||||
'comment' => 'Date record created',
|
||||
),
|
||||
'date_modified' => array(
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'type' => 'date',
|
||||
'group' => 'modified_by_name',
|
||||
'comment' => 'Date record last modified',
|
||||
),
|
||||
'date_package' => array(
|
||||
'name' => 'date_package',
|
||||
'vname' => 'LBL_DATE_PACKAGE',
|
||||
'type' => 'date',
|
||||
'required' => false,
|
||||
),
|
||||
'date_document' => array(
|
||||
'name' => 'date_document',
|
||||
'vname' => 'LBL_DATE_DOCUMENT',
|
||||
'type' => 'date',
|
||||
'required' => false,
|
||||
),
|
||||
'modified_user_id' => array(
|
||||
'name' => 'modified_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_MODIFIED_ID',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'users',
|
||||
'isnull' => 'false',
|
||||
'group' => 'modified_by_name',
|
||||
'dbType' => 'id',
|
||||
'reportable' => true,
|
||||
'comment' => 'User who last modified record',
|
||||
),
|
||||
'modified_by_name' => array(
|
||||
'name' => 'modified_by_name',
|
||||
'vname' => 'LBL_MODIFIED_NAME',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'rname' => 'user_name',
|
||||
'table' => 'users',
|
||||
'id_name' => 'modified_user_id',
|
||||
'module' => 'Users',
|
||||
'link' => 'modified_user_link',
|
||||
'duplicate_merge' => 'disabled',
|
||||
),
|
||||
'modified_user_link' => array(
|
||||
'name' => 'modified_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmfkpackages_modified_user',
|
||||
'vname' => 'LBL_MODIFIED_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'created_by' => array(
|
||||
'name' => 'created_by',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_CREATED_ID',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'group' => 'created_by_name',
|
||||
'comment' => 'User who created record',
|
||||
),
|
||||
'created_by_name' => array(
|
||||
'name' => 'created_by_name',
|
||||
'vname' => 'LBL_CREATED',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'link' => 'created_by_link',
|
||||
'rname' => 'user_name',
|
||||
'source' => 'non-db',
|
||||
'table' => 'users',
|
||||
'id_name' => 'created_by',
|
||||
'module' => 'Users',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'importable' => 'false',
|
||||
),
|
||||
'created_by_link' => array(
|
||||
'name' => 'created_by_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmfkpackages_created_by',
|
||||
'vname' => 'LBL_CREATED_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'description' => array(
|
||||
'name' => 'description',
|
||||
'vname' => 'LBL_DESCRIPTION',
|
||||
'type' => 'text',
|
||||
'comment' => 'Full text of the note',
|
||||
'rows' => 6,
|
||||
'cols' => 80,
|
||||
),
|
||||
'deleted' => array(
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_DELETED',
|
||||
'type' => 'bool',
|
||||
'default' => '0',
|
||||
'reportable' => false,
|
||||
'comment' => 'Record deletion indicator',
|
||||
),
|
||||
'package_date' => array(
|
||||
'name' => 'package_date',
|
||||
'vname' => 'LBL_PACKAGE_DATE',
|
||||
'type' => 'date',
|
||||
'required' => false,
|
||||
),
|
||||
'package_name' => array(
|
||||
'name' => 'package_name',
|
||||
'vname' => 'LBL_PACKAGE_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'required' => false,
|
||||
),
|
||||
'package_number' => array(
|
||||
'name' => 'package_number',
|
||||
'vname' => 'LBL_PACKAGE_NUMBER',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'required' => false,
|
||||
),
|
||||
'package_amount' => array(
|
||||
'name' => 'package_amount',
|
||||
'vname' => 'LBL_PACKAGE_AMOUNT',
|
||||
'type' => 'decimal',
|
||||
'len' => '15,2',
|
||||
'required' => false,
|
||||
),
|
||||
'package_amount_colored' => array(
|
||||
'name' => 'package_amount_colored',
|
||||
'vname' => 'LBL_PACKAGE_AMOUNT_COLORED',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'source' => 'non-db',
|
||||
),
|
||||
'package_acc_ma' => array(
|
||||
'name' => 'package_acc_ma',
|
||||
'vname' => 'LBL_PACKAGE_ACC_MA',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'required' => false,
|
||||
),
|
||||
'package_acc_wn' => array(
|
||||
'name' => 'package_acc_wn',
|
||||
'vname' => 'LBL_PACKAGE_ACC_WN',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'required' => false,
|
||||
),
|
||||
'package_position' => array(
|
||||
'name' => 'package_position',
|
||||
'vname' => 'LBL_PACKAGE_POSITION',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'required' => false,
|
||||
),
|
||||
'package_symbol' => array(
|
||||
'name' => 'package_symbol',
|
||||
'vname' => 'LBL_PACKAGE_SYMBOL',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'required' => false,
|
||||
),
|
||||
'package_identifier' => array(
|
||||
'name' => 'package_identifier',
|
||||
'vname' => 'LBL_PACKAGE_IDENTIFIER',
|
||||
'type' => 'varchar',
|
||||
'len' => '255',
|
||||
'required' => false,
|
||||
),
|
||||
),
|
||||
'indices' => array(
|
||||
'id' => array(
|
||||
'name' => 'ecmfkpackagespk',
|
||||
'type' => 'primary',
|
||||
'fields' => array(
|
||||
'id',
|
||||
),
|
||||
),
|
||||
),
|
||||
'relationships' => array(
|
||||
'ecmfkpackages_modified_user' => array(
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmFkPackages',
|
||||
'rhs_table' => 'ecmfkpackages',
|
||||
'rhs_key' => 'modified_user_id',
|
||||
'relationship_type' => 'one-to-many',
|
||||
),
|
||||
'ecmfkpackages_created_by' => array(
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmFkPackages',
|
||||
'rhs_table' => 'ecmfkpackages',
|
||||
'rhs_key' => 'created_by',
|
||||
'relationship_type' => 'one-to-many',
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
//echo '<pre>' . var_export($dictionary['EcmFkPackage'], true);
|
||||
//exit;
|
||||
92
modules/EcmFkPackages/views/DetailView/view.detail.my.php
Executable file
92
modules/EcmFkPackages/views/DetailView/view.detail.my.php
Executable file
@@ -0,0 +1,92 @@
|
||||
<?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".
|
||||
* ****************************************************************************** */
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
112
modules/EcmFkPackages/views/EditView/view.edit.ecmfkpackages.php
Executable file
112
modules/EcmFkPackages/views/EditView/view.edit.ecmfkpackages.php
Executable file
@@ -0,0 +1,112 @@
|
||||
<?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".
|
||||
* ****************************************************************************** */
|
||||
|
||||
require_once('include/EditView/EditView2.php');
|
||||
|
||||
class ViewEditEcmFkPackages 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 ViewEditEcmFkPackages() {
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
62
modules/EcmFkPackages/views/_view.detail.php
Executable file
62
modules/EcmFkPackages/views/_view.detail.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* Description: This file is used to override the default Meta-data EditView behavior
|
||||
* to provide customization specific to the Calls module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
********************************************************************************/
|
||||
|
||||
require_once('include/MVC/View/views/view.detail.php');
|
||||
|
||||
class EcmFkPackagesViewDetail extends ViewDetail
|
||||
{
|
||||
/**
|
||||
* @see SugarView::_getModuleTitleParams()
|
||||
*/
|
||||
protected function _getModuleTitleParams()
|
||||
{
|
||||
$params = array();
|
||||
$params[] = $this->_getModuleTitleListParam();
|
||||
$params[] = $this->bean->ecmfkpackage_name;
|
||||
|
||||
return $params;
|
||||
}
|
||||
}
|
||||
182
modules/EcmFkPackages/views/_view.edit.php
Executable file
182
modules/EcmFkPackages/views/_view.edit.php
Executable file
@@ -0,0 +1,182 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
/* * *******************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Affero General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU Affero General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
*
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
*
|
||||
* "Powered by SugarCRM".
|
||||
* ****************************************************************************** */
|
||||
|
||||
/* * *******************************************************************************
|
||||
|
||||
* Description: This file is used to override the default Meta-data EditView behavior
|
||||
* to provide customization specific to the Calls module.
|
||||
* Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
|
||||
* All Rights Reserved.
|
||||
* Contributor(s): ______________________________________..
|
||||
* ****************************************************************************** */
|
||||
|
||||
require_once('include/MVC/View/views/view.edit.php');
|
||||
|
||||
class EcmFkPackagesViewEdit extends ViewEdit {
|
||||
|
||||
/**
|
||||
* @see SugarView::display()
|
||||
*/
|
||||
public function display() {
|
||||
global $app_list_strings, $mod_strings;
|
||||
/*
|
||||
$this->bean->category_name = $app_list_strings['ecmfkpackage_category_dom'][$this->bean->category_id];
|
||||
$this->bean->subcategory_name = $app_list_strings['ecmfkpackage_subcategory_dom'][$this->bean->subcategory_id];
|
||||
if(isset($this->bean->status_id)) {
|
||||
$this->bean->status = $app_list_strings['ecmfkpackage_status_dom'][$this->bean->status_id];
|
||||
}
|
||||
$this->bean->related_doc_name = EcmFkPackage::get_ecmfkpackage_name($this->bean->related_doc_id);
|
||||
$this->bean->related_doc_rev_number = EcmFkPackageRevision::get_ecmfkpackage_revision_name($this->bean->related_doc_rev_id);
|
||||
$this->bean->save_file = basename($this->bean->file_url_noimage);
|
||||
*/
|
||||
$load_signed = false;
|
||||
if ((isset($_REQUEST['load_signed_id']) && !empty($_REQUEST['load_signed_id']))) {
|
||||
|
||||
$load_signed = true;
|
||||
if (isset($_REQUEST['record'])) {
|
||||
$this->bean->related_doc_id = $_REQUEST['record'];
|
||||
}
|
||||
if (isset($_REQUEST['selected_revision_id'])) {
|
||||
$this->bean->related_doc_rev_id = $_REQUEST['selected_revision_id'];
|
||||
}
|
||||
|
||||
$this->bean->id = null;
|
||||
$this->bean->ecmfkpackage_name = null;
|
||||
$this->bean->filename = null;
|
||||
$this->bean->is_template = 0;
|
||||
} //if
|
||||
|
||||
if (!empty($this->bean->id)) {
|
||||
$this->ss->assign("FILE_OR_HIDDEN", "hidden");
|
||||
if (!$this->ev->isDuplicate) {
|
||||
$this->ss->assign("DISABLED", "disabled");
|
||||
}
|
||||
} else {
|
||||
global $timedate;
|
||||
$format = $timedate->get_cal_date_format();
|
||||
$format = str_replace('%', '', $format);
|
||||
$this->bean->active_date = date($format);
|
||||
$this->bean->revision = 1;
|
||||
$this->ss->assign("FILE_OR_HIDDEN", "file");
|
||||
}
|
||||
|
||||
$popup_request_data = array(
|
||||
'call_back_function' => 'ecmfkpackage_set_return',
|
||||
'form_name' => 'EditView',
|
||||
'field_to_name_array' => array(
|
||||
'id' => 'related_doc_id',
|
||||
'ecmfkpackage_name' => 'related_document_name',
|
||||
),
|
||||
);
|
||||
$json = getJSONobj();
|
||||
$this->ss->assign('encoded_ecmfkpackage_popup_request_data', $json->encode($popup_request_data));
|
||||
|
||||
|
||||
//get related ecmfkpackage name.
|
||||
if (!empty($this->bean->related_doc_id)) {
|
||||
$this->ss->assign("RELATED_DOCUMENT_NAME", EcmFkPackage::get_ecmfkpackage_name($this->bean->related_doc_id));
|
||||
$this->ss->assign("RELATED_DOCUMENT_ID", $this->bean->related_doc_id);
|
||||
if (!empty($this->bean->related_doc_rev_id)) {
|
||||
$this->ss->assign("RELATED_DOCUMENT_REVISION_OPTIONS", get_select_options_with_id(EcmFkPackageRevision::get_ecmfkpackage_revisions($this->bean->related_doc_id), $this->bean->related_doc_rev_id));
|
||||
} else {
|
||||
$this->ss->assign("RELATED_DOCUMENT_REVISION_OPTIONS", get_select_options_with_id(EcmFkPackageRevision::get_ecmfkpackage_revisions($this->bean->related_doc_id), ''));
|
||||
}
|
||||
} else {
|
||||
$this->ss->assign("RELATED_DOCUMENT_REVISION_DISABLED", "disabled");
|
||||
}
|
||||
|
||||
|
||||
//set parent information in the form.
|
||||
if (isset($_REQUEST['parent_id'])) {
|
||||
$this->ss->assign("PARENT_ID", $_REQUEST['parent_id']);
|
||||
} //if
|
||||
|
||||
if (isset($_REQUEST['parent_name'])) {
|
||||
$this->ss->assign("PARENT_NAME", $_REQUEST['parent_name']);
|
||||
|
||||
if (!empty($_REQUEST['parent_type'])) {
|
||||
switch (strtolower($_REQUEST['parent_type'])) {
|
||||
|
||||
case "contracts" :
|
||||
$this->ss->assign("LBL_PARENT_NAME", $mod_strings['LBL_CONTRACT_NAME']);
|
||||
break;
|
||||
|
||||
//todo remove leads case.
|
||||
case "leads" :
|
||||
$this->ss->assign("LBL_PARENT_NAME", $mod_strings['LBL_CONTRACT_NAME']);
|
||||
break;
|
||||
} //switch
|
||||
} //if
|
||||
} //if
|
||||
|
||||
if (isset($_REQUEST['parent_type'])) {
|
||||
$this->ss->assign("PARENT_TYPE", $_REQUEST['parent_type']);
|
||||
}
|
||||
|
||||
if ($load_signed) {
|
||||
$this->ss->assign("RELATED_DOCUMENT_REVISION_DISABLED", "disabled");
|
||||
$this->ss->assign("RELATED_DOCUMENT_BUTTON_AVAILABILITY", "hidden");
|
||||
$this->ss->assign("LOAD_SIGNED_ID", $_REQUEST['load_signed_id']);
|
||||
} else {
|
||||
$this->ss->assign("RELATED_DOCUMENT_BUTTON_AVAILABILITY", "button");
|
||||
} //if-else
|
||||
|
||||
parent::display();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see SugarView::_getModuleTitleParams()
|
||||
*/
|
||||
protected function _getModuleTitleParams() {
|
||||
$params = array();
|
||||
$params[] = $this->_getModuleTitleListParam();
|
||||
if (!empty($this->bean->id)) {
|
||||
$params[] = "<a href='index.php?module={$this->module}&action=DetailView&record={$this->bean->id}'>" . $this->bean->ecmfkpackage_name . "</a>";
|
||||
$params[] = $GLOBALS['app_strings']['LBL_EDIT_BUTTON_LABEL'];
|
||||
} else {
|
||||
$params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL'];
|
||||
}
|
||||
|
||||
return $params;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user