Add php files
This commit is contained in:
24
modules/EcmAgreements/AgreementTemplates.php
Executable file
24
modules/EcmAgreements/AgreementTemplates.php
Executable file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
if (!$current_user->is_admin) {
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_die();
|
||||
}
|
||||
global $sugar_config, $current_user, $mod_strings;
|
||||
|
||||
$db = $GLOBALS ['db'];
|
||||
$get_saved_templates_query = "SELECT id AS id,value0 AS template_name FROM operating_values WHERE name='AgreementTemplates' AND module_name='EcmAgreements' AND value1=0 ORDER BY value0";
|
||||
$get_saved_templates_result = $db->query($get_saved_templates_query);
|
||||
$get_saved_templates_array = array();
|
||||
while($row = $db->fetchByAssoc($get_saved_templates_result)){
|
||||
$get_saved_templates_array[$row['id']] = $row['template_name'];
|
||||
}
|
||||
$parser_fields = EcmAgreement::get_parse_fields_for_pdf();
|
||||
|
||||
$format = array();
|
||||
$smarty = new Sugar_Smarty();
|
||||
$smarty->assign('MOD', $mod_strings);
|
||||
$smarty->assign('templates', $get_saved_templates_array);
|
||||
$smarty->assign('parser_fields', $parser_fields);
|
||||
echo $smarty->display('modules/EcmAgreements/tpl/AgreementTemplates.tpl');
|
||||
@@ -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 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $current_user;
|
||||
|
||||
$dashletData['MyEcmAgreementsDashlet']['searchFields'] = array('name' => array('default' => ''),
|
||||
'date_entered' => array('default' => ''),
|
||||
'status' => array('default' => ''),
|
||||
'assigned_user_id' => array('type' => 'assigned_user_name',
|
||||
'default' => $current_user->name));
|
||||
$dashletData['MyEcmAgreementsDashlet']['columns'] = array(
|
||||
'STATUS' => array(
|
||||
'width' => '1',
|
||||
'label' => ' ',
|
||||
'default' => true,
|
||||
),
|
||||
'DOCUMENT_NO' => array(
|
||||
'width' => '8',
|
||||
'label' => 'LBL_DOCUMENT_NO',
|
||||
'sortable' => true,
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
'REGISTER_DATE'=>array(
|
||||
'width'=>15,
|
||||
'label'=>'LBL_REGISTER_DATE',
|
||||
'default'=>true,
|
||||
'sortable'=>true,
|
||||
),
|
||||
'PARENT_ID'=>array(
|
||||
'width'=>0,
|
||||
'label'=>' ',
|
||||
'customCode'=>' ',
|
||||
'default'=>true,
|
||||
'sortable'=>false,
|
||||
),
|
||||
'PARENT_NAME' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_PARENT_NAME',
|
||||
'default' => true,
|
||||
'id'=>'PARENT_ID',
|
||||
'module'=>'Accounts',
|
||||
'link'=>true,
|
||||
),
|
||||
'TOTAL_TOTAL' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_TOTAL',
|
||||
'default' => true,
|
||||
'align' => 'left',
|
||||
),
|
||||
|
||||
'ASSIGNED_USER_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_LIST_ASSIGNED_USER',
|
||||
'default' => true
|
||||
),
|
||||
'OPTIONS' => array(
|
||||
'width' => '5',
|
||||
'label' => ' ',
|
||||
'link' => false,
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'align' => 'right',
|
||||
),
|
||||
|
||||
'date_entered' => array('width' => '15',
|
||||
'label' => 'LBL_DATE_ENTERED'),
|
||||
|
||||
|
||||
);
|
||||
|
||||
k
|
||||
?>
|
||||
@@ -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 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
global $app_strings;
|
||||
|
||||
$dashletMeta['MyEcmAgreementsDashlet'] = array('module' => 'EcmAgreements',
|
||||
'title' => 'Moje umowy',
|
||||
'description' => 'A customizable view into Quotes',
|
||||
'category' => 'Module Views');
|
||||
?>
|
||||
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
require_once('include/Dashlets/DashletGeneric.php');
|
||||
require_once('modules/EcmAgreements/EcmAgreement.php');
|
||||
|
||||
class MyEcmAgreementsDashlet extends DashletGeneric {
|
||||
function MyEcmAgreementsDashlet($id, $def = null) {
|
||||
global $current_user, $app_strings;
|
||||
require('modules/EcmAgreements/Dashlets/MyEcmAgreementsDashlet/MyEcmAgreementsDashlet.data.php');
|
||||
|
||||
parent::DashletGeneric($id, $def);
|
||||
|
||||
if(empty($def['title'])) $this->title = 'Moje umowy';
|
||||
|
||||
$this->searchFields = $dashletData['MyEcmAgreementsDashlet']['searchFields'];
|
||||
$this->columns = $dashletData['MyEcmAgreementsDashlet']['columns'];
|
||||
|
||||
$this->seedBean = new EcmAgreement();
|
||||
$this->lvs->quickViewLinks = false;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
101
modules/EcmAgreements/DetailView.php
Executable file
101
modules/EcmAgreements/DetailView.php
Executable file
@@ -0,0 +1,101 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'Not A Valid Entry Point' );
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings;
|
||||
|
||||
require_once ('modules/EcmAgreements/EcmAgreement.php');
|
||||
|
||||
|
||||
require_once ('include/time.php');
|
||||
|
||||
require_once ('include/json_config.php');
|
||||
|
||||
//add jquery
|
||||
|
||||
$json_config = new json_config ();
|
||||
|
||||
$focus = new EcmAgreement ();
|
||||
|
||||
if (isset ( $_REQUEST ['record'] )) {
|
||||
$focus->retrieve ( $_REQUEST ['record'] );
|
||||
$focus->format_all_fields ();
|
||||
|
||||
$OPT ['status'] = $focus->status;
|
||||
}
|
||||
|
||||
require_once ('include/MVC/View/SugarView.php');
|
||||
|
||||
require_once ('modules/EcmAgreements/views/DetailView/view.detail.my.php');
|
||||
|
||||
//create position list table
|
||||
$pl = $focus->getPositionList();
|
||||
global $db;
|
||||
$edit = new ViewDetailMy ();
|
||||
$edit->ss = new Sugar_Smarty ();
|
||||
$edit->module = 'EcmAgreements';
|
||||
|
||||
//add pdf buttons
|
||||
/*
|
||||
$btn = '<input name="quote_pdf" id="quote_pdf" title="Show PDF" accessKey="" class="button" onclick="window.open(\'index.php?module=EcmAgreements&action=createPDF&to_pdf=1&show_img=\'+$(\'#pdf_images\').val()+\'&show_ean=\'+$(\'#pdf_ean\').val()+\'&show_ean2=\'+$(\'#pdf_ean2\').val()+\'&show_recipient_code=\'+$(\'#pdf_recipient_code\').val()+\'&show_remarks=\'+$(\'#pdf_remarks\').val()+\'&record='.$_REQUEST['record'].'\',\'_blank\');" type="button" value="Harmonogram">';
|
||||
$edit->ss->assign("CREATE_PDF",$btn);
|
||||
*/
|
||||
|
||||
|
||||
$get_saved_templates_query = "SELECT value0 AS template_name FROM operating_values WHERE name='AgreementTemplates' AND module_name='EcmAgreements' AND id='" . $focus->pdf_template . "'order by value0";
|
||||
$get_saved_templates_result = $db->query($get_saved_templates_query);
|
||||
$get_saved_templates_array = array();
|
||||
$row = $db->fetchByAssoc($get_saved_templates_result);
|
||||
|
||||
$edit->ss->assign('TEMPLATES', $row['template_name']);
|
||||
/*
|
||||
$btn = '<input name="quote_pdf" id="quote_pdf" title="Show PDF" accessKey="" class="button" onclick="window.open(\'index.php?module=EcmAgreements&action=drawAgreement&to_pdf=1&show_img=\'+$(\'#pdf_images\').val()+\'&show_ean=\'+$(\'#pdf_ean\').val()+\'&show_ean2=\'+$(\'#pdf_ean2\').val()+\'&show_recipient_code=\'+$(\'#pdf_recipient_code\').val()+\'&show_remarks=\'+$(\'#pdf_remarks\').val()+\'&record='.$_REQUEST['record'].'\',\'_blank\');" type="button" value="Umowa">';
|
||||
$edit->ss->assign("CREATE_PDF2",$btn);*/
|
||||
|
||||
$btnpdf = '<input name="quote_pdf" id="quote_pdf" title="Utwórz PDF z szablonu" class="button" onclick="window.open(\'index.php?module=EcmAgreements&action=createPDF&to_pdf=1&generateFromTeplate=1&record='.$_REQUEST['record'].'\',\'_blank\');" type="button" value="PDF z szablonu">';
|
||||
$edit->ss->assign("CREATE_PDF_FROM_TEMPLATE",$btnpdf);
|
||||
unset($btnpdf);
|
||||
|
||||
$create_cor=false;
|
||||
if($focus->type!='correct'){
|
||||
$create_cor=true;
|
||||
}
|
||||
$qq = "SELECT * from ecmagreements_aditional_fields_pdf WHERE ecmagreements_id='" . $focus->id ."'";
|
||||
$rr = $focus->db->query($qq);
|
||||
|
||||
$additiona_field = '';
|
||||
while($row = $focus->db->fetchByAssoc($rr)){
|
||||
$additiona_field .= $row['field_name'] . " " . $row['filed_value'] ."<br>";
|
||||
}
|
||||
$edit->ss->assign("additiona_field",$additiona_field);
|
||||
|
||||
$can_edit = false;
|
||||
global $current_user;
|
||||
if ($focus->assigned_user_id == $current_user->id || is_admin($current_user))
|
||||
$can_edit = true;
|
||||
$edit->ss->assign("CAN_EDIT", $can_edit);
|
||||
$edit->ss->assign("CREATE_COR",$create_cor);
|
||||
$edit->ss->assign("CREATED_BY_NAME", $focus->created_by_name);
|
||||
$edit->ss->assign("MODIFIED_BY_NAME", $focus->modified_by_name);
|
||||
|
||||
$edit->bean = $focus;
|
||||
$edit->tplFile = 'include/ECM/EcmViews/DetailView/Tabs/DetailView.tpl';
|
||||
|
||||
$edit->preDisplay ();
|
||||
|
||||
//check number
|
||||
$db = $GLOBALS['db'];
|
||||
$res = $db->query("SELECT id FROM ecmagreements WHERE document_no='$focus->document_no'");
|
||||
if ($res->num_rows > 1) {
|
||||
echo '<h1 style="color: red;">Błąd numeracji, skontaktuj się z administratorem! Nie drukuj/publikuj dokumentu!</h1>';
|
||||
}
|
||||
|
||||
|
||||
echo $edit->display ();
|
||||
|
||||
require_once ('include/SubPanel/SubPanelTiles.php');
|
||||
$subpanel = new SubPanelTiles ( $focus, 'EcmAgreements' );
|
||||
echo $subpanel->display ();
|
||||
//loading view
|
||||
echo '<link rel="stylesheet" type="text/css" href="modules/EcmAgreements/javascript/helper.css" media="screen" /><div class="loading_panel"></div>';
|
||||
?>
|
||||
926
modules/EcmAgreements/EcmAgreement.php
Executable file
926
modules/EcmAgreements/EcmAgreement.php
Executable file
@@ -0,0 +1,926 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'Not A Valid Entry Point' );
|
||||
/**
|
||||
* ***************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
* ******************************************************************************
|
||||
*/
|
||||
require_once ('data/SugarBean.php');
|
||||
require_once ('include/utils.php');
|
||||
class EcmAgreement extends SugarBean {
|
||||
var $field_name_map = array ();
|
||||
// STANDARD FIELDS
|
||||
var $id;
|
||||
var $date_entered;
|
||||
var $date_modified;
|
||||
var $modified_user_id;
|
||||
var $assigned_user_id;
|
||||
var $name;
|
||||
var $description;
|
||||
// TABLE COLUMNS
|
||||
var $number;
|
||||
var $document_no;
|
||||
var $parent_type;
|
||||
var $parent_name;
|
||||
var $parent_id;
|
||||
var $type;
|
||||
var $status;
|
||||
var $register_date;
|
||||
var $parent_address_street;
|
||||
var $parent_address_city;
|
||||
var $parent_address_postalcode;
|
||||
var $parent_address_country;
|
||||
var $subtotal;
|
||||
var $total;
|
||||
var $discount;
|
||||
var $to_vatid;
|
||||
var $ecmlanguage;
|
||||
var $to_is_vat_free;
|
||||
var $header_text;
|
||||
var $footer_text;
|
||||
var $ads_text;
|
||||
var $template_id;
|
||||
var $template_name;
|
||||
var $email_id;
|
||||
var $parent_name_copy;
|
||||
var $parent_contact_name;
|
||||
var $parent_contact_title;
|
||||
var $ecmpaymentcondition_id;
|
||||
var $ecmpaymentcondition_name;
|
||||
var $ecmpaymentcondition_text;
|
||||
var $ecmdeliverycondition_id;
|
||||
var $ecmdeliverycondition_name;
|
||||
var $ecmdeliverycondition_text;
|
||||
var $validtill_date;
|
||||
var $order_origin;
|
||||
var $contact_id;
|
||||
var $contact_name;
|
||||
var $show_images_on_offers;
|
||||
var $currency_symbol;
|
||||
var $currency_id;
|
||||
var $show_ean;
|
||||
var $template;
|
||||
var $pdf;
|
||||
var $position_list;
|
||||
var $parser;
|
||||
var $account;
|
||||
var $contact;
|
||||
var $user;
|
||||
var $mfp;
|
||||
// added 4.03.2009
|
||||
var $pricebook_id;
|
||||
var $show_recipient_code;
|
||||
// RELATED FIELDS
|
||||
var $created_by;
|
||||
var $created_by_name;
|
||||
var $modified_by_name;
|
||||
var $assigned_user_name;
|
||||
// SUBPANELS RELATED
|
||||
// MODULE OBJECT DETAILS
|
||||
var $module_dir = "EcmAgreements";
|
||||
var $table_name = "ecmagreements";
|
||||
var $object_name = "EcmAgreement";
|
||||
// RELATED TABLE NAMES
|
||||
// USED TO RETRIEVE RELATED FIELDS FROM FORM POSTS.
|
||||
var $additional_column_fields = Array (
|
||||
'assigned_user_name',
|
||||
'assigned_user_id',
|
||||
'modified_user_id',
|
||||
'created_by'
|
||||
);
|
||||
// RELATIONSHIP FIELDS
|
||||
var $relationship_fields = Array (
|
||||
'note_id' => 'notes',
|
||||
'email_id' => 'emails'
|
||||
// 'account_id' => 'account',
|
||||
// 'contact_id' => 'contact',
|
||||
);
|
||||
function EcmAgreement() {
|
||||
parent::SugarBean ();
|
||||
$this->setupCustomFields ( 'EcmAgreements' );
|
||||
foreach ( $this->field_defs as $field ) {
|
||||
$this->field_name_map [$field ['name']] = $field;
|
||||
}
|
||||
}
|
||||
var $new_schema = true;
|
||||
function get_summary_text() {
|
||||
return "$this->name";
|
||||
}
|
||||
function create_list_query($order_by, $where, $show_deleted = 0) {
|
||||
// Fill in the assigned_user_name
|
||||
$custom_join = $this->custom_fields->getJOIN ();
|
||||
$query = "SELECT ";
|
||||
$query .= "ecmagreements.*
|
||||
,users.user_name as assigned_user_name";
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['select'];
|
||||
}
|
||||
$query .= " FROM ecmagreements
|
||||
LEFT JOIN users
|
||||
ON ecmagreements.assigned_user_id=users.id";
|
||||
$query .= " ";
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['join'];
|
||||
}
|
||||
$where_auto = '1=1';
|
||||
if ($show_deleted == 0) {
|
||||
$where_auto = " $this->table_name.deleted=0 ";
|
||||
} else if ($show_deleted == 1) {
|
||||
$where_auto = " $this->table_name.deleted=1 ";
|
||||
}
|
||||
if ($where != "")
|
||||
$query .= "where $where AND " . $where_auto;
|
||||
else
|
||||
$query .= "where " . $where_auto;
|
||||
if (substr_count ( $order_by, '.' ) > 0) {
|
||||
$query .= " ORDER BY $order_by";
|
||||
} else if ($order_by != "")
|
||||
$query .= " ORDER BY $order_by";
|
||||
else
|
||||
$query .= " ORDER BY ecmagreements.name";
|
||||
return $query;
|
||||
}
|
||||
function create_export_query($order_by, $where) {
|
||||
$custom_join = $this->custom_fields->getJOIN ();
|
||||
$query = "SELECT
|
||||
ecmagreements.*,
|
||||
users.user_name assigned_user_name";
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['select'];
|
||||
}
|
||||
$query .= " FROM ecmagreements ";
|
||||
$query .= " LEFT JOIN users
|
||||
ON ecmagreements.assigned_user_id=users.id";
|
||||
if ($custom_join) {
|
||||
$query .= $custom_join ['join'];
|
||||
}
|
||||
$query .= "";
|
||||
$where_auto = " ecmagreements.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 ecmagreements.name";
|
||||
return $query;
|
||||
}
|
||||
function fill_in_additional_list_fields() {
|
||||
}
|
||||
function fill_in_additional_detail_fields() {
|
||||
// FILL IN THE ASSIGNED_USER_NAME
|
||||
$this->assigned_user_name = get_assigned_user_name ( $this->assigned_user_id );
|
||||
$this->created_by_name = get_assigned_user_name ( $this->created_by );
|
||||
$this->modified_by_name = get_assigned_user_name ( $this->modified_user_id );
|
||||
/*
|
||||
$result = $this->db->query ( "SELECT status, parent_id, contact_id, template_id, assigned_user_id FROM ecmagreements WHERE id='$this->id'" );
|
||||
if (is_resource ( $result )) {
|
||||
$row = $this->db->fetchByAssoc ( $result );
|
||||
if ($row) {
|
||||
$this->status = $row ['status'];
|
||||
$this->parent_id = $row ['parent_id'];
|
||||
$this->contact_id = $row ['contact_id'];
|
||||
$this->template_id = $row ['template_id'];
|
||||
$this->assigned_user_id = $row ['assigned_user_id'];
|
||||
}
|
||||
}
|
||||
*/
|
||||
/*
|
||||
* $query = "select `number`, `template_id` from `ecmagreements` where `id`='$this->id' limit 1"; $r = $this->db->query($query); if($r) { $r = $this->db->fetchByAssoc($r); $this->template_id = $r['template_id']; $this->number = $r['number']; $this->setTemplate(); $this->document_no = $this->formatNumber(); }
|
||||
*/
|
||||
}
|
||||
function get_list_view_data() {
|
||||
global $current_language;
|
||||
$this->fill_in_additional_detail_fields ();
|
||||
$app_list_strings = return_app_list_strings_language ( $current_language );
|
||||
$mod_strings = return_module_language ( $current_language, 'EcmAgreements' );
|
||||
$the_array = parent::get_list_view_data ();
|
||||
// THE NEW LISTVIEW CODE ONLY FETCHES COLUMNS THAT WE'RE DISPLAYING AND NOT ALL
|
||||
// THE COLUMNS SO WE NEED THESE CHECKS.
|
||||
$this->retrieve($this->id);
|
||||
$the_array ['NAME'] = (($this->name == "") ? "<em>blank</em>" : $this->name);
|
||||
$the_array ['PARENT_NAME']='<a href="index.php?module=Accounts&action=DetailView&record='.$this->parent_id.'">'.$this->parent_name.'</a>';
|
||||
//$the_array ['TOTAL'] = format_number ( $this->total_netto );
|
||||
//create image options
|
||||
$the_array['TOTAL_TOTAL']=number_format($this->total_total,2,",",".");
|
||||
$op = '<a href="index.php?module=EcmAgreements&action=createPDF&to_pdf=1&show_img=1&show_ean=0&show_ean2=0&show_recipient_code=0&record='.$this->id.'" target="new"/><img src="modules/EcmAgreements/images/pdf.gif"/></a>';
|
||||
$the_array['OPTIONS'] = $op;
|
||||
|
||||
return $the_array;
|
||||
}
|
||||
function getStatusMenuInfo($inJSON = true) {
|
||||
global $app_list_strings;
|
||||
$arr = array ();
|
||||
foreach ( $app_list_strings ['ecmagreements_status_dom'] as $key => $value ) {
|
||||
$arr [$key] = array (
|
||||
'enabled' => '<div><img src="modules/EcmAgreements/images/' . $key . '.gif" />' . $value . '</div>',
|
||||
'disabled' => '<div><img src="modules/EcmAgreements/images/' . $key . '.gif" />' . $value . '</div>'
|
||||
);
|
||||
}
|
||||
$json = getJSONobj ();
|
||||
if ($inJSON)
|
||||
return str_replace ( '"', '\"', $json->encode ( $arr ) );
|
||||
else
|
||||
return $arr;
|
||||
}
|
||||
function create_new_list_query($order_by, $where, $filter = array(), $params = array(), $show_deleted = 0, $join_type = '', $return_array = false, $parentbean, $singleSelect = false) {
|
||||
echo '<script type="text/javascript" src="include/ECM/EcmPreviewPDF/EcmPreviewPDF.js"></script>';
|
||||
echo '<script type="text/javascript" src="modules/EcmAgreements/ListView.js"></script>';
|
||||
echo '<link rel="stylesheet" type="text/css" href="modules/EcmAgreements/ListView.css" />';
|
||||
echo '<script language="javascript"> var EcmAgreementsStatusMenu = ' . $this->getStatusMenuInfo () . '; </script>';
|
||||
return parent::create_new_list_query ( $order_by, $where, $filter, $params, $show_deleted, $join_type, $return_array, $parentbean, $singleSelect );
|
||||
}
|
||||
static function CreateImgStatus($id, $status) {
|
||||
global $app_list_strings;
|
||||
return '<span id="statusListEcmAgreement_' . $id . '" style="display:inline;"><img src="modules/EcmAgreements/images/' . $status . '.gif" title="' . $app_list_strings ['ecmagreements_status_dom'] [$status] . '" /></span>';
|
||||
}
|
||||
|
||||
/**
|
||||
* BUILDS A GENERIC SEARCH BASED ON THE QUERY STRING USING OR.
|
||||
* DO NOT INCLUDE ANY $THIS-> BECAUSE THIS IS CALLED ON WITHOUT HAVING THE CLASS INSTANTIATED.
|
||||
*/
|
||||
function build_generic_where_clause($the_query_string) {
|
||||
$where_clauses = Array ();
|
||||
$the_query_string = PearDatabase::quote ( from_html ( $the_query_string ) );
|
||||
array_push ( $where_clauses, "ecmagreements.name like '$the_query_string%'" );
|
||||
$the_where = "";
|
||||
foreach ( $where_clauses as $clause ) {
|
||||
if ($the_where != "")
|
||||
$the_where .= " or ";
|
||||
$the_where .= $clause;
|
||||
}
|
||||
return $the_where;
|
||||
}
|
||||
function set_notification_body($xtpl, $simplemodule) {
|
||||
global $mod_strings, $app_list_strings;
|
||||
$xtpl->assign ( "NAME", $simplemodule->name );
|
||||
$xtpl->assign ( "DESCRIPTION", $simplemodule->description );
|
||||
return $xtpl;
|
||||
}
|
||||
function bean_implements($interface) {
|
||||
switch ($interface) {
|
||||
case 'ACL' :
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function getWithdraw($array = false){
|
||||
if (isset($this->id) && $this->id != '') {
|
||||
|
||||
$query = "SELECT * FROM ecmagreement_withdraws WHERE ecmagreement_id='" . $this->id . "'";
|
||||
$r = $this->db->query($query);
|
||||
$return_array = array();
|
||||
if ($r) {
|
||||
|
||||
while ($w = $this->db->fetchByAssoc($r)) {
|
||||
|
||||
$return_array [] = $w;
|
||||
}
|
||||
$json = getJSONobj();
|
||||
return $array ? $return_array : $json->encode($return_array);
|
||||
}
|
||||
}
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
|
||||
function saveWithdraw($pl) {
|
||||
global $current_user;
|
||||
$exists = array();
|
||||
if ($this->id != '') {
|
||||
$GLOBALS['db']->query("delete FROM ecmagreement_withdraws WHERE ecmagreement_id='" . $this->id . "'");
|
||||
}
|
||||
$positon = 0;
|
||||
foreach ($pl as $p) {
|
||||
//insert new record
|
||||
$id = create_guid();
|
||||
$t = array(
|
||||
$id,
|
||||
$this->id,
|
||||
addslashes($p['date']),
|
||||
addslashes($p['amount']),
|
||||
addslashes($p['forma']),
|
||||
addslashes($p['number']),
|
||||
);
|
||||
$q = "INSERT INTO ecmagreement_withdraws VALUES ('" . implode("','", $t) . "')";
|
||||
$positon++;
|
||||
$GLOBALS['db']->query($q);
|
||||
$exists[] = $id;
|
||||
}
|
||||
//delete old
|
||||
// $GLOBALS['db']->query("UPDATE accounts_websites SET deleted='1', modified_user_id='".$current_user->id."',date_modified = '".date("Y-m-d H:i:s")."' WHERE account_id='".$this->id."' AND id NOT IN ('".implode("','",$exists)."')");
|
||||
}
|
||||
|
||||
|
||||
function save($check_notify = FALSE) {
|
||||
global $current_user;
|
||||
require_once('modules/EcmSysInfos/EcmSysInfo.php');
|
||||
$EcmSysInfo = new EcmSysInfo();
|
||||
$template = $EcmSysInfo->getFormatNumberForModule('EcmAgreements');
|
||||
$this->type='normal';
|
||||
unset($EcmSysInfo);
|
||||
if (! $this->id || $this->id == '') {
|
||||
// generate number
|
||||
if ($template != "") {
|
||||
require_once('include/ECM/EcmDocumentNumberGenerator/EcmDocumentNumberGenerator.inc.php');
|
||||
$dng = new EcmDocumentNumberGenerator('EcmAgreements');
|
||||
$this->document_no= $dng->parseNormalNumber($template, $this->stock_id);
|
||||
}
|
||||
}
|
||||
if ($_REQUEST ['is_correct'] != '') {
|
||||
if ($template != "") {
|
||||
require_once('include/ECM/EcmDocumentNumberGenerator/EcmDocumentNumberGenerator.inc.php');
|
||||
$dng = new EcmDocumentNumberGenerator('EcmAgreements');
|
||||
$this->document_no = $dng->parseCorrectNumber($template);
|
||||
}
|
||||
}
|
||||
$wplatyID = explode(',', $_POST['formaWplatyTable_rowOrder']);
|
||||
$wplaty = array();
|
||||
|
||||
foreach ($wplatyID as $value) {
|
||||
|
||||
$wplaty[$value]['date'] =date("Y-m-d", strtotime($_POST['formaWplatyTable_date_' . $value.'_date']));
|
||||
$wplaty[$value]['amount'] = $_POST['formaWplatyTable_amount_' . $value];
|
||||
$wplaty[$value]['forma'] = $_POST['formaWplatyTable_forma_' . $value];
|
||||
$wplaty[$value]['number'] = $_POST['formaWplatyTable_number_' . $value];
|
||||
}
|
||||
|
||||
if (!$this->id || $this->id=='') {
|
||||
|
||||
// generate number
|
||||
$this->number = $this->generateNumber();
|
||||
//$this->document_no = $this->formatNumber($this->number);
|
||||
|
||||
}
|
||||
if($_REQUEST['is_correct']!=''){
|
||||
$this->number = $this->generateNumberCorrect();
|
||||
$this->document_no = $this->formatNumberCorrect($this->number);
|
||||
$this->ecmagreement_id=$this->id;
|
||||
$r = $this->db->query ( "select document_no from ecmagreements where id='".$this->id."'" );
|
||||
$w = $this->db->fetchByAssoc ( $r );
|
||||
$this->ecmagreement_name=$w['document_no'];
|
||||
$this->id=null;
|
||||
|
||||
}
|
||||
|
||||
$this->vats_summary = htmlspecialchars($this->vats_summary);
|
||||
|
||||
$return_id = parent::save ( $check_notify );
|
||||
$this->saveWithdraw($wplaty);
|
||||
$this->savePositions($return_id);
|
||||
return $return_id;
|
||||
}
|
||||
|
||||
function calculateCorrectTotals($id){
|
||||
$vats_summary='';
|
||||
$total_netto=0;
|
||||
$total_brutto=0;
|
||||
$total_vat=0;
|
||||
|
||||
$res= $GLOBALS ['db']->query ("select ROUND(sum(total_netto_corrected),2) AS total_netto,ROUND(sum((total_netto_corrected*ecmvat_value)/100),2) AS total_vat,
|
||||
ROUND(sum(((total_netto_corrected*ecmvat_value)/100)+total_netto_corrected),2) AS total_brutto,ecmvat_value
|
||||
from ecmagreementitems where ecmagreement_id='".$id."' group by ecmvat_id");
|
||||
while($cc = $GLOBALS ['db']->fetchByAssoc ($res)){
|
||||
$total_netto+=$cc['total_netto'];
|
||||
$total_brutto+=$cc['total_brutto'];
|
||||
$total_vat+=$cc['total_vat'];
|
||||
$vats_summary.=$cc['ecmvat_value'].'%:'.$cc['total_netto'].':'.$cc['total_vat'].':'.$cc['total_brutto'].',';
|
||||
}
|
||||
$res= $GLOBALS ['db']->query ("update ecmagreements set vats_summary='".$vats_summary."',total_netto='".$total_netto."',total_vat='".$total_vat."',
|
||||
total_brutto='".$total_brutto."' where id='".$id."'");
|
||||
}
|
||||
|
||||
function calculateTotals($id){
|
||||
$vats_summary='';
|
||||
$total_netto=0;
|
||||
$total_brutto=0;
|
||||
$total_vat=0;
|
||||
|
||||
$res= $GLOBALS ['db']->query ("select ROUND(sum(total_netto),2) AS total_netto,ROUND(sum((total_netto*ecmvat_value)/100),2) AS total_vat,
|
||||
ROUND(sum(((total_netto*ecmvat_value)/100)+total_netto),2) AS total_brutto,ecmvat_value
|
||||
from ecmagreementitems where ecmagreement_id='".$id."' group by ecmvat_id");
|
||||
while($cc = $GLOBALS ['db']->fetchByAssoc ($res)){
|
||||
$total_netto+=$cc['total_netto'];
|
||||
$total_brutto+=$cc['total_brutto'];
|
||||
$total_vat+=$cc['total_vat'];
|
||||
$vats_summary.=$cc['ecmvat_value'].'%:'.$cc['total_netto'].':'.$cc['total_vat'].':'.$cc['total_brutto'].',';
|
||||
}
|
||||
$res= $GLOBALS ['db']->query ("update ecmagreements set vats_summary='".$vats_summary."',total_netto='".$total_netto."',total_vat='".$total_vat."',
|
||||
total_brutto='".$total_brutto."' where id='".$id."'");
|
||||
}
|
||||
|
||||
// ***************************Start Managing Positions*************************//
|
||||
function constructInsertQuery($data, $table = '') {
|
||||
if ($table == '' && isset ( $this->object_name ) && $this->object_name != '') {
|
||||
$table = strtolower ( $this->object_name ) . "items";
|
||||
} else
|
||||
return "";
|
||||
$keys = array ();
|
||||
$values = array ();
|
||||
foreach ( $data as $key => $value ) {
|
||||
$keys [] = $key;
|
||||
if (is_array ( $value ))
|
||||
$values [] = $value [1] . str_replace ( "'", "\'", $value [0] ) . $value [1];
|
||||
else
|
||||
$values [] = "'" . str_replace ( "'", "\'", $value ) . "'";
|
||||
}
|
||||
$q = "insert into `$table` (`";
|
||||
$q .= implode ( '`, `', $keys );
|
||||
$q .= "`) values (";
|
||||
$q .= implode ( ", ", $values );
|
||||
$q .= ");";
|
||||
return $q;
|
||||
}
|
||||
function savePositions($id = null, $position_list = null) {
|
||||
global $current_user, $timedate;
|
||||
if ($position_list == null)
|
||||
$position_list = $this->position_list;
|
||||
if ($id == null)
|
||||
$id = $this->id;
|
||||
if (count ( $position_list ) > 0)
|
||||
$this->deleteAssignedPositions ( $id );
|
||||
$arr = array ();
|
||||
$position = 0;
|
||||
$counter=0;
|
||||
for($i = 0; $i < count ( $position_list ); $i ++) {
|
||||
if ($position_list [$i] ['payment_date'] == '')
|
||||
continue;
|
||||
$p = $position_list [$i];
|
||||
|
||||
$arr = array (
|
||||
'id' => create_guid (),
|
||||
'date_entered' => array (
|
||||
'NOW()',
|
||||
''
|
||||
),
|
||||
'date_modified' => array (
|
||||
'NOW()',
|
||||
''
|
||||
),
|
||||
'modified_user_id' => $current_user->id,
|
||||
'assigned_user_id' => $current_user->id,
|
||||
'created_by' => $current_user->id,
|
||||
'deleted' => '0',
|
||||
strtolower ( $this->object_name ) . '_id' => $id,
|
||||
'position' => $counter,
|
||||
'payment_date' => date("Y-m-d",strtotime($p ['payment_date'])),
|
||||
'saldo' => $p ['saldo'],
|
||||
'principal_value' => ((empty ( $p ['principal_value'] ) || $p ['principal_value'] == '') ? 0 : $p ['principal_value']),
|
||||
'interest_rate' => ((empty ( $p ['interest_rate'] ) || $p ['interest_rate'] == '') ? 0 : $p ['interest_rate']),
|
||||
'rate_of_commission' => ((empty ( $p ['rate_of_commission'] ) || $p ['rate_of_commission'] == '') ? 0 : $p ['rate_of_commission']),
|
||||
'total' => ((empty ( $p ['total'] ) || $p ['total'] == '') ? 0 : $p ['total']),
|
||||
);
|
||||
// odsetki
|
||||
if($p['interest_rate']>0){
|
||||
$this->saveTransaction($this->id,$p['interest_rate'],$p ['payment_date'],'Odsetki do umowy: ');
|
||||
}
|
||||
|
||||
if($p['principal_value']>0){
|
||||
$this->saveTransaction($this->id,$p['principal_value'],$p ['payment_date'],'Rata kapitałowa do umowy: ');
|
||||
}
|
||||
|
||||
if($p['rate_of_commission']>0){
|
||||
$this->saveTransaction($this->id,$p['rate_of_commission'],$p ['payment_date'],'Prowizja do umowy: ');
|
||||
}
|
||||
|
||||
$this->db->query ( $this->constructInsertQuery ( $arr ) );
|
||||
$counter ++;
|
||||
}
|
||||
}
|
||||
function saveTransaction($id,$total_brutto,$payment_date,$title) {
|
||||
global $current_user;
|
||||
|
||||
$t = new EcmTransaction ();
|
||||
$t->name = $title.' '.$this->document_no;
|
||||
$t->record_type = 'EcmAgreements';
|
||||
$t->record_id=$id;
|
||||
$t->created_by = $current_user->id;
|
||||
$t->deleted = 0;
|
||||
$t->assigned_user_id = $this->assigned_user_id;
|
||||
$t->parent_name = $this->parent_name;
|
||||
$t->parent_id = $this->parent_id;
|
||||
$t->payment_date =$payment_date;
|
||||
$t->type = 0;
|
||||
$t->register_date = $this->register_date;
|
||||
$t->currency_id = 'PLN';
|
||||
$t->currency_value = $this->currency_value;
|
||||
$t->value = $total_brutto;
|
||||
$t->save (true);
|
||||
}
|
||||
function getCorrectedPosition($position,$type) {
|
||||
$query = "SELECT * FROM `" . strtolower ( $this->object_name ) . "items` WHERE `id`='" . $position. "' order by position asc";
|
||||
$r = $this->db->query ( $query );
|
||||
$return_array = array ();
|
||||
if ($r) {
|
||||
while ( $position = $this->db->fetchByAssoc ( $r ) ) {
|
||||
if (! is_array ( $position ))
|
||||
return '';
|
||||
global $timedate;
|
||||
$return_array = array ();
|
||||
$return_array ['product_id'] = $position ['ecmproduct_id'];
|
||||
$return_array ['position'] = $position ['position'];
|
||||
$return_array ['product_code'] = $position ['code'];
|
||||
$return_array ['name'] = $position ['name'];
|
||||
$return_array ['quantity'] = $position ['quantity'];
|
||||
$return_array ['price_start'] = $position ['price_start'];
|
||||
$return_array ['price_netto'] = $position ['price_netto'];
|
||||
$return_array ['discount'] = $position ['discount'];
|
||||
$return_array ['total_netto'] = $position ['total_netto'];
|
||||
$return_array ['unit_id'] = $position ['dd_unit_id'];
|
||||
$return_array ['unit_name'] = $position ['dd_unit_name'];
|
||||
$return_array ['ecmvat_id'] = $position ['ecmvat_id'];
|
||||
$return_array ['ecmvat_name'] = $position ['ecmvat_name'];
|
||||
$return_array ['ecmvat_value'] = $position ['ecmvat_value'];
|
||||
$return_array ['recipient_code'] = $position ['recipient_code'];
|
||||
$return_array ['remarks'] = $position ['remarks'];
|
||||
$return_array['old_ecmagreementitem_id'] = $position['old_ecmagreementitem_id'];
|
||||
$return_array ['old_total_netto'] = $position ['old_total_netto'];
|
||||
$return_array ['old_total_brutto'] = $position ['old_total_brutto'];
|
||||
$return_array ['old_quantity'] = $position ['old_quantity'];
|
||||
$return_array ['old_total_vat'] = $position ['old_total_vat'];
|
||||
$return_array ['ecmagreementitem_id'] = $position ['ecmagreementitem_id'];
|
||||
$return_array ['total_vat']=$position['total_vat'];
|
||||
$return_array ['total_brutto']=$position['total_brutto'];
|
||||
|
||||
if ($type == "true") {
|
||||
$return_array ['product_item_id'] = $position ['id'];
|
||||
$return_array ['product_item'] = "true";
|
||||
// get values from previous corrects
|
||||
|
||||
$cc = $GLOBALS ['db']->fetchByAssoc ( $GLOBALS ['db']->query ( "SELECT ii.id,ii.price_start, ii.price_netto, ii.quantity, ii.discount,
|
||||
ii.ecmvat_value, ii.ecmvat_id, ii.ecmvat_name FROM ecmagreementitems as ii
|
||||
INNER JOIN ecmagreements AS i ON i.id=ii.ecmagreement_id WHERE i.canceled is null and ii.ecmagreementitem_id='" . $position ['id'] . "' ORDER BY ii.date_entered DESC LIMIT 0,1" ) );
|
||||
if ($cc ['price_netto']) {
|
||||
$return_array ['price_start'] = $cc ['price_start'];
|
||||
$return_array ['price_netto'] = $cc ['price_netto'];
|
||||
$return_array ['quantity'] = $cc ['quantity'];
|
||||
$return_array ['discount'] = $cc ['discount'];
|
||||
$return_array ['ecmvat_value'] = $cc ['ecmvat_value'];
|
||||
$return_array ['ecmvat_id'] = $cc ['ecmvat_id'];
|
||||
$return_array ['ecmvat_name'] = $cc ['ecmvat_name'];
|
||||
$return_array ['product_itemold_id'] = $cc ['id'];
|
||||
}
|
||||
} else {
|
||||
$return_array ['product_item_id'] = $position ['ecmagreementitem_id'];
|
||||
}
|
||||
|
||||
if ($type == "1") {
|
||||
$return_array ['product_item_id'] = $position ['id'];
|
||||
$return_array ['product_item'] = "false";
|
||||
// get values from previous corrects
|
||||
|
||||
$cc = $GLOBALS ['db']->fetchByAssoc ( $GLOBALS ['db']->query ( "SELECT ii.id,ii.price_start, ii.price_netto, ii.quantity, ii.discount,
|
||||
ii.ecmvat_value, ii.ecmvat_id, ii.ecmvat_name FROM ecmagreementitems as ii
|
||||
INNER JOIN ecmagreements AS i ON i.id=ii.ecmagreement_id WHERE i.canceled is null and ii.ecmagreementitem_id='" . $position ['id'] . "' ORDER BY ii.date_entered DESC LIMIT 0,1" ) );
|
||||
if ($cc ['price_netto']) {
|
||||
$return_array ['price_start'] = $cc ['price_start'];
|
||||
$return_array ['price_netto'] = $cc ['price_netto'];
|
||||
$return_array ['quantity'] = $cc ['quantity'];
|
||||
$return_array ['discount'] = $cc ['discount'];
|
||||
$return_array ['ecmvat_value'] = $cc ['ecmvat_value'];
|
||||
$return_array ['ecmvat_id'] = $cc ['ecmvat_id'];
|
||||
$return_array ['ecmvat_name'] = $cc ['ecmvat_name'];
|
||||
$return_array ['product_itemold_id'] = $cc ['id'];
|
||||
}
|
||||
} else {
|
||||
$return_array ['product_item_id'] = $position ['ecmagreementitem_id'];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $return_array;
|
||||
}
|
||||
|
||||
function getPosition($position,$type) {
|
||||
if (! is_array ( $position ))
|
||||
return '';
|
||||
global $timedate;
|
||||
$return_array = array ();
|
||||
$return_array ['position'] = $position ['position'];
|
||||
$return_array ['payment_date'] = $position ['payment_date'];
|
||||
$return_array ['saldo'] = $position ['saldo'];
|
||||
$return_array ['total'] = $position ['total'];
|
||||
$return_array ['interest_rate'] = $position ['interest_rate'];
|
||||
$return_array ['rate_of_commission'] = $position ['rate_of_commission'];
|
||||
$return_array ['principal_value'] = $position ['principal_value'];
|
||||
|
||||
return $return_array;
|
||||
}
|
||||
function getPositionList($array = false,$type = "no") {
|
||||
if (isset ( $this->id ) && $this->id != '') {
|
||||
$query = "SELECT * FROM `" . strtolower ( $this->object_name ) . "items` WHERE `" . strtolower ( $this->object_name ) . "_id`='" . $this->id . "' order by position asc";
|
||||
$r = $this->db->query ( $query );
|
||||
$return_array = array ();
|
||||
if ($r) {
|
||||
while ( $w = $this->db->fetchByAssoc ( $r ) ) {
|
||||
|
||||
$return_array [] = $this->getPosition ( $w,$type );
|
||||
|
||||
}
|
||||
$json = getJSONobj ();
|
||||
return $array ? $return_array : $json->encode ( $return_array );
|
||||
}
|
||||
}
|
||||
return $array ? false : '[]';
|
||||
}
|
||||
function deleteAssignedPositions() {
|
||||
if (isset ( $this->id ) && $this->id != '') {
|
||||
$query = "DELETE FROM `" . strtolower ( $this->object_name ) . "items` WHERE `" . strtolower ( $this->object_name ) . "_id`='" . $this->id . "'";
|
||||
$r = $this->db->query ( $query );
|
||||
if ($r)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
function formatPositions($position_list) {
|
||||
return;
|
||||
if (! is_array ( $position_list ) || count ( $position_list ) == 0)
|
||||
return false;
|
||||
global $app_list_strings;
|
||||
require_once ('modules/Currencies/Currency.php');
|
||||
foreach ( $position_list as $key => $value ) {
|
||||
$position_list [$key] ['unit_id'] = $app_list_strings ['ecmproducts_unit_dom'] [$value ['unit_id']];
|
||||
$position_list [$key] ['category_id'] = $app_list_strings ['ecmproducts_category_dom'] [$value ['category_id']];
|
||||
// $position_list[$key]['vat_id'] = format_number($value['vat_id']).'%';
|
||||
$position_list [$key] ['discount'] = format_number ( $value ['discount'] ) . '%';
|
||||
if (isset ( $currency ) && ($currency->id == $this->currency_id)) {
|
||||
} else {
|
||||
$currency = new Currency ();
|
||||
$currency->retrieve ( $this->currency_id );
|
||||
}
|
||||
$position_list [$key] ['price'] = format_number ( $value ['price'] ) . ' ' . $currency->iso4217;
|
||||
$position_list [$key] ['total'] = format_number ( $value ['total'] ) . ' ' . $currency->iso4217;
|
||||
// $position_list[$key]['price'] = format_number($value['price']).' PLN';
|
||||
// $position_list[$key]['total'] = format_number($value['total']).' PLN';
|
||||
$this->currency_symbol = $currency->iso4217;
|
||||
}
|
||||
return $position_list;
|
||||
}
|
||||
// ***************************End Managing Positions*************************//
|
||||
function ACLAccess($view, $is_owner = 'not_set') {
|
||||
global $current_user;
|
||||
$file = 'modules/EcmGroupSales/EcmGroupSale.php';
|
||||
if (file_exists ( $file )) {
|
||||
require_once ($file);
|
||||
$cc = EcmGroupSale::loadSettings ( true );
|
||||
} else
|
||||
return true;
|
||||
if (is_admin ( $current_user )) {
|
||||
switch ($view) {
|
||||
case 'confirming' :
|
||||
return ($this->status == "s20");
|
||||
case 'send_to_confirm' :
|
||||
return ($this->status == "s10");
|
||||
case 'pdf_toolbar' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if ($is_owner == 'not_set') {
|
||||
$is_owner = $this->isOwner ( $current_user->id );
|
||||
}
|
||||
// if we don't implent acls return true
|
||||
if (! $this->bean_implements ( 'ACL' ))
|
||||
return true;
|
||||
$view = strtolower ( $view );
|
||||
if ($cc ['user_manager_role']) { // Manager
|
||||
switch ($view) {
|
||||
case 'list' :
|
||||
case 'index' :
|
||||
case 'listview' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'list', true );
|
||||
case 'edit' :
|
||||
case 'save' :
|
||||
case 'popupeditview' :
|
||||
case 'editview' :
|
||||
return (ACLController::checkAccess ( $this->module_dir, 'edit', $is_owner ));
|
||||
case 'view' :
|
||||
case 'detail' :
|
||||
case 'detailview' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'view', $is_owner );
|
||||
case 'delete' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'delete', $is_owner );
|
||||
case 'export' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'export', $is_owner );
|
||||
case 'import' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'import', true );
|
||||
case 'send_to_confirm' :
|
||||
return ($this->status == "s10");
|
||||
case 'can_commit' :
|
||||
return true;
|
||||
case 'confirming' :
|
||||
return ($this->status == "s20");
|
||||
case 'auto_commiting' :
|
||||
return true;
|
||||
case 'pdf_toolbar' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40");
|
||||
}
|
||||
} else if ($cc ['user_representative_extra_role']) { // Representative Extra
|
||||
switch ($view) {
|
||||
case 'list' :
|
||||
case 'index' :
|
||||
case 'listview' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'list', true );
|
||||
case 'edit' :
|
||||
return (ACLController::checkAccess ( $this->module_dir, 'edit', $is_owner ) && ($this->status == "s10" || $this->status == "s40"));
|
||||
case 'save' :
|
||||
case 'popupeditview' :
|
||||
case 'editview' :
|
||||
return (ACLController::checkAccess ( $this->module_dir, 'edit', $is_owner ));
|
||||
case 'view' :
|
||||
case 'detail' :
|
||||
case 'detailview' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'view', $is_owner );
|
||||
case 'delete' :
|
||||
return (ACLController::checkAccess ( $this->module_dir, 'delete', $is_owner ) && $this->status == "s10");
|
||||
case 'export' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'export', $is_owner );
|
||||
case 'import' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'import', true );
|
||||
case 'quote_to_sale' :
|
||||
case 'quote_to_invoice' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40" && $this->status != "s60");
|
||||
case 'send_to_confirm' :
|
||||
return ($this->status == "s10");
|
||||
case 'send_email' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40");
|
||||
case 'can_commit' :
|
||||
return true;
|
||||
case 'confirming' :
|
||||
return false;
|
||||
case 'auto_commiting' :
|
||||
return true;
|
||||
case 'pdf_toolbar' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40");
|
||||
}
|
||||
} else if ($cc ['user_representative_role']) { // Representative
|
||||
switch ($view) {
|
||||
case 'list' :
|
||||
case 'index' :
|
||||
case 'listview' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'list', true );
|
||||
case 'edit' :
|
||||
return (ACLController::checkAccess ( $this->module_dir, 'edit', $is_owner ) && ($this->status == "s10" || $this->status == "s40"));
|
||||
case 'save' :
|
||||
case 'popupeditview' :
|
||||
case 'editview' :
|
||||
return (ACLController::checkAccess ( $this->module_dir, 'edit', $is_owner ));
|
||||
case 'view' :
|
||||
case 'detail' :
|
||||
case 'detailview' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'view', $is_owner );
|
||||
case 'delete' :
|
||||
return (ACLController::checkAccess ( $this->module_dir, 'delete', $is_owner ) && $this->status == "s10");
|
||||
case 'export' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'export', $is_owner );
|
||||
case 'import' :
|
||||
return ACLController::checkAccess ( $this->module_dir, 'import', true );
|
||||
case 'quote_to_sale' :
|
||||
case 'quote_to_invoice' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40" && $this->status != "s60");
|
||||
case 'send_to_confirm' :
|
||||
return ($this->status == "s10");
|
||||
case 'send_email' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40");
|
||||
case 'can_commit' :
|
||||
return false;
|
||||
case 'confirming' :
|
||||
return false;
|
||||
case 'auto_commiting' :
|
||||
return false;
|
||||
case 'pdf_toolbar' :
|
||||
return ($this->status != "s10" && $this->status != "s20" && $this->status != "s40");
|
||||
}
|
||||
}
|
||||
// if it is not one of the above views then it should be implemented on the page level
|
||||
return true;
|
||||
}
|
||||
|
||||
//mz generate number
|
||||
function generateNumber($stock_id) {
|
||||
$db = $GLOBALS['db'];
|
||||
$r = $db->fetchByAssoc($db->query("SELECT count(id) as c FROM ecmagreements WHERE deleted='0' AND YEAR(register_date)='".date('Y')."'"));
|
||||
|
||||
if (!$r || !$r['c'] || $r['c']=='')
|
||||
$count = 0;
|
||||
else
|
||||
$count = intval($r['c']);
|
||||
|
||||
$count++;
|
||||
|
||||
//has 5 digits?
|
||||
$tmp = strval($count);
|
||||
while (strlen($tmp) < 5)
|
||||
$tmp = '0'.$tmp;
|
||||
|
||||
return date("Ymd").$tmp;
|
||||
}
|
||||
function generateNumberCorrect() {
|
||||
$db = $GLOBALS['db'];
|
||||
$r = $db->fetchByAssoc($db->query("SELECT count(id) as c FROM ecmagreements WHERE deleted='0' AND YEAR(register_date)='".date('Y')."' and type='correct'"));
|
||||
|
||||
if (!$r || !$r['c'] || $r['c']=='')
|
||||
$count = 0;
|
||||
else
|
||||
$count = intval($r['c']);
|
||||
|
||||
$count++;
|
||||
|
||||
//has 5 digits?
|
||||
$tmp = strval($count);
|
||||
while (strlen($tmp) < 5)
|
||||
$tmp = '0'.$tmp;
|
||||
|
||||
return date("Ymd").$tmp;
|
||||
}
|
||||
function formatNumber($number,$stock_id) {
|
||||
$db = $GLOBALS['db'];
|
||||
$n = intval(substr($number, 8,5));
|
||||
$y = substr($number,0,4);
|
||||
|
||||
//has 3 digits?
|
||||
while (strlen($n) < 3)
|
||||
$n = '0'.$n;
|
||||
|
||||
return ''.$n.'/'.$y;
|
||||
}
|
||||
function formatNumberCorrect($number) {
|
||||
$n = intval(substr($number, 8,5));
|
||||
$y = substr($number,0,4);
|
||||
|
||||
//has 3 digits?
|
||||
while (strlen($n) < 3)
|
||||
$n = '0'.$n;
|
||||
|
||||
return 'FKKOR '.$n.'/'.$y;
|
||||
}
|
||||
|
||||
|
||||
public static function get_parse_fields_for_pdf(){
|
||||
global $mod_strings;
|
||||
$parser_fields = array(
|
||||
'document_no' => $mod_strings['LBL_DOCUMENT_NO'],
|
||||
'parent_name' => $mod_strings['LBL_PARENT_NAME'],
|
||||
'register_date' => $mod_strings['LBL_REGISTER_DATE'],
|
||||
'parent_address_street' => $mod_strings['LBL_PARENT_ADDRESS_STREET'],
|
||||
'parent_address_city' => $mod_strings['LBL_PARENT_ADDRESS_CITY_SS'],
|
||||
'parent_address_postalcode' => $mod_strings['LBL_PARENT_ADDRESS_POSTALCODE'],
|
||||
'parent_address_country' => $mod_strings['LBL_PARENT_ADDRESS_COUNTRY'],
|
||||
'parent_nip' => $mod_strings['LBL_PARENT_NIP'],
|
||||
'parent_regon' => $mod_strings['LBL_PARENT_REGON'],
|
||||
'number_of_installments' => $mod_strings['LBL_NUMBER_OF_INSTALLMENTS'],
|
||||
'date_end' => $mod_strings['LBL_DATE_END'],
|
||||
'pagebreak' => 'Wstaw stronę PDF',
|
||||
);
|
||||
|
||||
return $parser_fields;
|
||||
}
|
||||
}
|
||||
?>
|
||||
130
modules/EcmAgreements/EditView.php
Executable file
130
modules/EcmAgreements/EditView.php
Executable file
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'NotAValidEntryPoint' );
|
||||
|
||||
global $sugar_version, $sugar_config, $current_user, $app_strings, $mod_strings, $current_user, $app_list_strings;
|
||||
require_once ('modules/EcmAgreements/EcmAgreement.php');
|
||||
require_once ('include/time.php');
|
||||
|
||||
// $cq=$current_user->getPreference('confirm_quotes');
|
||||
|
||||
$new_number = false;
|
||||
$is_correct=false;
|
||||
$is_wz=false;
|
||||
$duplicate = false;
|
||||
$focus = new EcmAgreement ();
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
if (isset ( $_REQUEST ['record'] ) && $_REQUEST['isDuplicate']=="false" ) {
|
||||
|
||||
$focus->retrieve ( $_REQUEST ['record'] );
|
||||
|
||||
if (isset ( $focus->id ) && $focus->id != '') {
|
||||
$focus->format_all_fields ();
|
||||
}
|
||||
}
|
||||
else if ($_REQUEST['isDuplicate']=="true") {
|
||||
$new_number=true;
|
||||
$duplicate=true;
|
||||
//get data
|
||||
$focus->retrieve($_REQUEST['return_id']);
|
||||
$focus->register_date = date("d.m.Y");
|
||||
$focus->sell_date = date("d.m.Y");
|
||||
$focus->validtill_date = date("d.m.Y");
|
||||
}
|
||||
else if ($_REQUEST['isCorrect']=="true") {
|
||||
$new_number=true;
|
||||
$is_correct=true;
|
||||
//get data
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
|
||||
if (isset ( $focus->id ) && $focus->id != '') {
|
||||
$focus->format_all_fields ();
|
||||
}
|
||||
$focus->register_date = date("d.m.Y");
|
||||
$focus->sell_date = date("d.m.Y");
|
||||
$focus->validtill_date = date("d.m.Y");
|
||||
$focus->type='correct';
|
||||
}else if ($_REQUEST['isWZ']=="true") {
|
||||
$new_number=true;
|
||||
$is_wz=true;
|
||||
//get data
|
||||
$wz= New EcmStockDocOut;
|
||||
$wz->retrieve($_REQUEST['record']);
|
||||
$wz_id=$_REQUEST['record'];
|
||||
$so_id=$wz->so_id;
|
||||
$wz_name=$wz->document_no;
|
||||
// load from wz
|
||||
$focus->parent_id=$wz->parent_id;
|
||||
$focus->parent_name=$wz->parent_name;
|
||||
$focus->order_no=$wz->order_no;
|
||||
//dates
|
||||
$focus->stock_id=$wz->stock_id;
|
||||
$focus->stock_name=$wz->stock_name;
|
||||
$focus->register_date = date("d.m.Y");
|
||||
$focus->sell_date =$wz->register_date;
|
||||
$focus->validtill_date = date("d.m.Y");
|
||||
} else {
|
||||
$new_number=true;
|
||||
//dates
|
||||
|
||||
$focus->register_date = date("d.m.Y");
|
||||
$focus->sell_date = date("d.m.Y");
|
||||
$focus->validtill_date = date("d.m.Y");
|
||||
//for subpanels??
|
||||
if (isset ( $_REQUEST ['contact_id'] ) && $_REQUEST ['contact_id'] != '' && isset ( $_REQUEST ['contact_name'] ) && $_REQUEST ['contact_name'] != '') {
|
||||
$_REQUEST ['parent_type'] = 'Contacts';
|
||||
$_REQUEST ['parent_name'] = $_REQUEST ['contact_name'];
|
||||
$_REQUEST ['parent_id'] = $_REQUEST ['contact_id'];
|
||||
$OPT ['check_parent_id'] = false;
|
||||
}
|
||||
|
||||
if (isset ( $_REQUEST ['account_id'] ) && $_REQUEST ['account_id'] != '' && isset ( $_REQUEST ['account_name'] ) && $_REQUEST ['account_name'] != '') {
|
||||
$_REQUEST ['parent_type'] = 'Accounts';
|
||||
$_REQUEST ['parent_name'] = $_REQUEST ['account_name'];
|
||||
$_REQUEST ['parent_id'] = $_REQUEST ['account_id'];
|
||||
$OPT ['check_parent_id'] = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$res = $db->query("SELECT id, name FROM ecmstocks WHERE deleted = '0' ORDER BY name");
|
||||
$stock = '<select id="stock" name="stock"><option value=""></option>';
|
||||
$stock_body = '';
|
||||
while ($row = $db->fetchByAssoc($res)){
|
||||
if($focus->stock_id!='' && $row['id']==$focus->stock_id){$s='selected';} else { $s='';}
|
||||
$stock_body.='<option value="'.$row['id'].'" '.$s.'>'.$row['name'].'</option>';
|
||||
}
|
||||
$stock.=$stock_body.'</select><input id="stock_id" name="stock_id" type="hidden" value="'.$focus->stock_id.'"/>';
|
||||
|
||||
|
||||
|
||||
require_once ('include/MVC/View/SugarView.php');
|
||||
|
||||
require_once ('modules/EcmAgreements/views/EditView/view.edit.ecmagreements.php');
|
||||
|
||||
$edit = new ViewEditEcmAgreements ();
|
||||
|
||||
$edit->ss = new Sugar_Smarty ();
|
||||
|
||||
$edit->module = 'EcmAgreements';
|
||||
$edit->bean = $focus;
|
||||
$edit->tplFile = 'include/ECM/EcmViews/EditView/Tabs/EditView.tpl';
|
||||
$edit->preDisplay ();
|
||||
|
||||
$edit->ss->assign ( "NEW_NUMBER", $new_number );
|
||||
$edit->ss->assign ( "IS_CORRECT", $is_correct);
|
||||
$edit->ss->assign ( "IS_WZ", $is_wz);
|
||||
$edit->ss->assign ( "WZ_ID", $wz_id);
|
||||
$edit->ss->assign ( "WZ_NAME", $wz_name);
|
||||
$edit->ss->assign ( "SO_ID", $so_id);
|
||||
$edit->ss->assign("DUPLICATE", $duplicate);
|
||||
$edit->ss->assign("STOCK", $stock);
|
||||
$edit->ss->assign("pdf_template_selected", $focus->pdf_template);
|
||||
|
||||
echo $edit->display ();
|
||||
//loading view
|
||||
echo '<link rel="stylesheet" type="text/css" href="modules/EcmAgreements/javascript/helper.css" media="screen" /><div class="loading_panel"></div>';
|
||||
0
modules/EcmAgreements/LoadFromEcmNewStockDocOuts.php
Executable file
0
modules/EcmAgreements/LoadFromEcmNewStockDocOuts.php
Executable file
13
modules/EcmAgreements/Menu.php
Executable file
13
modules/EcmAgreements/Menu.php
Executable file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
|
||||
global $mod_strings, $current_user;
|
||||
|
||||
if(ACLController::checkAccess('EcmAgreements', "edit", true)) $module_menu [] = Array("index.php?module=".'EcmAgreements'."&action=EditView&return_module=".'EcmAgreements'."&return_action=DetailView", translate('LNK_NEW_'.'ECMQUOTE', 'EcmAgreements'),"CreateEcmAgreements", 'EcmAgreements');
|
||||
|
||||
if(ACLController::checkAccess('EcmAgreements', "list", true)) $module_menu [] = Array("index.php?module=EcmAgreements&action=index&return_module=EcmAgreements&return_action=DetailView", translate('LNK_ECMQUOTES_LIST','EcmAgreements'),"EcmAgreements", 'EcmAgreements');
|
||||
if(ACLController::checkAccess('EcmAgreements', "list", true)) $module_menu [] = Array("index.php?module=EcmAgreements&action=AgreementTemplates", 'Edytor Szablonów',"EcmAgreements", 'Umowy');
|
||||
?>
|
||||
|
||||
223
modules/EcmAgreements/ModuleFieldsParser/ModuleFieldsParser.php
Executable file
223
modules/EcmAgreements/ModuleFieldsParser/ModuleFieldsParser.php
Executable file
@@ -0,0 +1,223 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
class ModuleFieldsParser {
|
||||
|
||||
|
||||
|
||||
var $modules;
|
||||
|
||||
var $name;
|
||||
|
||||
|
||||
|
||||
function ModuleFieldsParser($name = 'mfp') {
|
||||
|
||||
$this->modules = Array();
|
||||
|
||||
if(file_exists('modules/EcmAgreements/ModuleFieldsParser/config.php')) {
|
||||
|
||||
require_once('modules/EcmAgreements/ModuleFieldsParser/config.php');
|
||||
|
||||
$this->modules = $mfp_modules;
|
||||
|
||||
}
|
||||
|
||||
$this->name = $name;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getModulesSelectOptions($fieldRealNames = false) {
|
||||
|
||||
global $app_list_strings;
|
||||
|
||||
$arr = array();
|
||||
|
||||
if(count($this->modules)>0) {
|
||||
|
||||
foreach($this->modules as $key => $value) {
|
||||
|
||||
if(isset($value['name']) && $value['name'] != '')
|
||||
|
||||
if(isset($app_list_strings['moduleList'][$value['name']]) && $app_list_strings['moduleList'][$value['name']] != '')
|
||||
|
||||
$value['name'] = $app_list_strings['moduleList'][$value['name']];
|
||||
|
||||
$arr[$key]['name'] = $value['name'];
|
||||
|
||||
$arr[$key]['fields'] = $this->getModuleFieldsSelectOptions($key,$fieldRealNames);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $arr;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getModuleFieldsSelectOptions($module,$fieldRealNames = false) {
|
||||
|
||||
global $beanList, $current_language, $GLOBALS;
|
||||
|
||||
$dict = null;
|
||||
|
||||
$file = 'cache/modules/'.$module.'/'.$beanList[$module].'vardefs.php';
|
||||
|
||||
if(file_exists($file)) {
|
||||
|
||||
include($file);
|
||||
|
||||
$dict = $GLOBALS['dictionary'][$beanList[$module]]['fields'];
|
||||
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
$file = 'modules/'.$module.'/vardefs.php';
|
||||
|
||||
if(file_exists($file)) { include($file); $dict = $dictionary[$beanList[$module]]['fields']; }
|
||||
|
||||
}
|
||||
|
||||
if($dict) {
|
||||
|
||||
$mod = return_module_language($current_language, $module);
|
||||
|
||||
$arr = array();
|
||||
|
||||
foreach($dict as $key => $value) {
|
||||
|
||||
$tmp = '$'.$this->modules[$module]['prefix'].$value['name'];
|
||||
|
||||
if(!$fieldRealNames)
|
||||
|
||||
$arr[$tmp] = ((isset($mod[$value['vname']]) && $mod[$value['vname']] != '') ? $mod[$value['vname']] : $value['name']);
|
||||
|
||||
else
|
||||
|
||||
$arr[$tmp] = $value['name'];
|
||||
|
||||
}
|
||||
|
||||
return $arr;
|
||||
|
||||
}
|
||||
|
||||
return array();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getJS() {
|
||||
|
||||
$json = getJSONobj();
|
||||
|
||||
$js = '<script language="javascript">';
|
||||
|
||||
$js .= 'var '.$this->name.'_data = '.$json->encode($this->getModulesSelectOptions()).';';
|
||||
|
||||
$js .= 'function '.$this->name.'_loadModules() { var ms = document.getElementById("'.$this->name.'_module"); for(x in '.$this->name.'_data) { ms.options[ms.options.length] = new Option('.$this->name.'_data[x]["name"],x,false); }; }';
|
||||
|
||||
$js .= 'function '.$this->name.'_loadFields() { var ms = document.getElementById("'.$this->name.'_module"); var fs = document.getElementById("'.$this->name.'_fields"); while(fs.options.length>0) fs.remove(0); var fields = '.$this->name.'_data[ms.value]["fields"]; for(x in fields) fs.options[fs.options.length] = new Option(fields[x],x,false); fs.onchange(); };';
|
||||
|
||||
$js .= 'function '.$this->name.'_loadField() { var fs = document.getElementById("'.$this->name.'_fields"); var fe = document.getElementById("'.$this->name.'_field"); fe.value = fs.value; };';
|
||||
|
||||
$js .= $this->name.'_loadModules(); '.$this->name.'_loadFields(); '.$this->name.'_loadField();';
|
||||
|
||||
$js .= '</script>';
|
||||
|
||||
return $js;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function getFormHTML($smarty = false, $name = '') {
|
||||
|
||||
if($name != '') $this->name = $name;
|
||||
|
||||
$html = '
|
||||
|
||||
<span>
|
||||
|
||||
<select id="'.$this->name.'_module" name="'.$this->name.'_module" onChange="'.$this->name.'_loadFields();"></select>
|
||||
|
||||
<select id="'.$this->name.'_fields" name="'.$this->name.'_fields" onChange="'.$this->name.'_loadField()"></select>
|
||||
|
||||
<input id="'.$this->name.'_field" name="'.$this->name.'_field" value="" size="40">'
|
||||
|
||||
.($smarty ? '{literal}' : '').$this->getJS().($smarty ? '{/literal}' : '').
|
||||
|
||||
'</span>';
|
||||
|
||||
return $html;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function fillFocusToModules() {
|
||||
|
||||
foreach($this->modules as $key => $value) {
|
||||
|
||||
if((!isset($value['focus']) || $value['focus'] == '') && (isset($value['id']) && $value['id'] != '')) {
|
||||
|
||||
global $beanFiles, $beanList;
|
||||
|
||||
$path = $beanFiles[$beanList[$key]];
|
||||
|
||||
if(file_exists($path)) {
|
||||
|
||||
require_once($path);
|
||||
|
||||
$this->modules[$key]['focus'] = new $beanList[$key]();
|
||||
|
||||
$this->modules[$key]['focus']->format_all_fields();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function parseText($text) {
|
||||
|
||||
$this->fillFocusToModules();
|
||||
|
||||
$temp = $this->getModulesSelectOptions(true);
|
||||
|
||||
foreach($this->modules as $module => $arr) {
|
||||
|
||||
if(isset($arr['focus']) && $arr['focus']!='') {
|
||||
|
||||
foreach($temp[$module]['fields'] as $field => $value) {
|
||||
|
||||
//$text = str_replace($field,((isset($this->modules[$module]['focus']->$value) && $this->modules[$module]['focus']->$value != '')?$this->modules[$module]['focus']->$value:''),$text);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $text;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
?>
|
||||
75
modules/EcmAgreements/ModuleFieldsParser/config.php
Executable file
75
modules/EcmAgreements/ModuleFieldsParser/config.php
Executable file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
global $app_list_strings;
|
||||
|
||||
|
||||
|
||||
$mfp_modules = Array(
|
||||
|
||||
'EcmAgreements' => array(
|
||||
|
||||
'name' => $app_list_strings['moduleList']['EcmAgreements'],
|
||||
|
||||
'prefix' => 'off_',
|
||||
|
||||
'id' => '',
|
||||
|
||||
'focus' => ''
|
||||
|
||||
),
|
||||
|
||||
'EcmDocumentTemplates' => array(
|
||||
|
||||
'name' => $app_list_strings['moduleList']['EcmDocumentTemplates'],
|
||||
|
||||
'prefix' => 'dt_',
|
||||
|
||||
'id' => '',
|
||||
|
||||
'focus' => ''
|
||||
|
||||
),
|
||||
|
||||
'Accounts' => array(
|
||||
|
||||
'name' => $app_list_strings['moduleList']['Accounts'],
|
||||
|
||||
'prefix' => 'acc_',
|
||||
|
||||
'id' => '',
|
||||
|
||||
'focus' => ''
|
||||
|
||||
),
|
||||
|
||||
'Contacts' => array(
|
||||
|
||||
'name' => $app_list_strings['moduleList']['Contacts'],
|
||||
|
||||
'prefix' => 'con_',
|
||||
|
||||
'id' => '',
|
||||
|
||||
'focus' => ''
|
||||
|
||||
),
|
||||
|
||||
'Users' => array(
|
||||
|
||||
'name' => $app_list_strings['moduleList']['Users'],
|
||||
|
||||
'prefix' => 'us_',
|
||||
|
||||
'id' => '',
|
||||
|
||||
'focus' => ''
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
571
modules/EcmAgreements/PDFTemplate/agreement_content.php
Executable file
571
modules/EcmAgreements/PDFTemplate/agreement_content.php
Executable file
@@ -0,0 +1,571 @@
|
||||
<?php
|
||||
include_once ("modules/kwota.php");
|
||||
$kwota=new KwotaSlownie();
|
||||
$content='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 12pt;">'.$focus->document_no.'</p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 9pt;color: red;">
|
||||
zawarta w dniu '.date('d.m.Y',strtotime($focus->register_date)).' r. pomiędzy: </p>';
|
||||
|
||||
// reprezentowany przez ...
|
||||
if($focus->contact_id!=''){
|
||||
$c=new Contact();
|
||||
$c->retrieve($focus->contact_id);
|
||||
$rep=', reprezentowana przez '.$focus->contact_position.' - '.$c->first_name.' '.$c->last_name;
|
||||
}
|
||||
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 10pt;">
|
||||
1.<b>BILANS</b> B.Pietras, E.Pietras Spółka Jawna, Zławieś Mała, ul. Przemysłowa 3, 87-134 Zławieś Wielka, NIP 879-267-48-75, REGON 341614815, reprezentowana przez Wspólnika- Bogdana Pietrasa, zwanym dalej
|
||||
<br><b>Pożyczkodawcą</b><br>a<br><span style="color: red;">2. '.$focus->parent_name.', '.$focus->parent_address_street.', '.$focus->parent_address_postalcode. '
|
||||
'.$focus->parent_address_city.', NIP '.$focus->parent_nip.', REGON '.$focus->parent_regon.''.$rep.'</span></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 10pt;"><span style="color: red;">,</span> zwany dalej Pożyczkobiorcą.</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;"><br>o następującej treści</p>';
|
||||
// dział 1
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ I - PRZEDMIOT POŻYCZKI </b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§1</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. Przedmiotem niniejszej umowy pożyczki jest kwota <span style="color:red;">
|
||||
'.number_format ($focus->total_principal_value,2,',','.').' zł (słownie: '.$kwota->convertPrice($focus->total_principal_value).')</span></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. Przedmiot pożyczki został przekazany Pożyczkobiorcy w następujący sposób:<br>';
|
||||
$ar=$focus->getWithdraw(true);
|
||||
foreach ( $ar as $key=>$v){
|
||||
if($ar[$key]['forma']==1)
|
||||
$content.='<span style="color:red;">Kwota
|
||||
'.number_format ($ar[$key]['amount'],2,',','.').' zł (słownie: '.$kwota->convertPrice($ar[$key]['amount']).') - wypłata gotówką w dniu '.date('d.m.Y',strtotime($ar[$key]['payment_date'])).' rok</span><br>';
|
||||
if($ar[$key]['forma']==2)
|
||||
$content.='<span style="color:red;">Kwota
|
||||
'.number_format ($ar[$key]['amount'],2,',','.').' zł (słownie: '.$kwota->convertPrice($ar[$key]['amount']).') - wypłata przelewem w dniu '.date('d.m.Y',strtotime($ar[$key]['payment_date'])).' r na konto nr '.$ar[$key]['nr_account'].'</span><br>';
|
||||
}
|
||||
|
||||
$content.='</p><p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§2</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. Pożyczkobiorca oświadcza, że posiada odpowiednie dochody umożliwiające terminowe regulowanie
|
||||
zobowiązań wobec Pożyczkodawcy oraz majątek pozwalający na spłatę przedmiotu pożyczki w terminie
|
||||
określonym w § 3 ust. 2. Pożyczkobiorca oświadcza ponadto, że nie znajduje się w sytuacji przymusowej
|
||||
w rozumieniu przepisów kodeksu cywilnego. </p>';
|
||||
|
||||
//dział 2
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ II - TERMIN SPŁATY</b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§3</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. Strony zgodnie oświadczają, iż umowa zawarta jest na <span style="color:red;">'.$focus->number_of_installments.' miesięcy</span>, a przedmiot pożyczki zostanie zwrócony
|
||||
w dowolnych ratach i dowolnym terminie z zastrzeżeniem postanowień niniejszego paragrafu
|
||||
oraz działu V oraz VIII umowy. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. Terminem spłaty pożyczki jest <span style="color:red;">'.date('d.m.Y',strtotime($focus->date_end)).'</span> Termin ten może być przedłużony, zgodnie z treścią § 14.</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. Przedmiot pożyczki może zostać zwrócony przed terminem wyznaczonym w ust. 2.</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">4. O terminie oraz wysokości spłacanego kapitału przed ostatecznym terminem spłaty określonym w ust. 2
|
||||
powyżej, Pożyczkobiorca ma obowiązek powiadomić pisemnie Pożyczkodawcę z zachowaniem
|
||||
l-miesięcznego terminu wypowiedzenia. Pożyczkobiorca spłaca zadeklarowaną ratę do końca następnego
|
||||
miesiąca następującego po miesiącu, w którym miało miejsce wypowiedzenie, a umowa wygasa w części,
|
||||
w jakiej pożyczka została spłacona. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">5. <span style="color:red;">'.$focus->a2_5.'</span> </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">6. Pożyczkobiorca ma prawo zwrócić przedmiot pożyczki w całości lub w części przed upływem okresu,
|
||||
na który umowa została zawarta, w dowolnym terminie z zastrzeżeniem postanowień niniejszego
|
||||
paragrafu. W sytuacji, gdy Pożyczkobiorca zwróci przedmiot pożyczki w całości lub w części przed
|
||||
upływem 14 dni od daty zawarcia niniejszej umowy i otrzymania środków, Pożyczkodawca nie naliczy
|
||||
odsetek od kwoty, która została zwrócona (umowne prawo zwrotu). W takim wypadku nie stosuje się
|
||||
również ust.4 powyżej. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">7. Pożyczkodawca ma prawo odstąpienia od niniejszej umowy w ciągu 7 dni od jej podpisania. </p>';
|
||||
|
||||
// dział III
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ III - PROWIZJA </b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§4</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. <span style="color:red;">Za udzielenie pożyczki i podpisanie umowy,
|
||||
Pożyczkodawcy przysługuje prowizja w wysokości '.number_format ($focus->total_rate_of_commission,2,',','.').' zł (słownie: '.$kwota->convertPrice($focus->total_rate_of_commission).') Harmonogram spłat prowizji, stanowi załącznik nr 3 do umowy.</span></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. W przypadku przedłużenia tej umowy na okres następnych '.$focus->rate.' miesięcy, z zastrzeżeniem postanowień,
|
||||
o których mowa w § 11 ust. umowy, Pożyczkodawcy przysługuje prowizja w wysokości '.round($focus->rate_of_commission*$focus->rate,2).'% ( słownie: siedem 2/100 procent) od kwoty kapitału przedmiotu Umowy pozostałej do spłaty.</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. Prowizja, o której mowa w ust. l stanowi między innymi zryczałtowane wynagrodzenie Pożyczkodawcy
|
||||
obejmujące wszelkie czynności związane z podpisaniem umowy pożyczki, przedłużeniem ( przedłużaniem)
|
||||
umowy i utrzymaniem bieżącego kontaktu z klientem, a w szczególności ocenę zdolności Pożyczkobiorcy do terminowej spłaty pożyczki, ocenę wiarygodności prawnej, weryfikację danych osobowych, dokonanie
|
||||
wyceny przedmiotu zabezpieczenia przy zawieraniu umowy pożyczki, jak i przy każdorazowym
|
||||
jej przedłużaniu (aktualizację wyceny przedmiotu zabezpieczenia, np. wskutek zmiany koniunktury itp.),
|
||||
koszty oględzin, wizyt, porad i opinii prawnych itp. Prowizja, o której mowa w ust. 1 dotyczy również
|
||||
obsługi i realizacji umowy, między innymi: informowania o terminach, udzielania wyjaśnień i innych
|
||||
informacji dotyczących realizacji umowy, itp. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">4. Wyszczególnienie, o którym mowa powyżej nie obejmuje kosztów związanych z ustanowieniem
|
||||
zabezpieczenia (zgodnie z § 7 umowy) i innych wynikających z niniejszej umowy lub przepisów prawa. </p>';
|
||||
$kwota->setCurrency( array(
|
||||
'', '', ''
|
||||
),
|
||||
array(
|
||||
'', '', ''
|
||||
));
|
||||
// dział IV odsetki
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ IV - ODSETKI </b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§5</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. <span style="color:red;">Pożyczkodawcy przysługują odsetki umowne w wysokości '.number_format ($focus->interest_rate,2,',','.').' % od kwoty udzielonej pożyczki
|
||||
(słownie: '.$kwota->convertPrice($focus->interest_rate).') w stosunku miesięcznym (niezależnie od ilości dni w miesiącu) od dnia wydania przedmiotu pożyczki do dnia jego zwrotu -
|
||||
zgodnie z treścią § 3. Przyjmuje się, że miesiąc rozrachunkowy ma 30 dni.</span></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. <span style="color:red;">Odsetki, o których mowa w ust. l, zwane ratą odsetkową, będą płatne co miesiąc. Harmonogram spłaty odsetek, stanowi załącznik nr 3 do umowy.</span> </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. Ewentualne inne należności, które zgodnie z treścią umowy zobowiązany będzie uiścić Pożyczkobiorca, będą płatne przelewem.</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">4. Odsetki, o których mowa w ust. 1 stanowią wynagrodzenie tylko i wyłącznie za korzystanie ze środków
|
||||
finansowych przekazanych Pożyczkobiorcy przez Pożyczkodawcę. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">5. W przypadku, kiedy przedmiot pożyczki lub jego część zostaną zwrócone przez Pożyczkobiorcę w trakcie
|
||||
trwania miesiąca kalendarzowego, odsetki, o których mowa w ust. l i 2, naliczone zostaną za pełen miesiąc
|
||||
tak, jakby spłata przedmiotu pożyczki nastąpiła w ostatnim dniu miesiąca. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">6. Odsetki, o których mowa w ust. 1 i 2 będą naliczane w pierwszym dniu miesiąca za dany miesiąc. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">7. Odsetki, o których mowa w ust. 1 i 2 będą naliczane przez cały okres obowiązywania umowy,
|
||||
z zastrzeżeniem § 11 ust. 6, 7 i 8. W przypadku wcześniejszej spłaty całości lub części pożyczki
|
||||
na zasadach określonych w § 3, do naliczenia odsetek przyjmuje się, że wpłata nastąpiła w ostatnim dniu
|
||||
miesiąca obowiązywania umowy, za wyjątkiem sytuacji opisanej w § 3 ust. 6, tzn. miesiąc
|
||||
po wypowiedzeniu umowy lub z upływem terminu, na który została zawarta. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">8. Naliczanie odsetek, o których mowa w ust. 1 i 2 zostaje wstrzymane w sytuacji zaistnienia przesłanek
|
||||
do naliczenia odsetek karnych, zgodnie z § 11 ust. 6 i 7. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">9. W przypadku wszczęcia postępowania windykacyjnego Pożyczkodawca ma prawo zawiesić naliczanie
|
||||
odsetek karnych, opłat windykacyjnych, kar umownych i innych opłat wynikających z niniejszej umowy.
|
||||
Wszystkie zawieszone opłaty mogą zostać odwieszone i ponownie naliczone w dowolnym czasie,
|
||||
nie później jednak niż, w ciągu 2 miesięcy od zakończenia postępowania windykacyjnego. </p>';
|
||||
|
||||
//dział piąty
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ V - NIEDOTRZYMANIE WARUNKÓW UMOWY </b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§6</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. W razie opóźniania się przez Pożyczkobiorcę w całości albo w części z zapłatą raty odsetkowej,
|
||||
o której mowa w § 5 ust. 1 lub spłaty pożyczki, o której mowa w § 3 ust. 5 (minimalna rata kapitałowa),
|
||||
a także wszelkich innych należności wynikających lub związanych z niniejszą umową przez co najmniej
|
||||
20 dni kalendarzowych, Pożyczkodawca ma prawo postawienia pożyczki w <b>stan natychmiastowej wymagalności.</b>
|
||||
Postawienie pożyczki w stan natychmiastowej wymagalności oznacza, że Pożyczkobiorca ma obowiązek
|
||||
natychmiastowego zwrotu przedmiotu pożyczki, wraz z naliczonymi odsetkami oraz ze wszystkimi dodatkowymi opłatami wynikającymi
|
||||
z niniejszej umowy. O postawieniu pożyczki w stan natychmiastowej wymagalności Pożyczkodawca informuje Pożyczkobiorcę listem poleconym, ewentualnie faxem lub e-mailem zawierającym żądanie zwrotu pożyczki w związku z postawieniem jej w stan natychmiastowej wymagalności. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. W przypadku, gdy Pożyczkobiorca nie ureguluje swoich zaległości w terminie 10 dni od daty postawienia
|
||||
pożyczki w stan natychmiastowej wymagalności, o którym mowa w ust. l lub, gdy przedmiot pożyczki stał
|
||||
się natychmiast wymagalny stosownie do treści ust. 3, Pożyczkodawca <b>ma prawo wszczęcia postępowania
|
||||
windykacyjnego</b>, o którym mowa w dziale VIII umowy. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. Należność z tytułu umowy pożyczki <b>automatycznie staje się natychmiast wymagalna</b>, gdy: </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">a) Pożyczkobiorca opóźnia się w całości albo w części z zapłatą trzech rat odsetkowych, o których mowa
|
||||
w § 5 ust. 1,</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">b) Pożyczkobiorca opóźnia się w całości albo w części z zapłatą trzech rat kapitałowych pożyczki,
|
||||
o których mowa w § 3 ust. 5 (minimalna rata kapitałowa), </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">c) Pożyczkobiorca nie spłaca przedmiotu pożyczki, w całości lub w części, pierwszego dnia po upływie
|
||||
okresu wypowiedzenia, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">d) Pożyczkobiorca nie spłaca przedmiotu pożyczki, w całości lub w części, pomimo upływu terminu
|
||||
wskazanego w § 3 ust. 2 umowy, z zastrzeżeniem § 15. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">e) Pożyczkobiorca nie spłaca jakichkolwiek należności wynikających lub związanych z niniejszą umową,
|
||||
pomimo upływu 30-dniowego terminu wskazanego przez Pożyczkodawcę w wezwaniu do zapłaty tych
|
||||
należności, chyba że inny termin został wyznaczony w w/w wezwaniu (nie dotyczy sytuacji opisanych w
|
||||
pkt. a i b niniejszego ustępu oraz kar umownych) </p>';
|
||||
|
||||
//dział 6
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ VI- ZABEZPIECZENIA </b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§7</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. <span style="color:red;">'.$focus->a7_1.'</span></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. W przypadku wszczęcia postępowania windykacyjnego, o którym mowa w dziale VIII niniejszej umowy,
|
||||
Pożyczkodawca może żądać od Pożyczkobiorcy zwiększenia zabezpieczenia o minimum 50% wartości
|
||||
dotychczasowego zabezpieczenia określonego w zał. nr l do umowy Dodatkowym zabezpieczeniem może
|
||||
być: </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;"> * obciążenie wolnej od obciążeń, innej niż do tej pory ruchomości lub nieruchomości </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;"> * przewłaszczenie wolnej od obciążeń innej niż do tej pory ruchomości lub nieruchomości </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;"> * dodatkowa kaucja </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;"> * inne zabezpieczenie zaakceptowane przez Pożyczkodawcę </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. Pożyczkobiorca ma obowiązek zwiększenia zabezpieczenia w terminie 28 dni od wystąpienia Pożyczkodawcy z żądaniem, o którym mowa w niniejszym ustępie. W przypadku braku ustanowienia dodatkowego zabezpieczenia w w/w terminie lub ustanowienia dodatkowego zabezpieczenia w wysokości mniejszej niż wymagana w w/w terminie, Pożyczkodawcy przysługuje prawo naliczania kary umownej w wysokości 2,5% wartości nieustanowionego zabezpieczenia za brak zwiększenia zabezpieczenia. Żądanie, o którym mowa w niniejszym ustępie może być ponawiane w toku prowadzenia postępowania windykacyjnego</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">4. Pożyczkobiorca powiadomi Pożyczkodawcę o: </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">* każdej zaciągniętej pożyczce lub kredycie </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">* o odrzuceniu, oddaleniu lub zwrocie wniosku o wpis prawa lub praw w Księdze wieczystej prowadzonej
|
||||
dla nieruchomości opisanej w załączniku </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">* o pogorszeniu się jego sytuacji majątkowej, w szczególności o toczącym się przeciwko niemu postępowaniu
|
||||
sądowym, upadłościowym, likwidacyjnym, skarbowym, kamo-skarbowym, postępowaniu egzekucyjnym
|
||||
( egzekucja komornicza) lub postępowaniu egzekucyjnym w administracji </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">* o pogorszeniu się sytuacji majątkowej podmiotu dającego zabezpieczenie umowy pożyczki,
|
||||
w szczególności właściciela nieruchomości lub ruchomości będącej przedmiotem zabezpieczenia,
|
||||
poręczyciela, przystępującego do długu, w szczególności o toczącym się przeciwko niemu postępowaniu
|
||||
sądowym, upadłościowym, likwidacyjnym, skarbowym, kamo-skarbowym, postępowaniu egzekucyjnym
|
||||
(egzekucja komornicza) lub postępowaniu egzekucyjnym w administracji </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">* każdej rozpoczętej oraz toczącej się kontroli skarbowej </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">5. W przypadku skorzystania przez Pożyczkodawcę z ustanowionych zabezpieczeń, w szczególności,
|
||||
polegających na sprzedaży rzeczy, Pożyczkobiorca ponosi wszystkie udokumentowane koszty Pożyczkodawcy związane z realizacją zabezpieczenia, w szczególności koszty prowizji pośrednika
|
||||
przy sprzedaży nieruchomości, koszty sporządzenia aktu notarialnego, koszty sprzedaży ruchomości,
|
||||
wyceny, utrzymania nieruchomości i inne. </p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§8</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. Pożyczkobiorca może spłacić wszystkie należności z umowy pożyczki i domagać się zwrotnego
|
||||
przeniesienia własności przedmiotu zabezpieczenia aż do momentu zawarcia przez Pożyczkodawcę umowy
|
||||
sprzedaży przedmiotu zabezpieczenia ( w tym umowy przedwstępnej sprzedaży ). Samo wszczęcie
|
||||
postępowania windykacyjnego nie powoduje utraty roszczenia o zwrotne przeniesienie własności przedmiotu
|
||||
zabezpieczenia. Po zawarciu umowy sprzedaży przedmiotu zabezpieczenia ( w tym umowy przedwstępnej
|
||||
sprzedaży) roszczenie o zwrotne przeniesienie własności przedmiotu zabezpieczenia definitywnie wygasa.
|
||||
Wszelkie wpłaty dokonane przez Pożyczkobiorcę po tym terminie, w przypadku całkowitego zaspokojenia wszelkich roszczeń Pożyczkodawcy wynikających z niniejszej umowy, Pożyczkodawca uzna za nienależne
|
||||
świadczenie i będą podlegały zwrotowi do Pożyczkobiorcy. </p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§9</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. W sytuacji kiedy Pożyczkobiorca wypełni wszystkie zobowiązania względem Pożyczkodawcy, wynikające
|
||||
z zawartej umowy pożyczki, Pożyczkodawca zwolni wszystkie zabezpieczenia określone w zał. nr l
|
||||
do umowy oraz wszelkie inne, jeśli zostały ustanowione. W szczególności dokona zwrotnego przeniesienia
|
||||
własności ruchomości lub nieruchomości opisanej w załączniku do umowy, wyda zgodę na wykreślenie
|
||||
hipoteki, zwolni zastaw ruchomości, zwróci weksel i inne. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. Pożyczkodawca oświadcza, że na pisemny wniosek Pożyczkobiorcy wystawi na rzecz Pożyczkobiorcy
|
||||
promesę zwolnienia zabezpieczenia. Promesa będzie zawierać warunki, które muszą być spełnione przez
|
||||
Pożyczkobiorcę, aby Pożyczkodawca zwolnił zabezpieczenia. W szczególności promesa określi kwotę
|
||||
zadłużenia i termin, w jakim ma być zadłużenia spłacone. Wydanie promesy nie wstrzymuje postępowania
|
||||
windykacyjnego, ani możliwości sprzedaży przewłaszczonej nieruchomości.</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. W sytuacji braku zwolnienia zabezpieczeń, zgodnie z ust. 1 powyżej, Pożyczkobiorcy przysługuje
|
||||
od Pożyczkodawcy kara umowna w wysokości 2,5% wartości nieruchomości będącej zabezpieczeniem
|
||||
naliczanej za brak zwolnienia zabezpieczeń, aż do momentu ich zwolnienia. Kara za brak zwolnienia
|
||||
zabezpieczeń może być naliczona Pożyczkodawcy tylko i wyłącznie po uprzednim skierowaniu do
|
||||
Pożyczkodawcy pisemnego wezwania do zwolnienia zabezpieczeń, w którym Pożyczkobiorca wyznacza
|
||||
Pożyczkodawcy termin 28 dni od otrzymania wezwania do dobrowolnego spełnienia żądania w nim
|
||||
zawartego. Żądanie, o którym mowa w niniejszym ustępie może być ponawiane. </p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§10</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. Pożyczkobiorca może spłacić wszystkie należności z umowy pożyczki i domagać się zwrotnego
|
||||
przeniesienia własności przedmiotu zabezpieczenia aż do momentu zawarcia przez Pożyczkodawcę umowy
|
||||
sprzedaży przedmiotu zabezpieczenia ( w tym umowy przedwstępnej sprzedaży ). Samo wszczęcie
|
||||
postępowania windykacyjnego nie powoduje utraty roszczenia o zwrotne przeniesienie własności przedmiotu
|
||||
zabezpieczenia. Po zawarciu umowy sprzedaży przedmiotu zabezpieczenia ( w tym umowy przedwstępnej
|
||||
sprzedaży) roszczenie o zwrotne przeniesienie własności przedmiotu zabezpieczenia definitywnie wygasa.
|
||||
Wszelkie wpłaty dokonane przez Pożyczkobiorcę po tym terminie, Pożyczkodawca uzna za nienależne
|
||||
świadczenie i będą podlegały zwrotowi do Pożyczkobiorcy. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. W każdym czasie Pożyczkobiorca lub właściciel nieruchomości opisanej w załączniku może wskazać nabywcę
|
||||
przedmiotu zabezpieczenia do zakupu po cenie wynegocjowanej przez Pożyczkobiorcę lub właściciela
|
||||
nieruchomości opisanej w załączniku. Wskazanie nabywcy przedmiotu zabezpieczenia wraz z podaniem ceny
|
||||
sprzedaży odbywa się na piśmie z podpisem notarialnie poświadczonym. Pożyczkodawca ma obowiązek
|
||||
zawrzeć umowę lub ją umożliwić. Pożyczkodawca ma prawo nie zawrzeć umowy kupna - sprzedaży w
|
||||
przypadku, kiedy cena oferowana przez nabywcę będzie mniejsza od wartości zobowiązania w momencie
|
||||
zapłaty lub w przypadku, kiedy wiarygodność nabywcy, co do zapłaty budzi zastrzeżenia Pożyczkodawcy.
|
||||
Umowa kupna - sprzedaży może zostać zawarta jednak zawsze w przypadku złożenia przez nabywcę gwarancji lub dokonania przedpłaty (chyba że cena nie pokrywa zobowiązań Pożyczkobiorcy lub jest
|
||||
mniejsza od wartości wymaganego zabezpieczenia), tak by sytuacja Pożyczkodawcy nie uległa pogorszeniu. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. W sytuacji niedopełnienia przez Pożyczkodawcę obowiązku zawarcia umowy kupna - sprzedaży, zgodnie
|
||||
z ust. l powyżej, z wyznaczoną przez Pożyczkobiorcą osobą, której wiarygodność nie budzi zastrzeżeń,
|
||||
za cenę która pokrywa wartość zobowiązania Pożyczkobiorcy, Pożyczkobiorcy przysługuje
|
||||
od Pożyczkodawcy kara umowna w wysokości 2,5% wartości nieruchomości naliczanej za brak zawarcia
|
||||
umowy kupna - sprzedaży, zgodnie z ust. 1 powyżej. Kara za brak zawarcia umowy kupna - sprzedaży może
|
||||
być naliczona Pożyczkodawcy tylko i wyłącznie po uprzednim skierowaniu do Pożyczkodawcy pisemnego
|
||||
wezwania do przystąpienia do umowy kupna - sprzedaży, w którym Pożyczkobiorca wyznacza
|
||||
Pożyczkodawcy terminie 28 dni od otrzymania wezwania do dobrowolnego spełnienia żądania w nim
|
||||
zawartego. Żądanie, o którym mowa w niniejszym ustępie może być ponawiane. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">4. Zaspokojenie wierzytelności Pożyczkodawcy wobec Pożyczkobiorcy wynikającej z niniejszej umowy
|
||||
pożyczki może nastąpić wyłącznie poprzez spłatę wszystkich należności z umowy pożyczki przez
|
||||
Pożyczkobiorcę albo poprzez sprzedaż przedmiotu zabezpieczenia przez Pożyczkodawcę i zaliczenie
|
||||
uzyskanej ceny sprzedaży na poczet należności z umowy pożyczki. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">5. W przypadku skorzystania przez Pożyczkodawcę z ustanowionych zabezpieczeń i dokonania sprzedaży
|
||||
rzeczy, będących przedmiotem zabezpieczenia, środki uzyskane ze sprzedaży w pierwszej kolejności są
|
||||
zaliczane na poczet spłaty należności głównej, następnie zaległych odsetek, i innych zobowiązań wobec
|
||||
Pożyczkodawcy. Uzyskana ze sprzedaży nadwyżka podlega zwrotowi Pożyczkobiorcy. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">6. Pożyczkobiorca może żądać przedstawienia przez Pożyczkodawcę szczegółowego rozliczenia sumy
|
||||
uzyskanej ze sprzedaży rzeczy będącej przedmiotem zabezpieczenia. Wniosek o przedstawienie
|
||||
szczegółowego rozliczenia Pożyczkobiorca winien skierować do Pożyczkodawcy na piśmie, wyznaczając
|
||||
termin 28 dni od otrzymania wezwania do dobrowolnego spełnienia żądania w nim zawartego.
|
||||
W sytuacji odmowy przedstawienia szczegółowego rozliczenia sumy uzyskanej ze sprzedaży nieruchomości,
|
||||
Pożyczkobiorcy przysługuje od Pożyczkodawcy kara umowna w wysokości 2,5% wartości umowy pożyczki
|
||||
za brak przedstawienia szczegółowego rozliczenia. Kara za brak przedstawienia szczegółowego rozliczenia
|
||||
może być naliczona Pożyczkodawcy tylko i wyłącznie po uprzednim skierowaniu do Pożyczkodawcy
|
||||
pisemnego wezwania do przedstawienia takiego rozliczenia, w którym Pożyczkobiorca wyznacza
|
||||
Pożyczkodawcy termin 28 dni od otrzymania wezwania do dobrowolnego spełnienia żądania w nim
|
||||
zawartego. Żądanie, o którym mowa w niniejszym ustępie może być ponawiane </p>';
|
||||
|
||||
|
||||
|
||||
// dział VII
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ VII - POKWITOWANIA </b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§11</b></p>'
|
||||
;$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. Na życzenie Pożyczkobiorcy, Pożyczkodawca zobowiązuje się wystawić mu pokwitowanie spłaty pożyczki. Pokwitowanie zostanie wystawione, gdy: </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">a) Pożyczkobiorca spłacił w całości swoje zobowiązania wynikające z umowy pożyczki, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">b) Pożyczkodawca zwolnił Pożyczkobiorcę na piśmie z długu, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">c) Pożyczkodawca zaspokoił swoją wierzytelność poprzez sprzedaż przedmiotu zabezpieczenia. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. W sytuacji, gdy mimo spełnienia wskazanych w ust. 1 powyżej przesłanek do wystawienia pokwitowania
|
||||
spłaty pożyczki, Pożyczkodawca odmawia jego wystawienia, Pożyczkobiorcy przysługuje
|
||||
od Pożyczkodawcy kara umowna w wysokości 2,5% wartości umowy pożyczki za brak wystawienia
|
||||
pokwitowania spłaty pożyczki. Kara za brak wystawienia pokwitowania spłaty pożyczki może być
|
||||
naliczona Pożyczkodawcy tylko i wyłącznie po uprzednim skierowaniu do Pożyczkodawcy pisemnego
|
||||
wezwania do wystawienia pokwitowania spłaty pożyczki, w którym Pożyczkobiorca wyznacza
|
||||
Pożyczkodawcy termin 28 dni od otrzymania wezwania do dobrowolnego spełnienia żądania w nim
|
||||
zawartego. Żądanie, o którym mowa w niniejszym ustępie może być ponawiane. </p>';
|
||||
|
||||
// dział VII*
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁVIII - POSTĘPOWANIE WINDYKACYJNE </b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§12</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. W przypadku postawienia pożyczki w stan natychmiastowej wymagalności, o którym mowa w § 6 ust. I
|
||||
(lub gdy stanie się ona automatycznie natychmiast wymagalna - patrz § 6 ust. 3) oraz gdy Pożyczkobiorca nie
|
||||
ureguluje należności w ciągu 10 dni od daty postawienia pożyczki w stan natychmiastowej wymagalności
|
||||
(lub w ciągu 10 dni od daty, gdy stanie się ona automatycznie natychmiast wymagalna), Pożyczkodawca ma
|
||||
prawo wszcząć postępowanie windykacyjne mające na celu zaspokojenie swoich należności. O postanowieniu
|
||||
wszczęcia postępowania windykacyjnego Pożyczkodawca informuje Pożyczkobiorcę listem poleconym,
|
||||
faxem lub mailem. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. Postępowanie windykacyjne ma doprowadzić do dobrowolnego lub przymusowego spełnienia świadczenia
|
||||
przez Pożyczkobiorcę i polega w szczególności na: </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">a) wezwaniu Pożyczkobiorcy do zapłaty, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">b) wezwaniu właściciela nieruchomości opisanej w załączniku do umowy do opróżnienia i wydania
|
||||
nieruchomości lub wezwaniu do wydania ruchomości będących przedmiotem zabezpieczenia
|
||||
zgodnie z § 7 ust. 4 umowy </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">c) wezwaniu właściciela nieruchomości opisanej w załączniku do umowy do wymeldowania wszystkich
|
||||
osób zameldowanych w nieruchomości </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">d) wezwaniu do zwiększenia zabezpieczenia zgodnie z § 7 ust. 12 umowy, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">e) wezwaniu właściciela nieruchomości opisanej w załączniku do umowy do zawarcia umowy
|
||||
przeniesienia własności nieruchomości zgodnie z § 8. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">f) podjęciu czynności zmierzających do zaspokojenia się z przedmiotu zabezpieczenia poprzez ich sprzedaż, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">g) wypełnieniu weksla in blanco, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">h) wystąpieniu z wnioskiem o nadanie klauzuli wykonalności aktowi notarialnemu, w którym Pożyczkobiorca, lub osoba udzielająca zabezpieczenia poddała się dobrowolnej egzekucji, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">i) skierowaniu sprawy na drogę postępowania sądowego, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">j) skierowaniu sprawy na drogę egzekucji komorniczej, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">k) przeniesieniu własności przedmiotu zabezpieczenia opisanego w załączniku w wyniku wcześniej
|
||||
złożonego zobowiązania </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">l) innych czynnościach zmierzających do zaspokojenia należności Pożyczkodawcy. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. W przypadku wszczęcia postępowania windykacyjnego, Pożyczkodawca ma prawo zaspokoić się z
|
||||
ustanowionego zabezpieczenia, w szczególności dokonać sprzedaży rzeczy będącej przedmiotem
|
||||
zabezpieczenia na wolnym rynku. Pożyczkobiorca może spłacić wszystkie należności z umowy pożyczki i
|
||||
domagać się zwrotnego przewłaszczenia na siebie przedmiotu zabezpieczenia do momentu zawarcia przez
|
||||
Pożyczkodawcę umowy sprzedaży przedmiotu zabezpieczenia ( w tym umowy przedwstępnej sprzedaży).
|
||||
Po zawarciu takiej umowy zobowiązanie Pożyczkodawcy do zwrotnego przewłaszczenia przedmiotu
|
||||
zabezpieczenia na Pożyczkobiorcę wygasa.
|
||||
Pożyczkobiorca lub właściciel nieruchomości opisanej w załączniku ma prawo wskazać nabywcę przedmiotu
|
||||
zabezpieczenia. Środki uzyskane ze sprzedaży w pierwszej kolejności są zaliczane na poczet spłaty należności głównej, następnie zaległych odsetek oraz innych zobowiązań wobec Pożyczkodawcy. Uzyskana ze sprzedaży nadwyżka podlega zwrotowi Pożyczkobiorcy. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">4. W przypadku wszczęcia postępowania windykacyjnego Pożyczkodawca ma prawo żądania
|
||||
od Pożyczkobiorcy dokumentów finansowych, pozwalających ocenić bieżącą kondycję finansową
|
||||
Pożyczkobiorcy takich, jak: bilans, rachunek zysków i strat, zestawienie F0I, deklaracje podatkowe,
|
||||
złożenie oświadczenia majątkowego na formularzu przygotowanym przez Pożyczkodawcę (w przypadku
|
||||
różnych metod rozliczania należności wobec Skarbu Państwa - są to wybrane z wymienionych powyżej
|
||||
dokumentów finansowych). W przypadku niewywiązania się w całości lub w części z przedstawienia w/w
|
||||
dokumentów w terminie 28 dni od wystąpienia Pożyczkodawcy z żądaniem ich przedstawienia,
|
||||
Pożyczkodawcy przysługuje kara umowna w wys. l % aktualnego zadłużenia Żądanie, o którym mowa
|
||||
w niniejszym ustępie może być ponawiane w toku prowadzenia postępowania windykacyjnego </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">5. W każdym czasie Pożyczkobiorca ma prawo żądania od Pożyczkodawcy dokumentów finansowych,
|
||||
pozwalających ocenić bieżącą kondycję finansową Pożyczkodawcy takich, jak: bilans, rachunek zysków
|
||||
i strat, zestawienie F0l, deklaracje podatkowe, złożenie oświadczenia majątkowego. W przypadku
|
||||
niewywiązania się w całości lub w części z przedstawienia w/w dokumentów, Pożyczkobiorcy przysługuje
|
||||
kara umowna w wys. 1 % wartości umowy pożyczki. Kara za brak przedstawienia w/w dokumentów może
|
||||
być naliczona Pożyczkodawcy tylko i wyłącznie po uprzednim skierowaniu do Pożyczkodawcy pisemnego
|
||||
wezwania do przedstawienia w/w dokumentów, w którym Pożyczkobiorca wyznacza Pożyczkodawcy
|
||||
termin 28 dni od otrzymania wezwania do dobrowolnego spełnienia żądania w nim zawartego. Żądanie,
|
||||
o którym mowa w niniejszym ustępie może być ponawiane. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">6. W przypadku wszczęcia postępowania windykacyjnego Pożyczkodawca ma prawo żądania
|
||||
od Pożyczkobiorcy przedstawienia zaświadczenia z Urzędu Skarbowego o niezaleganiu w podatkach
|
||||
lub stwierdzającego stan zaległości, a w przypadku osób prowadzących działalność gospodarczą również
|
||||
przedstawienia zaświadczenia z Zakładu Ubezpieczeń Społecznych o niezaleganiu w opłacaniu składek
|
||||
lub stwierdzającego stan zaległości. W przypadku niewywiązania się w całości lub w części
|
||||
z przedstawienia w/w dokumentów w terminie 28 dni od wystąpienia Pożyczkodawcy z żądaniem ich
|
||||
przedstawienia, Pożyczkodawcy przysługuje kara umowna w wys. l % aktualnego zadłużenia. Żądanie,
|
||||
o którym mowa w niniejszym ustępie może być ponawiane w toku prowadzenia postępowania
|
||||
windykacyjnego. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">7. W każdym czasie Pożyczkobiorca ma prawo żądania od Pożyczkodawcy przedstawienia zaświadczenia
|
||||
z Urzędu Skarbowego o niezaleganiu w podatkach lub stwierdzającego stan zaległości oraz przedstawienia
|
||||
zaświadczenia z Zakładu Ubezpieczeń Społecznych o niezaleganiu w opłacaniu składek lub stwierdzającego
|
||||
stan zaległości W przypadku niewywiązania się w całości lub w części z przedstawienia w/w dokumentów,
|
||||
Pożyczkobiorcy przysługuje kara umowna w wys. l % wartości umowy pożyczki. Kara za brak przedstawienia w/w dokumentów może być naliczona Pożyczkodawcy tylko i wyłącznie po uprzednim
|
||||
skierowaniu do Pożyczkodawcy pisemnego wezwania do przedstawienia w/w dokumentów, w którym
|
||||
Pożyczkobiorca wyznacza Pożyczkodawcy termin 28 dni od otrzymania wezwania do dobrowolnego
|
||||
spełnienia żądania w nim zawartego. Żądanie, o którym mowa w niniejszym ustępie może być ponawiane. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">8. Za wszczęcie oraz prowadzenie postępowania windykacyjnego Pożyczkodawca pobiera zryczałtowaną
|
||||
opłatę w wysokości 3,5% aktualnego zadłużenia, która naliczana jest za każdy rozpoczęty miesiąc
|
||||
prowadzenia postępowania windykacyjnego. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">9. W przypadku wszczęcia postępowania windykacyjnego, Pożyczkobiorca od pierwszego dnia zobowiązany
|
||||
jest do płacenia miesięcznie odsetek karnych według rocznej stopy wynoszącej czterokrotność wysokości
|
||||
stopy kredytu lombardowego NBP (czyli miesięcznie 1/3 kredytu lombardowego NBP) niespłaconego
|
||||
przedmiotu pożyczki, do momentu uzyskania środków ze sprzedaży przedmiotu zabezpieczenia
|
||||
lub w wyniku prowadzenia postępowania windykacyjnego lub uzyskania środków pieniężnych
|
||||
w jakikolwiek inny sposób od Pożyczkobiorcy. Pożyczkobiorca ma prawo wskazać nabywcę przedmiotu
|
||||
zabezpieczenia na zasadach określonych w § 10 ust. 2 umowy w celu skrócenia okresu płatności odsetek
|
||||
karnych. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">10. Odsetki karne mogą być naliczane również za okres trwania stanu natychmiastowej wymagalności,
|
||||
gdyż z istoty rzeczy jest on częścią postępowania windykacyjnego, chyba że stan natychmiastowej
|
||||
wymagalności został odwołany przez Pożyczkodawcę</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">11. W przypadku naliczania przez Pożyczkodawcę odsetek karnych, wstrzymywane zostaje naliczanie odsetek
|
||||
umownych, zgodnie z § 5 ust. 8. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">12. Postępowanie windykacyjne może zostać wszczęte w stosunku do całości lub części zobowiązań
|
||||
i w każdym czasie może zostać umorzone, jak również ponownie wszczęte. W przypadku umorzenia
|
||||
postępowania windykacyjnego opłaty za wszczęcie i prowadzenie postępowania windykacyjnego naliczana
|
||||
jest do końca miesiąca, którego dotyczyła. </p>';
|
||||
|
||||
// dział IX*
|
||||
$ac=new Account();
|
||||
$ac->retrieve($focus->parent_id);
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ IX - ADRES DO DORĘCZEŃ </b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§13</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">
|
||||
Strony ustaliły, że adresem do doręczeń wszelkiej korespondencji dla Pożyczkobiorcy, związanej z zawarciem umowy
|
||||
pożyczki jest: <span style="color: red;">'.$focus->parent_address_street.', '.$focus->parent_address_postalcode. '
|
||||
'.$focus->parent_address_city.'</span><br>W przypadku zmiany adresu, o którym mowa w ust. l, Pożyczkobiorca zobowiązany jest do poinformowania
|
||||
Pożyczkodawcy w terminie 7 dni o nowym adresie korespondencyjnym. W razie zaniechania tego
|
||||
obowiązku dla Pożyczkodawcy ważnym jest dotychczasowy adres wskazany w ust 1/</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. W przypadku, kiedy Pożyczkobiorca nie odbiera korespondencji, o której mowa w ust. l, korespondencję
|
||||
uważa się za doręczoną po drugim awizowaniu przesyłki. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. Adres mailowy Pożyczkodawcy:
|
||||
bogdanpietras@matbud-torun.pl; joannapietras@matbud-torun.pl, adres e-mailowy Pożyczkobiorcy: <span style="color: red;">'.$ac->email1.'</span></p>';
|
||||
|
||||
|
||||
// dział X
|
||||
$date = new DateTime($focus->register_date);
|
||||
$mod=$focus->number_of_installments-1;
|
||||
$date->modify('+'.$mod.' month');
|
||||
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ X- ROZWIAZANIE UMOWY </b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§14</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. <span style="color: red;">Umowa zostaje zawarta na czas
|
||||
określony od dnia '.date('d.m.Y',strtotime($focus->register_date)).' r. do dnia '.$date->format('d.m.Y',strtotime($focus->date_end)).' r, z zastrzeżeniem § 15.</span></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. Umowa może zostać wypowiedziana przez Pożyczkobiorcę z zachowaniem jednomiesięcznego okresu
|
||||
wypowiedzenia. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. Umowa zawsze może zostać wypowiedziana przez Pożyczkodawcę w sytuacji gwałtownego pogorszenia
|
||||
się sytuacji majątkowej Pożyczkobiorcy lub niewywiązywania się Pożyczkobiorcy z warunków niniejszej
|
||||
umowy, z zachowaniem jednomiesięcznego okresu wypowiedzenia. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">4. W przypadku wypowiedzenia umowy przez Pożyczkodawcę, Pożyczkobiorca zobowiązany jest do zwrotu
|
||||
kwoty pożyczki z upływem terminu wypowiedzenia, a w przypadku wszczęcia postępowania
|
||||
windykacyjnego, również do zapłaty wszystkich dodatkowych należności związanych z niedotrzymaniem
|
||||
warunków umowy, najpóźniej w terminie 14 dni od wygaśnięcia umowy. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">5. Umowa rozwiązuje się i wygasa z chwilą całkowitej spłaty przez Pożyczkobiorcę wszelkich należności
|
||||
wynikających lub związanych z niniejszą umowy oraz późniejszych jej zmian.
|
||||
</p>';
|
||||
|
||||
$kwota->setCurrency( array(
|
||||
'złoty', 'złote', 'złotych'
|
||||
),
|
||||
array(
|
||||
'grosz', 'grosze', 'groszy'
|
||||
));
|
||||
// dział XI
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ XI - ZESTAWIENIE OPŁAT</b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§15</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. Opłaty ponoszone przez Pożyczkobiorcę związane z zawarciem i realizacją umowy przedstawiają się
|
||||
następująco: </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">a) <span style="color:red;">Prowizja jednorazowa za udzielenie pożyczki,
|
||||
o której mowa w § 4, w wysokości '.number_format ($focus->total_rate_of_commission,2,',','.').' zł (słownie: '.$kwota->convertPrice($focus->total_rate_of_commission).').</span> </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">b) Odsetki:</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">- odsetki umowne, o których mowa w § 5 umowy, w wysokości '.number_format ($focus->interest_rate,2,',','.').' % wartości pożyczki
|
||||
w stosunku miesięcznym od dnia wydania przedmiotu pożyczki do dnia jego zwrotu, z
|
||||
zastrzeżeniem § 12 ust. 10 </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">- odsetki karne według rocznej stopy wynoszącej czterokrotność wysokości stopy kredytu
|
||||
lombardowego NBP (czyli miesięcznie 1/3 kredytu lombardowego NBP) niespłaconego
|
||||
przedmiotu pożyczki, płatne w przypadku określonym w § 12 ust. 9, z zastrzeżeniem
|
||||
§ 12 ust. 10 </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">c) Opłata za wszczęcie oraz prowadzanie postępowania windykacyjnego w wysokości 3,5 % aktualnego
|
||||
zadłużenia, naliczana za każdy rozpoczęty miesiąc postępowania windykacyjnego, o czym mowa w §
|
||||
12 ust. 8 </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">d) Kary umowne naliczane Pożyczkobiorcy: </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">* kara umowna w wysokości 0,5 % wartości ruchomości lub nieruchomości będącej
|
||||
przedmiotem zabezpieczenia określonego w zał. nr l do umowy, naliczana za brak wydania
|
||||
ruchomości lub nieruchomości, o której mowa w § 7 umowy </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">* kara umowna w wysokości 2,5 % wartości nieustanowionego zabezpieczenia, naliczana
|
||||
za brak zwiększenia zabezpieczenia, o której mowa w § 7 ust. 2 </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">* kara umowna w wysokości 1 % aktualnego zadłużenia Pożyczkobiorcy, naliczana za brak
|
||||
złożenia oświadczenia majątkowego i innych dokumentów finansowych, o której mowa
|
||||
w § 12 ust. 4
|
||||
kara umowna w wysokości 1 % aktualnego zadłużenia Pożyczkobiorcy, naliczana za brak
|
||||
przedstawienia zaświadczenia z Urzędu Skarbowego o niezaleganiu w podatkach lub
|
||||
stwierdzające stan zaległości, a w przypadku osób prowadzących działalność gospodarczą
|
||||
również przedstawienia zaświadczenia z Zakładu Ubezpieczeń Społecznych o niezaleganiu
|
||||
w opłacaniu składek lub stwierdzające stan zaległości, o której mowa w § 12 ust. 6 </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">e) Kary umowne naliczane Pożyczkodawcy: </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">kara umowna w wysokości 0,5 % wartości ruchomości lub nieruchomości będącej
|
||||
przedmiotem zabezpieczenia, określonej w zał. nr 1 do umowy, naliczana za brak wydania
|
||||
ruchomości lub nieruchomości, o której mowa w § 7 </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">kara umowna w wysokości 3,5 % wartości nieruchomości będącej zabezpieczeniem,
|
||||
określonej w zał. nr l do umowy, naliczana za brak zwolnienia zabezpieczeń, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">kara umowna w wysokości 2,5 % wartości nieruchomości będącej zabezpieczeniem,
|
||||
określonej w zał. nr l, naliczana za brak zawarcia umowy kupna - sprzedaży nieruchomości,
|
||||
o której mowa w § 10 ust. 3 </p>';
|
||||
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">kara umowna w wysokości 2,5 % wartości umowy pożyczki, naliczana za brak przedstawienia
|
||||
rozliczenia sumy uzyskanej ze sprzedaży rzeczy będącej przedmiotem zabezpieczenia, o której
|
||||
mowa w § 10 ust. 6 </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">kara umowna w wysokości 2,5 % wartości umowy pożyczki, naliczana za brak wystawienia
|
||||
pokwitowania spłaty pożyczki, o której mowa w § 11 ust. 2 </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">kara umowna w wysokości l % wartości umowy pożyczki, naliczana za brak złożenia
|
||||
oświadczenia majątkowego i innych dokumentów finansowych, o której mowa w § 12 ust. 5 </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">kara umowna w wysokości l % wartości umowy pożyczki, naliczana za brak przedstawienia
|
||||
zaświadczenia z Urzędu Skarbowego o niezaleganiu w podatkach lub stwierdzające stan
|
||||
zaległości oraz zaświadczenia z Zakładu Ubezpieczeń Społecznych o niezaleganiu w opłacaniu
|
||||
składek lub stwierdzające stan zaległości, o której mowa w § 12 ust. 7 </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">kara umowna w wysokości 3,5 % wartości umowy pożyczki, naliczana za brak zawarcia
|
||||
aneksu do umowy pożyczki, o której mowa w § 15 ust. 4. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">f) Koszty ustanowienia zabezpieczeń, w szczególności: koszty przewłaszczenia ruchomości
|
||||
lub nieruchomości, koszty ustanowienia i wykreślenia hipoteki, koszty ustanowienia zastawu, koszty
|
||||
zobowiązania do przewłaszczenia ruchomości lub nieruchomości, koszty ustanowienia poręczeń, opłat
|
||||
skarbowych od weksli. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">g) W przypadku skorzystania przez Pożyczkodawcę z ustanowionych zabezpieczeń, w szczególności
|
||||
polegających na sprzedaży rzeczy, Pożyczkobiorca ponosi wszystkie udokumentowane koszty
|
||||
Pożyczkodawcy związane z realizacją zabezpieczenia, w szczególności: koszty prowizji pośrednika
|
||||
przy sprzedaży nieruchomości, koszty emisji ogłoszeń, koszty sporządzenia aktu notarialnego i inne. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">h) Opłata w wysokości 0,5 % wartości nieruchomości za dokonanie czynności wymeldowania w imieniu
|
||||
Pożyczkobiorcy lub właściciela nieruchomości, </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">i) Udokumentowane koszty Pożyczkodawcy związane z zawarciem umowy przeniesienia własności
|
||||
nieruchomości, w tym również koszty związane z zawarciem umowy przeniesienia własności
|
||||
nieruchomości, będącej wykonaniem zobowiązania do przeniesienia własności nieruchomości,
|
||||
o którym mowa w § 8 </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">j) W przypadku, kiedy zabezpieczeniem spłaty pożyczki jest przewłaszczenie nieruchomości
|
||||
na zabezpieczenie lub gdy w wykonaniu wcześniejszego zobowiązania Pożyczkobiorcy
|
||||
do przeniesienia własności nieruchomości na Pożyczkodawcę, o czym mowa w § 8, własność
|
||||
nieruchomości zostanie przeniesiona na Pożyczkodawcę (kiedy Pożyczkodawca figuruje w Księdze
|
||||
Wieczystej jako właściciel nieruchomości stanowiącej zabezpieczenie), Pożyczkobiorca zobowiązuje
|
||||
się, w przypadku przejścia posiadania nieruchomości zgodnie z protokołem, o którym mowa
|
||||
w § 8 ust. 2, na Pożyczkodawcę, do pokrywania kosztów podatku od nieruchomości, stanowiącej
|
||||
przedmiot zabezpieczenia, przez okres trwania umowy pożyczki, z takim zastrzeżeniem,
|
||||
że Pożyczkodawca obciąży Pożyczkobiorcę kosztami zapłaconego podatku poprzez refakturowanie
|
||||
w/w kosztów. Pożyczkobiorca zobowiązuje się do zwrotu Pożyczkodawcy kosztów naliczonych
|
||||
podatków i ewentualnych odsetek. W przypadku, gdy do przeniesienia posiadania nieruchomości
|
||||
nie dojdzie, obowiązek zapłaty podatku od nieruchomości ciąży na Pożyczkobiorcy jako posiadaczu
|
||||
samoistnym.</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. Obowiązek zapłaty każdej z opłat potwierdzony będzie fakturą V AT wystawioną przez Pożyczkodawcę. </p>';
|
||||
|
||||
|
||||
// dział XII
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ XII - PRZEDŁUŻENIE UMOWY </b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§16</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. Jeśli w czasie trwania umowy pożyczki nie zostanie wszczęte przeciwko Pożyczkobiorcy postępowanie
|
||||
windykacyjne, to Pożyczkobiorca uzyskuje prawo żądania przedłużenia umowy pożyczki na okres 6
|
||||
miesięcy z zachowaniem warunków niniejszej umowy. Dotyczy to w szczególności kwoty pożyczki,
|
||||
zabezpieczeń, prowizji, wysokości odsetek oraz wszystkich innych opłat i innych warunków umowy.
|
||||
Pożyczkodawca jest wówczas zobowiązany do przedłużenia umowy. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. W terminie 14 dni przed upływem terminu, na który umowa pożyczki została zawarta, Pożyczkodawca,
|
||||
w przypadku zaistnienia warunków wskazanych w ust. l, przesyła do Pożyczkobiorcy pisemną informację
|
||||
o prawie do przedłużenia trwania umowy. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. Pożyczkobiorca wyraża swoją wolę przedłużenia umowy w formie pisemnej lub faksem, najpóźniej do dnia
|
||||
zakończenia okresu trwania umowy pożyczki. Jeśli Pożyczkobiorca wyrazi wolę przedłużenia okresu
|
||||
trwania umowy, strony zawierają aneks do niniejszej umowy, w którym Pożyczkodawca zobowiązuje się
|
||||
do udzielenia dodatkowej pożyczki w wysokości dotychczas spłaconego kapitału na okres 6 miesięcy. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">4. W sytuacji niedopełnienia przez Pożyczkodawcę obowiązku zawarcia aneksu do umowy w sytuacji
|
||||
zaistnienia przesłanek, o których mowa w niniejszym paragrafie Pożyczkobiorcy przysługuje
|
||||
od Pożyczkodawcy kara umowna w wysokości 3,5% wartości umowy pożyczki naliczanej za brak zawarcia
|
||||
aneksu do umowy. Kara za brak zawarcia aneksu do umowy może być naliczona Pożyczkodawcy tylko
|
||||
i wyłącznie po uprzednim skierowaniu do Pożyczkodawcy pisemnego wezwania do zawarcia aneksu
|
||||
do umowy, w którym Pożyczkobiorca wyznacza Pożyczkodawcy termin 28 dni od otrzymania wezwania
|
||||
do dobrowolnego spełnienia żądania w nim zawartego. Żądanie, o którym mowa w niniejszym ustępie może
|
||||
być ponawiane. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">5. W przypadku przedłużenia umowy Pożyczkodawca potrąca kwotę prowizji, o której mowa w § 4 z pożyczki
|
||||
dodatkowo udzielonej na warunkach wskazanych w niniejszym paragrafie. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">6. Przedłużenie umowy w sposób wskazany w niniejszym paragrafie może być jednokrotnie. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">7. Pożyczkobiorca może w ciągu 10 dni od podpisania aneksu przedłużającego umowę pożyczki, odstąpić
|
||||
od tego aneksu. W takim wypadku, pobrana prowizja za przedłużenie umowy podlega zwrotowi, a umowa
|
||||
pożyczki ulega rozwiązaniu w terminie i na warunkach w niej wskazanych. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">8. Aneks uznaje się za niezawarty, a co za tym idzie, nie ma obowiązku zapłaty odsetek za 10 dni okresu,
|
||||
w którym Pożyczkobiorca może od podpisanego aneksu odstąpić. </p>';
|
||||
|
||||
// dział XIII
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9,5pt;"><b>DZIAŁ XIII - USTALENIA KOŃCOWE </b></p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§17</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. Obowiązek zapłaty podatku od czynności cywilnoprawnych z tytułu zawarcia niniejszej umowy ponosi
|
||||
Pożyczkobiorca.</p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. Pożyczkodawca na podstawie art. 2 pkt 4 Ustawy o podatku od czynności cywilnoprawnych z dnia
|
||||
09-09-2000 r. Dz.U. 86/2000 poz. 959 jest zwolniony z obowiązku zapłaty podatku od czynności
|
||||
cywilnoprawnych.</p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§18</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. W przypadku, kiedy Pożyczkodawcy przysługuje od Pożyczkobiorcy więcej niż jedna należność z tytułu
|
||||
umowy pożyczki, wówczas, niezależnie od wskazań Pożyczkobiorcy dotyczących sposobu zarachowania
|
||||
wpłaty, Pożyczkodawca zalicza wpłatę na poczet naj dawniej wymagalnych świadczeń oraz świadczeń ubocznych przysługujących Pożyczkodawcy od Pożyczkobiorcy, chyba że wpłata pochodzi z realizacji
|
||||
zabezpieczenia lub egzekucji komorniczej wówczas ma zastosowanie zapis z § 10 ust 5. </p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. Pożyczkodawcy przysługuje prawo do zawieszania naliczania odsetek lub rezygnacji z odsetek i wszystkich
|
||||
innych opłat w przypadku postawienia pożyczki w stan natychmiastowej wymagalności oraz w przypadku
|
||||
wszczęcia postępowania windykacyjnego (zgodnie z § 5 ust. 9) </p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§19</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">W przypadku, gdy zabezpieczeniem spłaty pożyczki jest hipoteka, ustanowiona na nieruchomości opisana w odrębnej umowie, właściciel nieruchomości udzieli Pożyczkodawcy w dniu
|
||||
podpisania umowy pożyczki pełnomocnictwa w formie aktu notarialnego do przeglądania akt
|
||||
wieczystoksięgowych nieruchomości będącej przedmiotem zabezpieczenia </p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§20</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">W sytuacji, gdy całość lub część przedmiotu pożyczki przekazywana jest osobom trzecim celem spłaty
|
||||
zobowiązań Pożyczkobiorcy lub właściciela nieruchomości opisanej w załączniku, których zabezpieczeniem jest
|
||||
obciążenie nieruchomości opisanej w załączniku na rzecz osób trzecich, Pożyczkobiorca lub właściciel
|
||||
nieruchomości udzieli w formie aktu notarialnego, w dniu podpisania umowy pożyczki pełnomocnictwa do
|
||||
dokonania czynności związanych z uzyskaniem zezwolenia na wykreślenie obciążeń ustanowionych na
|
||||
nieruchomości, opisanej w załączniku</p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§21</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">W sprawach nie uregulowanych niniejszą umową mają zastosowanie przepisy Kodeksu cywilnego, w
|
||||
szczególności art. 720 - 724 k.c. </p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§22</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">Umowę sporządzono w dwóch jednobrzmiących egzemplarzach. </p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§23</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">Sprawy sporne wynikające z niniejszej umowy, w tym również dotyczące zabezpieczeń udzielonych przez
|
||||
Pożyczkobiorcę, rozpatruje sąd właściwy dla Pożyczkodawcy. </p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§24</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">Wszystkie zmiany warunków niniejszej umowy wymagają zgodnej woli stron wyrażonej w formie pisemnej pod
|
||||
rygorem nieważności</p>';
|
||||
$content.='<p style="text-align: center; font-family: \'Times New Roman\';font-size: 10pt;"><b>§25</b></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">Umowa wchodzi w życie z dniem podpisania. </p>';
|
||||
$content.='<br><br><table style="text-align: center; font-family: \'Times New Roman\';font-size: 9pt;width:100%;"><tr><td>Pożyczkodawca</td><td>Pożyczkobiorca</td></tr></table>';
|
||||
$content.='<br><br><br><br><br><br><br><br><p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;"><span style="color:red;">Załączniki do umowy pożyczki: </span></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. <span style="color:red;">Zał. nr l. do umowy - Formy zabezpieczenia </span></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. <span style="color:red;">Zał. nr 2. do umowy - Deklaracja wekslowa wraz z wekslem</span></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. <span style="color:red;">Zał. nr 3. do umowy - Harmonogram spłat pożyczki </span></p>';
|
||||
$content.='<br><br><p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;"><span style="color:red;">Załącznik nr 1 do umowy pożyczki nr '.$focus->document_no.' z '.date('d.m.Y',strtotime($focus->register_date)).' rok</span></p>';
|
||||
$content.='<br><br><br><br><br><br><br><br><p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;"><span style="color:red;">Załączniki do umowy pożyczki: </span></p>';
|
||||
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">1. <span style="color:red;">Strony postanawiają, iż tytułem zabezpieczenia spłaty wszelkich zobowiązań wynikających z niniejszej umowy Pożyczkobiorca wystawia weksel In blanco wraz z deklaracją wekslową poręczony przez …………………… </span></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">2. <span style="color:red;">Podpisany weksel In blanco wraz z deklaracją wekslową stanowią załącznik nr 2 do niniejszej umowy.</span></p>';
|
||||
$content.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">3. <span style="color:red;">Umowa przewłaszczenia ………… , sporządzone odrębną umową. </span></p>';
|
||||
$content.='<br><br><br><br><br><br><br><br><br><br><br><table style="text-align: center; font-family: \'Times New Roman\';font-size: 9pt;width:100%;"><tr><td>Pożyczkodawca</td><td>Pożyczkobiorca</td></tr></table>';
|
||||
44
modules/EcmAgreements/PDFTemplate/content.php
Executable file
44
modules/EcmAgreements/PDFTemplate/content.php
Executable file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
$content='<div style="border: 1px solid;"><h2>'.$focus->parent_name.'</h2>';
|
||||
$content.='<br>Załącznik nr 3 do aneksu nr 1 do umowy pożyczki nr '.$focus->document_no.' z '.date("d.m.Y",strtotime($focus->date_of_the_loan)).' rok
|
||||
<br>Harmonogram spłaty pożyczki<br><br>';
|
||||
|
||||
$content.='<table BORDER=1 style="text-align:center;border: 1px solid; border-collapse: collapse;">';
|
||||
$content.='<tr>
|
||||
<th>Lp</th>
|
||||
<th>Termin płatności odsetek i raty kapitałowej</th>
|
||||
<th>Suma raty i odsetek</th>
|
||||
<th>Odsetki</th>
|
||||
<th>Prowizja</th>
|
||||
<th>Rata kapitałowa</th>
|
||||
<th>Saldo</th>
|
||||
</tr>';
|
||||
$content.='<tr>
|
||||
<td colspan="6" style="text-align:right;"><B>SALDO POCZĄTKOWE KAPITAŁU</b></td><td>'.$focus->amount.'</td></tr>';
|
||||
foreach ($positions as $item){
|
||||
$content.='<tr>
|
||||
<td style="text-align:right;">'.$item['position'].'</td>
|
||||
<td style="text-align:right;">'.date("d.m.Y",strtotime($item['payment_date'])).'</td>
|
||||
<td style="text-align:right;">'.format_number($item['total']).'</td>
|
||||
<td style="text-align:right;">'.format_number($item['interest_rate']).'</td>
|
||||
<td style="text-align:right;">'.format_number($item['rate_of_commission']).'</td>
|
||||
<td style="text-align:right;">'.format_number($item['principal_value']).'</td>
|
||||
<td style="text-align:right;">'.format_number($item['saldo']).'</td>
|
||||
</tr>';
|
||||
}
|
||||
$content.='<tr>
|
||||
<td style="text-align:right;"></td>
|
||||
<td style="text-align:left;"><b>suma</b></td>
|
||||
<td style="text-align:right;"><b>'.format_number($focus->total_total).'</b></td>
|
||||
<td style="text-align:right;"><b>'.format_number($focus->total_interest_rate).'</b></td>
|
||||
<td style="text-align:right;"><b>'.format_number($focus->total_rate_of_commission).'</b></td>
|
||||
<td style="text-align:right;"><b>'.format_number($focus->total_principal_value).'</b></td>
|
||||
<td style="text-align:right;"></td>
|
||||
</tr>';
|
||||
$content.='</table>';
|
||||
$content.='</div><br>';
|
||||
$content.='<table BORDER=0 width="100%">';
|
||||
$content.='<tr>
|
||||
<td style="text-align:left;">Pożyczkobiorca</td>
|
||||
<td style="text-align:right;">Pożyczkodawca</td></tr>';
|
||||
$content.='</table>';
|
||||
100
modules/EcmAgreements/PDFTemplate/footer-en_us.php
Executable file
100
modules/EcmAgreements/PDFTemplate/footer-en_us.php
Executable file
@@ -0,0 +1,100 @@
|
||||
<?php
|
||||
$w = "62"; //first column width
|
||||
$w2 = "12"; //second column width
|
||||
$footer = '
|
||||
<hr>
|
||||
<table style="width: 100%; font-size: 7pt;">
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
e5 Polska Sp. z o.o
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_KRS'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
28207
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
ul. Wąwozowa 11
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_NIP'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
PL 525-21-73-990
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
02-796 Warszawa
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_REGON'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
016280234
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
Tel: +48 (22) 228 20 90
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_BANK'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
';
|
||||
if ($bank=='milenium')
|
||||
$footer.='BANK MILLENIUM';
|
||||
if ($bank=='mbank')
|
||||
$footer.='MBANK';
|
||||
$footer.='
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
Fax: +48 (56) 674 60 47
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_BANK_ACCOUNT'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
';
|
||||
if ($bank=='milenium')
|
||||
$footer.='PL36116022020000000064080587';
|
||||
if ($bank=='mbank')
|
||||
$footer.='PL96114010100000548212001002';
|
||||
$footer.='
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
'.$user->email1.'
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_SWIFT'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
';
|
||||
if ($bank=='milenium')
|
||||
$footer.='BIGBPLPW';
|
||||
if ($bank=='mbank')
|
||||
$footer.='BREXPLPW';
|
||||
$footer.='
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table style="width: 100%; font-size: 7pt;">
|
||||
<tr>
|
||||
<td style="width: 50%;">
|
||||
{PAGENO}/{nb}
|
||||
</td>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<b>'.$focus->document_no.'</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
';
|
||||
95
modules/EcmAgreements/PDFTemplate/footer-pl_pl.php
Executable file
95
modules/EcmAgreements/PDFTemplate/footer-pl_pl.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
$w = "62"; //first column width
|
||||
$w2 = "12"; //second column width
|
||||
$footer = '
|
||||
<hr>
|
||||
<table style="width: 100%; font-size: 7pt;">
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
e5 Polska Sp. z o.o
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_KRS'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
28207
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
ul. Wąwozowa 11
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_NIP'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
PL 525-21-73-990
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
02-796 Warszawa
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_REGON'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
016280234
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
Tel: +48 (22) 228 20 90
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_BANK'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
';
|
||||
if ($bank=='milenium')
|
||||
$footer.='BANK MILLENIUM';
|
||||
if ($bank=='mbank')
|
||||
$footer.='MBANK';
|
||||
$footer.='
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
Fax: +48 (56) 674 60 47
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_BANK_ACCOUNT'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
';
|
||||
if ($bank=='milenium')
|
||||
$footer.='35 1160 2202 0000 0000 6408 0411';
|
||||
if ($bank=='mbank')
|
||||
$footer.='26 1140 1010 0000 5482 1200 1001';
|
||||
$footer.='
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: '.$w.'%">
|
||||
'.$user->email1.'
|
||||
</td>
|
||||
<td style="width: '.$w2.'%">
|
||||
<b>'.$labels['LBL_PDF_FOOTER_GIOS'].'</b>
|
||||
</td>
|
||||
<td style="text-align: right">
|
||||
E0006254W
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<table style="width: 100%; font-size: 7pt;">
|
||||
<tr>
|
||||
<td style="width: 50%;">
|
||||
{PAGENO}/{nb}
|
||||
</td>
|
||||
<td style="width: 50%; text-align: right">
|
||||
<b>'.$focus->document_no.'</b>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
';
|
||||
19
modules/EcmAgreements/PDFTemplate/header.php
Executable file
19
modules/EcmAgreements/PDFTemplate/header.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
$header = '
|
||||
<table style="font-size: 8pt; width: 100%"><tr>
|
||||
<td width="15%">
|
||||
<img style="width: 70px;" src="modules/EcmSales/PDFTemplate/saas.jpg"/>
|
||||
</td>
|
||||
<td width="45%" style="text-align: left; vertical-align: top;">
|
||||
<b>SPRZEDAWCA</b><br />
|
||||
Saas SystemS Sp. z o.o.<br />
|
||||
ul. Lipnowska 21-23<br />
|
||||
87-400 Toruń<br />
|
||||
NIP: 9562307719
|
||||
</td>
|
||||
<td style="text-align: left; vertical-align: top;">
|
||||
</td>
|
||||
<td style="text-align: right; vertical-align: top;"></td>
|
||||
</tr></table>
|
||||
<hr>
|
||||
';
|
||||
49
modules/EcmAgreements/PDFTemplate/helper.php
Executable file
49
modules/EcmAgreements/PDFTemplate/helper.php
Executable file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
function formatPDFPositions($positions, $focus) {
|
||||
$result = array();
|
||||
foreach ($positions as $pos) {
|
||||
|
||||
$pos['position'] = intval($pos['position'])+1;
|
||||
|
||||
$pos['total'] = $pos['total'];
|
||||
$pos['price_netto']=format_number($pos['price_netto']);
|
||||
$pos['total_vat']=format_number($pos['total_vat']);
|
||||
$pos['ecmvat_value']=format_number($pos['ecmvat_value']);
|
||||
$pos['total_brutto']=format_number($pos['total_brutto']);
|
||||
$pos['total_netto']=format_number($pos['total_netto']);
|
||||
|
||||
$result[] = $pos;
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
function formatPDFPositionsCorrect($pos, $focus) {
|
||||
|
||||
|
||||
|
||||
$pos['position'] = intval($pos['position'])+1;
|
||||
|
||||
$pos['quantity'] = $pos['quantity'];
|
||||
$pos['price_netto']=format_number($pos['price_netto']);
|
||||
$pos['total_vat']=format_number($pos['total_vat']);
|
||||
$pos['ecmvat_value']=format_number($pos['ecmvat_value']);
|
||||
$pos['total_brutto']=format_number($pos['total_brutto']);
|
||||
$pos['total_netto']=format_number($pos['total_netto']);
|
||||
|
||||
|
||||
|
||||
|
||||
return $pos;
|
||||
}
|
||||
function mysql_escape_gpc($dirty)
|
||||
{
|
||||
if (ini_get('magic_quotes_gpc'))
|
||||
{
|
||||
return $dirty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return mysql_real_escape_string($dirty);
|
||||
}
|
||||
}
|
||||
19
modules/EcmAgreements/PDFTemplate/weksel.php
Executable file
19
modules/EcmAgreements/PDFTemplate/weksel.php
Executable file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
$w.='<p style="text-align: left; font-family: \'Times New Roman\';font-size: 9pt;"><span style="color: red;">
|
||||
Załącznik nr 2 do umowy pożyczki nr '.$focus->document_no.' z '.date('d.m.Y',strtotime($focus->register_date)).' rok</span></p>';
|
||||
$w.='<p style="text-align: right; font-family: \'Times New Roman\';font-size: 9pt;"><span style="color: red;">
|
||||
Zławieś Mała, dnia '.date('d.m.Y',strtotime($focus->register_date)).' rok</span></p>';
|
||||
$w.='<br><br><p style="text-align: center; font-family: \'Times New Roman\';font-size: 9pt;"><b>DEKLARACJA WEKSLOWA</b></p>';
|
||||
$w.='<br><p style="text-align: left; font-family: \'Times New Roman\';font-size: 9pt;"><span style="color: red;">'.$focus->parent_name.'</span></p>';
|
||||
$w.='<p style="text-align: left; font-family: \'Times New Roman\';font-size: 9pt;"><span style="color: red;">'.$focus->parent_address_street.', '.$focus->parent_address_postalcode. '
|
||||
'.$focus->parent_address_city.'</span></p>';
|
||||
|
||||
$w.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;"> Niniejszym składam do dyspozycji <b>BILANS B. Pietras, E. Pietras Spółce Jawnej</b> z siedzibą w Złejwsi Wielkiej weksel in blanco z mojego wystawienia – jako zabezpieczenie ewentualnych roszczeń z tytułu niewykonania lub nienależytego wykonania przeze mnie zobowiązań umownych z umowy pożyczki nr <span style="color:red;">'.$focus->document_no.' z dnia '.date('d.m.Y',strtotime($focus->register_date)).' r</span>, zawartych w Złejwsi Małej, który <b>BILANS B. Pietras, E. Pietras Spółka Jawna</b> z siedzibą w Złejwsi Wielkiej ma prawo wypełnić na sumę odpowiadającą kwocie wymagalnych zobowiązań pieniężnych z tytułu nienależytego wykonania zobowiązań Odbiorcy wobec Bilans Spółki Jawnej wraz z odsetkami, kosztami windykacji i innymi należnościami wynikającymi z konieczności dochodzenia przez wierzyciela w/w wierzytelności.</p>';
|
||||
$w.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">W przypadku niewykonania lub nienależytego wykonania przez nas zobowiązań umownych z umowy pożyczki
|
||||
<span style="color: red;">nr '.$focus->document_no.' z dnia '.date('d.m.Y',strtotime($focus->register_date)).' r,</span> <b>BILANS B. Pietras, E. Pietras Spółka Jawna</b> z siedzibą w Złejwsi Wielkiej
|
||||
ma prawo opatrzyć w/w weksel klauzulą „bez protestu” oraz datą płatności wedle swego uznania.</p>';
|
||||
$w.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">Na 7 dni przed terminem płatności <b>BILANS B. Pietras, E. Pietras Spółka Jawna</b> z siedzibą w Złejwsi Wielkiej
|
||||
zobowiązany jest powiadomić nas listem poleconym wysłanym za potwierdzeniem odbioru o wypełnieniu weksla.</p>';
|
||||
$w.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">Zobowiązuję się do poinformowania <b>BILANS B. Pietras, E. Pietras Spółkę Jawną</b> z siedzibą w Złejwsi Wielkiej o każdej zmianie naszego adresu, przy czym dwukrotne awizo pod ostatnim znanym Bogdanowi Pietrasowi adresem będzie uważane za doręczone.</p>';
|
||||
$w.='<p style="text-align: justify; font-family: \'Times New Roman\';font-size: 9pt;">Oświadczam, iż – jako wystawca weksla – poniosę koszty opłaty skarbowej od weksla.</p>';
|
||||
$w.='<br><br><table style="text-align: center; font-family: \'Times New Roman\';font-size: 9pt;width:100%;"><tr><td>Podpis poręczyciela</td><td>Podpis wystawcy weksla</td></tr></table>';
|
||||
165
modules/EcmAgreements/Save.php
Executable file
165
modules/EcmAgreements/Save.php
Executable file
@@ -0,0 +1,165 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
$json = getJSONobj();
|
||||
require_once("modules/EcmAgreements/EcmAgreement.php");
|
||||
require_once('include/formbase.php');
|
||||
$focus = new EcmAgreement();
|
||||
|
||||
|
||||
|
||||
if(isset($_POST['record']) && $_POST['record'] != '') {
|
||||
$focus->retrieve($_POST['record']);
|
||||
}
|
||||
|
||||
if(!$focus->ACLAccess('Save')){
|
||||
ACLController::displayNoAccess(true);
|
||||
sugar_cleanup(true);
|
||||
}
|
||||
$check_notify = FALSE;
|
||||
|
||||
foreach($focus->column_fields as $field){
|
||||
if(isset($_POST[$field])){
|
||||
$value = $_POST[$field];
|
||||
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
foreach($focus->additional_column_fields as $field){
|
||||
if(isset($_POST[$field])){
|
||||
$value = $_POST[$field];
|
||||
$focus->$field = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$focus->position_list = $json->decode(htmlspecialchars_decode($_POST['position_list']));
|
||||
// zapis pdf do bazy
|
||||
$pdf_margins_query = "SELECT value6 as m_top, value7 as m_bottom, value8 as m_left, value9 as m_right FROM operating_values WHERE id='" . $_REQUEST['pdf_template'] . "'";
|
||||
$pdf_margins_rs = $focus->db->query($pdf_margins_query);
|
||||
$pdf_margins = $focus->db->fetchByAssoc($pdf_margins_rs);
|
||||
$focus->save($check_notify);
|
||||
$query = "UPDATE ecmagreements SET pdf_text='" . $_REQUEST['pdf_text'] . "', pdf_margin_left='" . $pdf_margins['m_left'] . "', pdf_margin_right='" . $pdf_margins['m_right'] . "', pdf_margin_top='" . $pdf_margins['m_top'] . "', pdf_margin_bottom='" . $pdf_margins['m_bottom'] . "' WHERE id='" . $focus->id . "'";
|
||||
$focus->db->query($query);
|
||||
$return_id = $focus->id;
|
||||
// zapis dodatkowych pol
|
||||
//usuwanie starych danych
|
||||
$query = "DELETE from ecmagreements_aditional_fields_pdf where ecmagreements_id = '" . $focus->id . "'";
|
||||
$focus->db->query($query);
|
||||
//dodawanie nowych
|
||||
// pobieramy pola dodatkowe z bazy
|
||||
|
||||
$fields_to_find_query = "select * from operating_values where name ='AgreementTemplatesAditionalFields' AND module_name='EcmAgreements' and (value1 =0 OR value1 IS NULL) AND value2='" . $_REQUEST['pdf_template'] . "'";
|
||||
$result = $focus->db->query($fields_to_find_query);
|
||||
while ($row = $focus->db->fetchByAssoc($result)) {
|
||||
$fields_to_find[$row['value0']] = $row;
|
||||
}
|
||||
var_dump($_REQUEST);
|
||||
echo '<br><br>';
|
||||
foreach($fields_to_find as $key => $value){
|
||||
var_dump($key);
|
||||
echo '<br><br>';
|
||||
if(isset($_REQUEST[$key]) != ''){
|
||||
$query = "INSERT INTO ecmagreements_aditional_fields_pdf (ecmagreements_id, field_id, field_name, filed_value) VALUES ('" . $focus->id ."','" . $value['id'] ."','" . $key . "','" . $_REQUEST[$key] ."')";
|
||||
$focus->db->query($query);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
handleRedirect($return_id,'EcmAgreements');
|
||||
?>
|
||||
35
modules/EcmAgreements/createCatalogue.php
Executable file
35
modules/EcmAgreements/createCatalogue.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
error_reporting(0);
|
||||
set_time_limit (99999999);
|
||||
ini_set('memory_limit', '-1');
|
||||
include_once("modules/EcmProducts/productCardUltraNew.php");
|
||||
include_once("include/MPDF57/mpdf.php");
|
||||
$p=new mPDF('utf-8','A4-L', null, 'helvetica');
|
||||
$rr=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select c.iso4217 as s from currencies as c inner join ecmagreements as q on q.currency_id=c.id where q.id='".$_REQUEST['record']."'"));
|
||||
$symbol=$rr['s'];
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$focus = new EcmAgreement();
|
||||
$focus->retrieve($_REQUEST['record']);
|
||||
if ($focus->ecmlanguage=='pl_pl')
|
||||
$lang = "pl";
|
||||
if ($focus->ecmlanguage=='en_us')
|
||||
$lang = "en";
|
||||
|
||||
$products = $db->query("SELECT id,ecmproduct_id FROM ecmagreementitems WHERE ecmagreement_id='".$_REQUEST['record']."' AND deleted='0' ORDER BY position");
|
||||
|
||||
while ($prod = $db->fetchByAssoc($products)) {
|
||||
$p=productCardNew($p,$prod['ecmproduct_id'],$lang,true,true,"",$symbol,true, $_REQUEST['show_ean'], $prod['id'], "EcmAgreements");
|
||||
}
|
||||
|
||||
if($_REQUEST['create_img']==1){
|
||||
$guid=create_guid();
|
||||
$type="F";
|
||||
$file="cache/upload/Catalogue".$guid.".pdf";
|
||||
}
|
||||
else{
|
||||
$type="D";
|
||||
$file="Catalogue".date("YmdHi").".pdf";
|
||||
}
|
||||
$p->Output($file,$type);
|
||||
89
modules/EcmAgreements/createPDF.php
Executable file
89
modules/EcmAgreements/createPDF.php
Executable file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
if (! $_REQUEST ['record'] || $_REQUEST ['record'] == '')
|
||||
die ( 'Brak rekordu' );
|
||||
else
|
||||
$record = $_REQUEST ['record'];
|
||||
include_once ("include/MPDF57/mpdf.php");
|
||||
|
||||
if($_REQUEST['generateFromTeplate'] != ''){
|
||||
include_once ("modules/kwota.php");
|
||||
$kwota=new KwotaSlownie();
|
||||
|
||||
$focus = new EcmAgreement ();
|
||||
$focus->retrieve ( $record );
|
||||
$db = $GLOBALS ['db'];
|
||||
$q = 'SELECT pdf_text,pdf_template FROM ecmagreements WHERE id="' . $focus->id . '"';
|
||||
$rs = $db->query($q);
|
||||
$row = $db->fetchByAssoc($rs);
|
||||
$pdf_margins_query = "SELECT value6 as m_top,value7 as m_bottom, value8 as m_left, value9 as m_right FROM operating_values WHERE id='" . $row['pdf_template'] ."'";
|
||||
$pdf_margins_rs = $db->query($pdf_margins_query);
|
||||
$pdf_margins = $db->fetchByAssoc($pdf_margins_rs);
|
||||
$p = new mPDF ( '', 'A4', null, 'helvetica', $pdf_margins['m_left'], $pdf_margins['m_right'], $pdf_margins['m_top'], $pdf_margins['m_bottom'], 5, 5 );
|
||||
$p->mirrorMargins = 1;
|
||||
|
||||
|
||||
$template = html_entity_decode($row ['pdf_text']);
|
||||
|
||||
$p->WriteHTML ( $template );
|
||||
$p->Output ();
|
||||
return true;
|
||||
}else if($_REQUEST['generateFromTeplateExample'] != ''){
|
||||
include_once ("modules/kwota.php");
|
||||
$kwota=new KwotaSlownie();
|
||||
|
||||
$focus = new EcmAgreement ();
|
||||
$focus->retrieve ( $record );
|
||||
$db = $GLOBALS ['db'];
|
||||
$q= 'SELECT text0 as pdf_template,value6 as margin_top, value7 as margin_bottom, value8 as margin_left,value9 as margin_right FROM operating_values WHERE operating_values.name="AgreementTemplates" AND module_name="EcmAgreements" AND id="' . $_REQUEST['generateFromTeplateExample'] . '"';
|
||||
$rs = $db->query($q);
|
||||
$row = $db->fetchByAssoc($rs);
|
||||
|
||||
$p = new mPDF ( '', 'A4', null, 'helvetica', $row['margin_left'], $row['margin_right'], $row['margin_top'], $row['margin_bottom'], 5, 5 );
|
||||
$p->mirrorMargins = 1;
|
||||
$template = html_entity_decode($row ['pdf_template']);
|
||||
$p->WriteHTML ($template);
|
||||
$p->Output ('pdfexample.pdf', 'F');
|
||||
print ('1');
|
||||
}else{
|
||||
include_once ("modules/EcmAgreements/PDFTemplate/helper.php");
|
||||
|
||||
$focus = new EcmAgreement ();
|
||||
$focus->retrieve ( $record );
|
||||
|
||||
$user = new User ();
|
||||
$user->retrieve ( $focus->assigned_user_id );
|
||||
$labels = return_module_language($focus->ecmlanguage, 'EcmAgreements');
|
||||
|
||||
$p = new mPDF ( '', 'A4-L', null, 'helvetica', 10, 10, 20, 25, 5, 5 );
|
||||
$mpdf->mirrorMargins = 1;
|
||||
|
||||
$db = $GLOBALS ['db'];
|
||||
// document pdf
|
||||
// document already exist?
|
||||
/*
|
||||
$res = $db->query ( "SELECT footer, content FROM ecmagreement_pdf WHERE id='$record'" );
|
||||
if ($res->num_rows == 0) {
|
||||
*/
|
||||
// create and save document
|
||||
$positions = formatPDFPositions ( $focus->getPositionList ( true ), $focus );
|
||||
// get header
|
||||
$header = '';
|
||||
include_once ("modules/EcmAgreements/PDFTemplate/header.php");
|
||||
$content = '';
|
||||
include_once ("modules/EcmAgreements/PDFTemplate/content.php");
|
||||
|
||||
global $current_user,$app_list_strings;
|
||||
/*
|
||||
$db->query ( "INSERT INTO ecmagreement_pdf VALUES ('$record','$current_user->id', NOW(),'" . urlencode ( $header ) . "', '" . urlencode( $content ) . "')" );
|
||||
} else {
|
||||
$row = $db->fetchByAssoc ( $res );
|
||||
$header = urldecode ( $row ['footer'] ); // punk rock!
|
||||
$content = urldecode ( $row ['content'] );
|
||||
}*/
|
||||
//var_dump($positions);
|
||||
|
||||
$p->WriteHTML ( $content );
|
||||
//echo $content;
|
||||
// draw PDF
|
||||
$p->Output ();
|
||||
}
|
||||
236
modules/EcmAgreements/dbpost.php
Executable file
236
modules/EcmAgreements/dbpost.php
Executable file
@@ -0,0 +1,236 @@
|
||||
<?php
|
||||
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('-1');
|
||||
|
||||
if (!$_REQUEST ['job'] || $_REQUEST ['job'] == '')
|
||||
die('-1');
|
||||
|
||||
switch ($_REQUEST ['job']) {
|
||||
case 'getCodeTemplate':
|
||||
getCodeTemplate($_REQUEST['id']);
|
||||
break;
|
||||
case 'saveCodeTemplate':
|
||||
saveCodeTemplate($_REQUEST['id_template'], $_REQUEST['html_template'], $_REQUEST['aditional_fields'], $_REQUEST['margin_top'], $_REQUEST['margin_bottom'], $_REQUEST['margin_left'], $_REQUEST['margin_right']);
|
||||
break;
|
||||
case 'addSaveCodeTemplate':
|
||||
addSaveCodeTemplate($_REQUEST['label']);
|
||||
break;
|
||||
case 'removeCodeTemplate':
|
||||
removeCodeTemplate($_REQUEST['id_template']);
|
||||
break;
|
||||
case 'editLabelCodeTemplate':
|
||||
editLabelCodeTemplate($_REQUEST['label'],$_REQUEST['id_template']);
|
||||
break;
|
||||
case 'getFilledCodeTemplate':
|
||||
getFilledCodeTemplate($_REQUEST['id'], $_REQUEST['data']);
|
||||
break;
|
||||
case 'getListCodeTemplate':
|
||||
getListCodeTemplate();
|
||||
break;
|
||||
case 'getParseFields':
|
||||
getParseFields($_REQUEST['id_template']);
|
||||
break;
|
||||
default:
|
||||
print 'Nie ma takiej akcji';
|
||||
break;
|
||||
}
|
||||
|
||||
function editLabelCodeTemplate($label, $id_template){
|
||||
$db = $GLOBALS ['db'];
|
||||
$update_query = "UPDATE operating_values SET value0='" . ($label). "' WHERE id ='" . $id_template . "'";
|
||||
$db->query($update_query);
|
||||
print ("Pomyślnie zmieniono nazwę szablonu.");
|
||||
}
|
||||
|
||||
function getParseFields($id_template){
|
||||
$db = $GLOBALS ['db'];
|
||||
$parser_fields = EcmAgreement::get_parse_fields_for_pdf();
|
||||
$query = "select * from operating_values where name ='AgreementTemplatesAditionalFields' AND module_name='EcmAgreements' and (value1 =0 OR value1 IS NULL) AND value2='" . $id_template. "'";
|
||||
$result = $db->query($query);
|
||||
while($row = $db->fetchByAssoc($result)){
|
||||
$parser_fields[$row['value0']] = $row['value0'];
|
||||
}
|
||||
print json_encode($parser_fields);
|
||||
}
|
||||
|
||||
function getCodeTemplate($id) {
|
||||
$db = $GLOBALS ['db'];
|
||||
$q = 'SELECT text0 as pdf_template,value6 as margin_top, value7 as margin_bottom, value8 as margin_left,value9 as margin_right FROM operating_values WHERE operating_values.name="AgreementTemplates" AND module_name="EcmAgreements" AND id="' . $id . '"';
|
||||
$rs = $db->query($q);
|
||||
$row = $db->fetchByAssoc($rs);
|
||||
$row['pdf_template'] = html_entity_decode($row['pdf_template']);
|
||||
$query = "select * from operating_values where name ='AgreementTemplatesAditionalFields' AND module_name='EcmAgreements' and (value1 =0 OR value1 IS NULL) AND value2='" . $id. "'";
|
||||
$result = $db->query($query);
|
||||
//$row['aditional_fields'] = $query;
|
||||
while($roww = $db->fetchByAssoc($result)){
|
||||
$row['aditional_fields'][] = $roww;
|
||||
}
|
||||
|
||||
print json_encode($row);
|
||||
}
|
||||
|
||||
function getListCodeTemplate(){
|
||||
$db = $GLOBALS ['db'];
|
||||
$get_saved_templates_query = "SELECT id AS id,value0 AS template_name FROM operating_values WHERE name='AgreementTemplates' AND module_name='EcmAgreements' AND value1=0 ORDER BY value0";
|
||||
$get_saved_templates_result = $db->query($get_saved_templates_query);
|
||||
$get_saved_templates_array = array();
|
||||
while($row = $db->fetchByAssoc($get_saved_templates_result)){
|
||||
$get_saved_templates_array[$row['id']] = $row['template_name'];
|
||||
}
|
||||
|
||||
print json_encode($get_saved_templates_array);
|
||||
}
|
||||
|
||||
function getFilledCodeTemplate($id, $fill_data){
|
||||
global $current_language;
|
||||
$app_list_strings = return_app_list_strings_language ( $current_language );
|
||||
$db = $GLOBALS ['db'];
|
||||
include_once ("modules/kwota.php");
|
||||
$kwota=new KwotaSlownie();
|
||||
$q = 'SELECT text0, value6 as margin_top, value7 as margin_bottom, value8 as margin_left,value9 as margin_right FROM operating_values WHERE operating_values.name="AgreementTemplates" AND module_name="EcmAgreements" AND id="' . $id . '"';
|
||||
$rs = $db->query($q);
|
||||
$margins = $db->fetchByAssoc($rs);
|
||||
$template = $margins['text0'];
|
||||
$parser_fields = EcmAgreement::get_parse_fields_for_pdf();
|
||||
|
||||
foreach($parser_fields as $key => $value){
|
||||
$pos = strpos($template, '$' . $key .'$');
|
||||
if ($pos !== false) {
|
||||
switch($key){
|
||||
case 'toStringAmount':
|
||||
if($fill_data['amount']==''){
|
||||
break;
|
||||
}
|
||||
$str = str_replace(".","",$fill_data['amount']);
|
||||
$str = str_replace(",",".",$str);
|
||||
$str = $kwota->convertPrice(floatval ($str));
|
||||
$template = str_replace('$' . $key .'$', $str, $template );
|
||||
break;
|
||||
case 'type':
|
||||
$template = str_replace('$' . $key .'$', $app_list_strings['ecmagreements_type_dom'][$fill_data['type']], $template );
|
||||
break;
|
||||
case 'status':
|
||||
$template = str_replace('$' . $key .'$', $app_list_strings['ecmagreements_status_dom'][$fill_data['status']], $template );
|
||||
break;
|
||||
case 'pagebreak':
|
||||
$template = str_replace('$' . $key .'$', '<pagebreak />', $template );
|
||||
break;
|
||||
default:
|
||||
$template = str_replace('$' . $key .'$', $fill_data[$key],$template );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$aditional_fields_query = 'SELECT value0 FROM operating_values WHERE operating_values.name="AgreementTemplatesAditionalFields" AND operating_values.module_name="EcmAgreements" AND operating_values.value2="' . $id . '"';
|
||||
|
||||
$aditional_fields_rs = $db->query($aditional_fields_query);
|
||||
while($row = $db->fetchByAssoc($aditional_fields_rs)){
|
||||
$pos = strpos($template, '$' . $row['value0'] .'$');
|
||||
if ($pos !== false) {
|
||||
switch($key){
|
||||
default:
|
||||
$template = str_replace('$' . $row['value0'] .'$', $fill_data[$row['value0']],$template );
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print html_entity_decode($template);
|
||||
print $template;
|
||||
|
||||
include_once ("include/MPDF57/mpdf.php");
|
||||
$p = new mPDF ( '', 'A4', null, 'helvetica', $margins['margin_left'], $margins['margin_right'], $margins['margin_top'], $margins['margin_bottom'], 5, 5 );
|
||||
$p->mirrorMargins = 1;
|
||||
$p->WriteHTML ($template);
|
||||
$p->Output ('Agreement.pdf', 'F');
|
||||
}
|
||||
|
||||
function saveCodeTemplate($id_template, $html_template, $aditional_fields, $margin_top, $margin_bottom, $margin_left, $margin_right){
|
||||
$db = $GLOBALS ['db'];
|
||||
$update_query = "UPDATE operating_values SET text0='" . ($html_template). "', value6='" . $margin_top ."', value7='" . $margin_bottom ."', value8='" . $margin_left ."', value9='" . $margin_right ."' WHERE id ='" . $id_template . "'";
|
||||
$db->query($update_query);
|
||||
|
||||
foreach($aditional_fields as $key => $field){
|
||||
foreach ($field as $k => $v){
|
||||
if($v==''){
|
||||
unset($field[$k]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$saved_records_query = "SELECT * FROM operating_values WHERE name='AgreementTemplatesAditionalFields' AND value2='" . $id_template . "'";
|
||||
$saved_records_results = $db->query($saved_records_query);
|
||||
$saved_records = array();
|
||||
while($row = $db->fetchByAssoc($saved_records_results)){
|
||||
$saved_records[$row['id']] = $row;
|
||||
}
|
||||
//Zapis nowych rekordow do bazy
|
||||
$allQuery = '';
|
||||
foreach($aditional_fields as $indeks => $value){
|
||||
|
||||
|
||||
//Sprwadzam czy jest już może w bazie
|
||||
if(isset($saved_records[$value['id']])){
|
||||
// jak tak to robie update
|
||||
$query = "UPDATE operating_values SET value0 = '" . $value['value0'] . "'";
|
||||
$query .= ", value3 = '" . $value['value3'] . "' WHERE id = '" . $value['id'] . "';";
|
||||
// i usuwam z listy do usuniecia
|
||||
$allQuery .= $query;
|
||||
unset($saved_records[$value['id']]);
|
||||
}else{
|
||||
//jak nie to dodaje
|
||||
$value['value1'] = '0';
|
||||
$keys = array_keys ($value);
|
||||
$values = array_values($value);
|
||||
|
||||
$query = "INSERT INTO operating_values (" . implode(",", $keys) . ") VALUES ('" . implode("','", $values) ."');";
|
||||
$allQuery .= $query;
|
||||
}
|
||||
//zapis do bazy
|
||||
$db->query($query);
|
||||
}
|
||||
//usuwamy niepotrzebne rekordy z bazy
|
||||
if(count($saved_records)>0){
|
||||
$delete_query = "UPDATE operating_values SET value1 = '1' WHERE id IN ('";
|
||||
$delete_id_array = null;
|
||||
foreach($saved_records as $indeks => $value){
|
||||
$delete_id_array[] = $value['id'];
|
||||
}
|
||||
$values = array_values ($delete_id_array);
|
||||
$delete_query .= implode("','" ,$values) . "');";
|
||||
$allQuery .= $delete_query;
|
||||
$db->query($delete_query);
|
||||
}
|
||||
print ($allQuery);
|
||||
}
|
||||
|
||||
function addSaveCodeTemplate($label){
|
||||
$db = $GLOBALS ['db'];
|
||||
$count_query = "SELECT count(*) as count FROM operating_values WHERE value0='" . ($label). "' AND operating_values.name='AgreementTemplates' AND module_name='EcmAgreements' AND value1=0";
|
||||
$rs =$db->query($count_query);
|
||||
$row = $db->fetchByAssoc($rs);
|
||||
if($row['count'] > 0){
|
||||
print 1;
|
||||
return;
|
||||
}
|
||||
$insert_query = "INSERT INTO operating_values (name,module_name,value0,value1,value6,value7,value8,value9) VALUES ('AgreementTemplates', 'EcmAgreements','" .$label ."', 0,20,20,20,20)";
|
||||
$rs =$db->query($insert_query);
|
||||
$id_query = "SELECT id FROM operating_values WHERE name='AgreementTemplates' AND module_name='EcmAgreements' AND value1=0 AND value0='" .$label ."'";
|
||||
$rs =$db->query($id_query);
|
||||
$row = $db->fetchByAssoc($rs);
|
||||
print($row['id']);
|
||||
return;
|
||||
}
|
||||
|
||||
function removeCodeTemplate($id_template){
|
||||
$db = $GLOBALS ['db'];
|
||||
$delete_query = "UPDATE operating_values SET value1=1 WHERE id='" . ($id_template). "'";
|
||||
$rs =$db->query($delete_query);
|
||||
print("Usunięto szablon.");
|
||||
return;
|
||||
}
|
||||
|
||||
?>
|
||||
52
modules/EcmAgreements/drawAgreement.php
Executable file
52
modules/EcmAgreements/drawAgreement.php
Executable file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
if (! $_REQUEST ['record'] || $_REQUEST ['record'] == '')
|
||||
die ( 'Brak rekordu' );
|
||||
else
|
||||
$record = $_REQUEST ['record'];
|
||||
|
||||
include_once ("modules/EcmAgreements/PDFTemplate/helper.php");
|
||||
|
||||
$focus = new EcmAgreement ();
|
||||
$focus->retrieve ( $record );
|
||||
|
||||
$user = new User ();
|
||||
$user->retrieve ( $focus->assigned_user_id );
|
||||
$labels = return_module_language($focus->ecmlanguage, 'EcmAgreements');
|
||||
include_once ("include/MPDF57/mpdf.php");
|
||||
$p = new mPDF ( '', 'A4', null, 'Times New Roman', 18, 18, 20, 25, 5, 5 );
|
||||
$mpdf->mirrorMargins = 1;
|
||||
|
||||
$db = $GLOBALS ['db'];
|
||||
// document pdf
|
||||
// document already exist?
|
||||
/*
|
||||
$res = $db->query ( "SELECT footer, content FROM ecmagreement_pdf WHERE id='$record'" );
|
||||
if ($res->num_rows == 0) {
|
||||
*/
|
||||
// create and save document
|
||||
// $positions = formatPDFPositions ( $focus->getPositionList ( true ), $focus );
|
||||
// get header
|
||||
$header = '';
|
||||
include_once ("modules/EcmAgreements/PDFTemplate/header.php");
|
||||
$content = '';
|
||||
include_once ("modules/EcmAgreements/PDFTemplate/agreement_content.php");
|
||||
include_once ("modules/EcmAgreements/PDFTemplate/weksel.php");
|
||||
global $current_user,$app_list_strings;
|
||||
/*
|
||||
$db->query ( "INSERT INTO ecmagreement_pdf VALUES ('$record','$current_user->id', NOW(),'" . urlencode ( $header ) . "', '" . urlencode( $content ) . "')" );
|
||||
} else {
|
||||
$row = $db->fetchByAssoc ( $res );
|
||||
$header = urldecode ( $row ['footer'] ); // punk rock!
|
||||
$content = urldecode ( $row ['content'] );
|
||||
}*/
|
||||
//var_dump($positions);
|
||||
|
||||
$p->WriteHTML ( $content );
|
||||
$p->AddPage();
|
||||
// weksel
|
||||
$p->WriteHTML ( $w );
|
||||
//echo $content;
|
||||
// draw PDF
|
||||
|
||||
$p->Output ();
|
||||
|
||||
6
modules/EcmAgreements/import.php
Executable file
6
modules/EcmAgreements/import.php
Executable file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
include_once ("modules/kwota.php");
|
||||
$kwota=new KwotaSlownie();
|
||||
echo $kwota->convertPrice('100.23');
|
||||
?>
|
||||
1
modules/EcmAgreements/javahelper.php
Executable file
1
modules/EcmAgreements/javahelper.php
Executable file
@@ -0,0 +1 @@
|
||||
<?php require_once('modules/EcmAgreements/javascript/helper.php');
|
||||
358
modules/EcmAgreements/javascript/helper.php
Executable file
358
modules/EcmAgreements/javascript/helper.php
Executable file
@@ -0,0 +1,358 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('-1');
|
||||
if (!$_POST['job'] || $_POST['job']=='') die ('-1');
|
||||
switch ($_POST['job']) {
|
||||
case 'getParentInfo': getParentInfo($_POST['id'], $_POST['type']); break;
|
||||
case 'generateNumber': generateNumber($_POST['stock_id']); break;
|
||||
case 'generateNumberCorrect': generateNumberCorrect(); break;
|
||||
case 'searchProducts': searchProducts($_POST['searchKey'], $_POST['searchCategory'], $_POST['searchStock'], $_POST['searchSort']); break;
|
||||
case 'getProduct': getProduct($_POST['id'], $_POST['pricebook'], $_POST['account_id'], $_POST['language']); break;
|
||||
case 'getItems': getItems($_POST['record'],$_POST['type']); break;
|
||||
case 'getItemsFromWZ': getItemsFromWZ($_POST['record'],$_POST['type']); break;
|
||||
case 'getCategoriesList': getCategoriesList(); break;
|
||||
case 'getTranslation': getTranslation($_POST['product_id'], $_POST['language'], $_REQUEST['unit_id']); break;
|
||||
case 'getPricesInfo': getPricesInfo($_POST['product_id'], $_POST['pricebook_id'], $_POST['account_id']); break;
|
||||
case 'getStockArray' : getStockArray($_POST['product_id']); break;
|
||||
case 'getPurchaseArray' : getPurchaseArray($_POST['product_id']); break;
|
||||
case 'getAddresses' : getAddresses($_POST['account_id']);break;
|
||||
case 'getPayers' : getPayers($_POST['account_id']);break;
|
||||
case 'getPayer' : getPayers($_POST['account_id']);break;
|
||||
case 'getAddress' : getAddress($_POST['account_id']);break;
|
||||
case 'getNBPCurrencyExchange' : getNBPCurrencyExchange($_POST['c_id'],$_POST['date']);break;
|
||||
case 'calculatePaymentDate' : calculatePaymentDate($_POST['pid'],$_POST['date']);break;
|
||||
}
|
||||
|
||||
function calculatePaymentDate($pid,$d){
|
||||
|
||||
global $timedate;
|
||||
|
||||
$w = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select days from ecmpaymentconditions where id='".$pid."'"));
|
||||
$date = new DateTime($d);
|
||||
$date->add(new DateInterval('P'.$w['days'].'D'));
|
||||
echo json_encode($date->format('d.m.Y'));return;
|
||||
}
|
||||
|
||||
function getNBPCurrencyExchange($c_id,$d){
|
||||
|
||||
global $timedate;
|
||||
$d = explode('-',reset(explode(" ",$timedate->to_db($d))));
|
||||
$date = date("Y-m-d",@mktime(0,0,0,$d[1],$d[2],$d[0])+3600*24);
|
||||
|
||||
//what day is it?
|
||||
$dn = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("SELECT DAYNAME('$date') as dayname"));
|
||||
|
||||
|
||||
if ($dn['dayname'] == 'Sunday') //- 2 days
|
||||
$q = "SELECT value FROM currency_nbp_archive WHERE currency_id='$c_id' AND date = DATE_ADD('$date', INTERVAL -2 DAY)";
|
||||
elseif ($dn['dayname'] == 'Saturday') //- 1 day
|
||||
$q = "SELECT value FROM currency_nbp_archive WHERE currency_id='$c_id' AND date = DATE_ADD('$date', INTERVAL -1 DAY)";
|
||||
else //any other day - just get exchange
|
||||
$q = "SELECT value FROM currency_nbp_archive WHERE currency_id='$c_id' AND date='$date'";
|
||||
|
||||
$w = $GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query($q));
|
||||
|
||||
echo $w['value']; return;
|
||||
}
|
||||
function getAddress($account_id){
|
||||
$a=new Account();
|
||||
echo json_encode($a->getAddress($account_id));
|
||||
unset($a);
|
||||
return;
|
||||
}
|
||||
function getPayer($account_id){
|
||||
$a=new Account();
|
||||
echo json_encode($a->getAddress($account_id));
|
||||
unset($a);
|
||||
return;
|
||||
}
|
||||
function getAddresses($account_id){
|
||||
$a=new Account();
|
||||
|
||||
echo json_encode($a->getAddresses($account_id));
|
||||
unset($a);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
function getPayers($account_id){
|
||||
$a=new Account();
|
||||
|
||||
echo json_encode($a->getPayers($account_id));
|
||||
unset($a);
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
function getParentInfo($id, $type) {
|
||||
if (!$id || $id == '') die('-1');
|
||||
if (!$type || $type == '') die('-1');
|
||||
|
||||
if ($type == 'Accounts')
|
||||
$a = new Account();
|
||||
elseif ($type == 'Leads')
|
||||
$a = new Lead();
|
||||
else
|
||||
die(-1);
|
||||
|
||||
$a->retrieve($id);
|
||||
$data = array();
|
||||
$data['name'] =html_entity_decode($a->name);
|
||||
$data['parent_nip'] = $a->to_vatid;
|
||||
$data['parent_address_street'] = $a->register_address_street;
|
||||
$data['parent_address_postalcode'] = $a->register_address_postalcode;
|
||||
$data['parent_address_city'] = $a->register_address_city;
|
||||
$data['parent_address_country'] = $a->register_address_country;
|
||||
$data['invoice_type'] = $a->invoice_type;
|
||||
$data['currency_id'] = $a->currency_id;
|
||||
$data['parent_regon'] = $a->regon;
|
||||
if ($a->ecmpaymentcondition_id && $a->ecmpaymentcondition_id!='') {
|
||||
$pc = new EcmPaymentCondition();
|
||||
$pc->retrieve($a->ecmpaymentcondition_id);
|
||||
$data['ecmpaymentcondition_id'] = $pc->id;
|
||||
$data['ecmpaymentcondition_name'] = $pc->name;
|
||||
}
|
||||
if ($a->ecmdeliverycondition_id && $a->ecmdeliverycondition_id!='') {
|
||||
$pc = new EcmdeliveryCondition();
|
||||
$pc->retrieve($a->ecmdeliverycondition_id);
|
||||
$data['ecmdeliverycondition_id'] = $pc->id;
|
||||
$data['ecmdeliverycondition_name'] = $pc->name;
|
||||
}
|
||||
|
||||
if ($a->ecmprice_id && $a->ecmprice_id!='') {
|
||||
$pr = new EcmPrice();
|
||||
$pr->retrieve($a->ecmprice_id);
|
||||
$data['ecmprice_id'] = $pr->id;
|
||||
$data['ecmprice_name'] = $pr->name;
|
||||
}
|
||||
//get pricebooks, ownership pricebooks
|
||||
$pricebooks = array();
|
||||
$db=$GLOBALS['db'];
|
||||
$res = $db->query("SELECT id, name FROM ecmpricebooks WHERE account_id IN ('".$a->id."','".$a->parent_id."') AND active='1' AND deleted='0'");
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$tmp = array();
|
||||
$tmp['id'] = $row['id'];
|
||||
$tmp['name'] = $row['name'];
|
||||
$pricebooks[] = $tmp;
|
||||
unset($tmp);
|
||||
}
|
||||
$data['pricebooks'] = $pricebooks;
|
||||
echo json_encode($data);
|
||||
unset($data);
|
||||
unset($a);
|
||||
unset($res);
|
||||
return;
|
||||
}
|
||||
function generateNumber($stock_id) {
|
||||
$data = array();
|
||||
$data['number'] = EcmAgreement::generateNumber();
|
||||
$data['document_no'] = EcmAgreement::formatNumber($data['number']);
|
||||
echo json_encode($data);
|
||||
unset($data);
|
||||
return;
|
||||
}
|
||||
|
||||
function generateNumberCorrect() {
|
||||
$data = array();
|
||||
$data['number'] = EcmAgreement::generateNumberCorrect();
|
||||
$data['document_no'] = EcmAgreement::formatNumberCorrect($data['number']);
|
||||
echo json_encode($data);
|
||||
unset($data);
|
||||
return;
|
||||
}
|
||||
|
||||
function searchProducts($searchKey, $searchCategory, $searchStock, $searchSort) {
|
||||
|
||||
$db = $GLOBALS['db'];
|
||||
$q = "SELECT id, code, name FROM ecmproducts WHERE
|
||||
(UPPER(code) LIKE '%$searchKey%' OR
|
||||
UPPER(name) LIKE '%$searchKey%')
|
||||
AND deleted='0' ";
|
||||
if ($searchCategory && $searchCategory!="")
|
||||
$q.="AND product_category_id='$searchCategory' ";
|
||||
|
||||
if ($searchSort=='1')
|
||||
$q.="ORDER BY code";
|
||||
else if ($searchSort=='2')
|
||||
$q.="ORDER BY code DESC";
|
||||
else if ($searchSort=='3')
|
||||
$q.="ORDER BY name";
|
||||
else if ($searchSort=='4')
|
||||
$q.="ORDER BY name DESC";
|
||||
|
||||
$q.=" LIMIT 0,50";
|
||||
|
||||
$res = $db->query($q);
|
||||
$result = array();
|
||||
|
||||
if ($searchStock!='1') {
|
||||
//get main stock id
|
||||
$stock_res = $db->fetchByAssoc($db->query("SELECT id FROM ecmstocks WHERE main='1' LIMIT 0,1"));
|
||||
$stock_id = $stock_res['id'];
|
||||
}
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$tmp = array();
|
||||
$tmp['id'] = $row['id'];
|
||||
$tmp['name'] = $row['name'];
|
||||
$tmp['code'] = $row['code'];
|
||||
|
||||
//get stock if necessary
|
||||
if ($searchStock!='1') {
|
||||
$tmp['stock_state'] = EcmStockOperation::getStock($row['id'], $stock_id);
|
||||
}
|
||||
|
||||
if ($searchStock=='3' && $tmp['stock_state']==0) continue; //don't show null stock
|
||||
|
||||
$result[] = $tmp;
|
||||
}
|
||||
echo json_encode($result);
|
||||
return;
|
||||
}
|
||||
|
||||
function getProduct($id, $pricebook_id, $account_id, $language) {
|
||||
$db = $GLOBALS['db'];
|
||||
$p = $db->fetchByAssoc($db->query("SELECT p.id, p.code, p.name, v.id as ecmvat_id, v.name as ecmvat_name, v.value as ecmvat_value, p.ean, p.ean2, p.unit_id FROM ecmproducts as p INNER JOIN ecmvats as v ON v.id=p.vat_id WHERE p.id='$id'"));
|
||||
global $app_list_strings;
|
||||
$p['unit_name'] = $app_list_strings['ecmproducts_unit_dom'][$p['unit_id']];
|
||||
//try get recipient_code and price from pricebook
|
||||
if ($pricebook_id && $pricebook_id!='') {
|
||||
$pr = $db->fetchByAssoc($db->query("SELECT price, recipient_code FROM ecmpricebooks_ecmproducts WHERE ecmpricebook_id='$pricebook_id' AND ecmproduct_id='$id' AND deleted='0'"));
|
||||
$p['price_start'] = $pr['price'];
|
||||
$p['recipient_code'] = $pr['recipient_code'];
|
||||
}
|
||||
if (!$p['price_start'] || floatval($p['price_start'])==0) {
|
||||
//try price from default prices
|
||||
$pr = $db->fetchByAssoc($db->query("SELECT pp.price FROM ecmprices_ecmproducts AS pp INNER JOIN ecmprices AS p ON pp.ecmprice_id=p.id INNER JOIN accounts AS a ON p.id=a.ecmprice_id WHERE a.id='$account_id' AND pp.ecmproduct_id='$id'"));
|
||||
$p['price_start'] = $pr['price'];
|
||||
}
|
||||
|
||||
if ($language=='en_us') {
|
||||
$r = $db->fetchByAssoc($db->query("SELECT short_description FROM ecmproduct_language WHERE ecmproduct_id='$id' AND language='en'"));
|
||||
$p['name'] = htmlspecialchars_decode($r['short_description']);
|
||||
|
||||
$lists = return_app_list_strings_language($language);
|
||||
$p['unit_name'] = $lists['ecmproducts_unit_dom'][$p['unit_id']];
|
||||
unset($lists);
|
||||
}
|
||||
echo json_encode($p);
|
||||
return;
|
||||
}
|
||||
|
||||
function getItems($record,$type) {
|
||||
$of = new EcmAgreement();
|
||||
$of->retrieve($record);
|
||||
$pl = $of->getPositionList(true,$type);
|
||||
unset($of);
|
||||
echo json_encode($pl);
|
||||
return;
|
||||
}
|
||||
|
||||
function getItemsFromWZ($record,$type) {
|
||||
$of = new EcmStockDocOut();
|
||||
$of->retrieve($record);
|
||||
$pl = $of->getPositionList(true);
|
||||
unset($of);
|
||||
echo json_encode($pl);
|
||||
return;
|
||||
}
|
||||
|
||||
function getCategoriesList() {
|
||||
$db = $GLOBALS['db'];
|
||||
$res = $db->query("SELECT id, name FROM ecmproductcategories WHERE deleted='0'");
|
||||
$result = array();
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$tmp = array();
|
||||
$tmp['id'] = $row['id'];
|
||||
$tmp['name'] = $row['name'];
|
||||
$result[] = $tmp;
|
||||
}
|
||||
echo json_encode($result);
|
||||
return;
|
||||
}
|
||||
|
||||
function getTranslation($product_id, $language, $unit_id) {
|
||||
$db = $GLOBALS['db'];
|
||||
$result = array();
|
||||
if ($language=='en_us') {
|
||||
$r = $db->fetchByAssoc($db->query("SELECT short_description FROM ecmproduct_language WHERE ecmproduct_id='$product_id' AND language='en'"));
|
||||
$result['name'] = htmlspecialchars_decode($r['short_description']);
|
||||
} else if ($language=='pl_pl') {
|
||||
$p = new EcmProduct();
|
||||
$p->retrieve($product_id);
|
||||
$result['name'] = htmlspecialchars_decode($p->name);
|
||||
unset($p);
|
||||
}
|
||||
$lists = return_app_list_strings_language($language);
|
||||
$result['unit_name'] = $lists['ecmproducts_unit_dom'][$unit_id];
|
||||
unset($lists);
|
||||
|
||||
echo json_encode($result);
|
||||
return;
|
||||
}
|
||||
|
||||
function getPricesInfo($product_id, $pricebook_id, $account_id) {
|
||||
$db = $GLOBALS['db'];
|
||||
|
||||
$result = array();
|
||||
if ($pricebook_id && $pricebook_id!='') {
|
||||
//try get price from pricebook
|
||||
$res = $db->fetchByAssoc($db->query("SELECT price FROM ecmpricebooks_ecmproducts WHERE ecmpricebook_id='$pricebook_id' AND ecmproduct_id='$product_id' AND deleted='0'"));
|
||||
if ($res['price'] && $res['price']!='' && $res['price']!=0) {
|
||||
$tmp = array();
|
||||
$tmp['name'] = 'pricebook';
|
||||
$tmp['price'] = $res['price'];
|
||||
$result[] = $tmp;
|
||||
}
|
||||
}
|
||||
|
||||
//get from ecmprices
|
||||
$res = $db->query("SELECT p.name, pp.price FROM ecmprices_ecmproducts AS pp
|
||||
INNER JOIN ecmprices AS p
|
||||
ON p.id=pp.ecmprice_id
|
||||
WHERE
|
||||
pp.ecmproduct_id='$product_id'
|
||||
AND pp.price!=0");
|
||||
while ($row = $db->fetchByAssoc($res)) {
|
||||
$tmp = array();
|
||||
$tmp['name'] = $row['name'];
|
||||
$tmp['price'] = $row['price'];
|
||||
$result[] = $tmp;
|
||||
}
|
||||
|
||||
//get last invoice price
|
||||
if ($account_id && $account_id!='') {
|
||||
$res = $db->fetchByAssoc($db->query("SELECT ii.subprice, i.id, i.document_no FROM ecmagreementitems AS ii
|
||||
INNER JOIN ecmagreements AS i
|
||||
ON ii.ecmagreement_id=i.id
|
||||
WHERE ii.ecmproduct_id='$product_id'
|
||||
AND i.parent_id='$account_id'
|
||||
AND ii.deleted='0'
|
||||
AND i.deleted='0'
|
||||
AND i.canceled='0'
|
||||
ORDER BY i.register_date DESC
|
||||
LIMIT 0,1"));
|
||||
if ($res && $res['subprice']!='') {
|
||||
$tmp = array();
|
||||
$tmp['name'] = $res['document_no'];
|
||||
$tmp['price'] = $res['subprice'];
|
||||
$result[] = $tmp;
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode($result);
|
||||
return;
|
||||
}
|
||||
|
||||
function getStockArray($product_id) {
|
||||
$o = new EcmStockOperation();
|
||||
echo json_encode($o->getStockArray($product_id));
|
||||
unset($o);
|
||||
return;
|
||||
}
|
||||
|
||||
function getPurchaseArray($product_id) {
|
||||
$o = new EcmStockOperation();
|
||||
echo json_encode($o->getPurchaseArray($product_id));
|
||||
unset($o);
|
||||
return;
|
||||
}
|
||||
|
||||
446
modules/EcmAgreements/language/en_us.lang.php
Executable file
446
modules/EcmAgreements/language/en_us.lang.php
Executable file
@@ -0,0 +1,446 @@
|
||||
<?php
|
||||
if (! defined ( 'sugarEntry' ) || ! sugarEntry)
|
||||
die ( 'Not A Valid Entry Point' );
|
||||
|
||||
/**
|
||||
* ***************************************************************************
|
||||
*
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
*
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
*
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
*
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
*
|
||||
* either express or implied.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You may:
|
||||
*
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
*
|
||||
* a royalty or other fee.
|
||||
*
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
*
|
||||
* publicly available and document your modifications clearly.
|
||||
*
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
*
|
||||
* obligations for your customers.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You may NOT:
|
||||
*
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
*
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
*
|
||||
* Provider).
|
||||
*
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
*
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
*
|
||||
* involves PHYSICAL media.
|
||||
*
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
*
|
||||
* or License text in the Licensed Software
|
||||
*
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
*
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
*
|
||||
* Licensed Software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You must:
|
||||
*
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
*
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
*
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
*
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
*
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
*
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
*
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
*
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
*
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
*
|
||||
* Olavo Farias
|
||||
*
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
*
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
*
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ******************************************************************************
|
||||
*/
|
||||
|
||||
$mod_strings = array (
|
||||
'LBL_BTN_CREATE_ZS' => 'Create ZS',
|
||||
'LBL_ECMPRICE' => 'B2B Prices',
|
||||
'LBL_SEARCH' => 'Search',
|
||||
'LBL_CATEGORY' => 'Category',
|
||||
'LBL_PDF_TEXT' => 'PDF Text',
|
||||
'LBL_PARENT_NIP' => 'VAT ID',
|
||||
'LBL_NO_TAX' => 'No tax',
|
||||
'LBL_PDF_DOCUMENT_NAME' => 'Quote',
|
||||
'LBL_SITE' => 'Site',
|
||||
'LBL_SHOW_EAN' => 'Show EAN',
|
||||
'LBL_SHOW_EAN2' => 'Show EAN2',
|
||||
// added 05.02.2009
|
||||
'LBL_QUOTE_XLS' => 'Create XLS',
|
||||
'LBL_QUOTE_XLS_BUTTON_KEY' => 'Show XLS [Alt+X]',
|
||||
'LBL_QUOTE_XLS_BUTTON_TITLE' => 'Show Quote in XLS file.',
|
||||
// added 01.09.2009
|
||||
'LBL_PRICEBOOK' => 'Price Book',
|
||||
// added 05.08.2009
|
||||
'LBL_CURRENCY' => 'Currency',
|
||||
'LBL_DETAIL_BUTTON' => 'Details',
|
||||
// added 15.07.2009
|
||||
'LBL_EDITTABLE_UNIT' => 'Unit',
|
||||
// added 09.02.2009
|
||||
'LBL_SHOW_IMAGES_ON_OFFERS' => 'Show images on offers',
|
||||
'LBL_SHOW_RECIPIENT_CODE' => 'Show recipient code',
|
||||
|
||||
// FOR SYSTEM USE
|
||||
|
||||
'LBL_MODULE_NAME' => 'Quotes',
|
||||
|
||||
'LBL_MODULE_TITLE' => 'Quotes: Home',
|
||||
|
||||
'LBL_MODULE_ID' => 'EcmAgreements',
|
||||
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Quotes Search',
|
||||
|
||||
'LBL_LIST_FORM_TITLE' => 'Quotes List',
|
||||
|
||||
'LBL_NEW_FORM_TITLE' => 'New Quote',
|
||||
|
||||
'LBL_DETAILS' => 'Quote details:',
|
||||
|
||||
'LBL_ITEMS' => 'Items included:',
|
||||
|
||||
'LBL_TEXTS' => 'Texts to PDF:',
|
||||
|
||||
'LBL_PREVIEW' => 'Preview PDF:',
|
||||
|
||||
'LBL_EMAIL' => 'Create Email:',
|
||||
|
||||
'LBL_TO_INFORMATIONS' => 'To Informations:',
|
||||
|
||||
'LBL_DETAILS_TAB' => 'Details',
|
||||
|
||||
'LBL_ITEMS_TAB' => 'Items',
|
||||
|
||||
'LBL_TEXTS_TAB' => 'Texts',
|
||||
|
||||
'LBL_PREVIEW_TAB' => 'Preview',
|
||||
|
||||
'LBL_EMAIL_TAB' => 'Email',
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
|
||||
'LBL_NAME' => 'Name',
|
||||
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
|
||||
'LBL_DATE_ENTERED' => 'Date Entered',
|
||||
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified',
|
||||
|
||||
'LBL_MODIFIED' => 'Last Modified',
|
||||
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned To',
|
||||
|
||||
'LBL_ASSIGNED_TO' => 'Assigned To',
|
||||
|
||||
'LBL_CREATED' => 'Created by',
|
||||
|
||||
'LBL_CREATED_BY_USER' => 'Created by',
|
||||
|
||||
'LBL_MODIFIED_BY_USER' => 'Modified by',
|
||||
|
||||
'LBL_ASSIGNED_TO_USER' => 'Assigned To',
|
||||
|
||||
'LBL_DELETED_BY' => 'Deleted by',
|
||||
|
||||
'LBL_NUMBER' => 'Number',
|
||||
|
||||
'LBL_DOCUMENT_NO' => 'Number',
|
||||
|
||||
'LBL_PARENT' => 'To',
|
||||
|
||||
'LBL_PARENT_NAME' => 'Account',
|
||||
|
||||
'LBL_PARENT_ID' => 'Account Id',
|
||||
|
||||
'LBL_TYPE' => 'Type',
|
||||
|
||||
'LBL_ECMQUOTE_ID' => 'Quote Id',
|
||||
|
||||
'LBL_ECMQUOTE_NAME' => 'Quote Name',
|
||||
|
||||
'LBL_STATUS' => 'Status',
|
||||
|
||||
'LBL_REGISTER_DATE' => 'Document Date',
|
||||
|
||||
'LBL_SELL_DATE' => 'Sell Date',
|
||||
|
||||
'LBL_PAYMENT_DATE' => 'Payment Date',
|
||||
|
||||
'LBL_PARENT_ADDRESS_STREET' => 'Street',
|
||||
|
||||
'LBL_PARENT_ADDRESS_CITY' => 'Postalcode / City',
|
||||
|
||||
'LBL_PARENT_ADDRESS_POSTALCODE' => 'Postalcode',
|
||||
|
||||
'LBL_PARENT_ADDRESS_COUNTRY' => 'Country',
|
||||
|
||||
'LBL_TO_VATID' => 'VAT-ID',
|
||||
|
||||
'LBL_TO_IS_VAT_FREE' => 'Is VAT Free?',
|
||||
|
||||
'LBL_HEADER_TEXT' => 'Header Text',
|
||||
|
||||
'LBL_FOOTER_TEXT' => 'Footer Text',
|
||||
|
||||
'LBL_ADS_TEXT' => 'Ads Text',
|
||||
|
||||
'LBL_SUBTOTAL' => 'Subtotal',
|
||||
|
||||
'LBL_TOTAL' => 'Total',
|
||||
|
||||
'LBL_DISCOUNT' => 'Discount',
|
||||
|
||||
'LBL_VAT' => 'VAT',
|
||||
|
||||
'LBL_ACCEPTED' => 'Accepted',
|
||||
|
||||
'LBL_TEMPLATE_ID' => 'Template Id',
|
||||
|
||||
'LBL_TEMPLATE_NAME' => 'Template',
|
||||
|
||||
'LBL_PAYMENTCONDITION_NAME' => 'Payment Condition',
|
||||
'LBL_PAYMENTCONDITION_ID' => 'Payment Condition ID',
|
||||
|
||||
'LBL_DELIVERYCONDITION_NAME' => 'Delivery Condition',
|
||||
'LBL_DELIVERYCONDITION_ID' => 'Delivery Condition ID',
|
||||
|
||||
'LBL_FORMAT_NUMBER_ERROR' => 'Format Number Error!',
|
||||
|
||||
'LBL_SAVE_FORM_ERROR' => 'There are some errors on items list or in form!',
|
||||
|
||||
'LBL_DISCOUNT_ERROR' => 'Discount Format Number Error',
|
||||
|
||||
'LBL_EDITTABLE_NO' => 'Lp.',
|
||||
'LBL_EDITTABLE_CODE' => 'Code',
|
||||
'LBL_EDITTABLE_NAME' => 'Name',
|
||||
'LBL_EDITTABLE_QUANTITY' => 'Quant',
|
||||
'LBL_EDITTABLE_PRICE' => 'Price',
|
||||
'LBL_EDITTABLE_VAT' => 'VAT',
|
||||
'LBL_EDITTABLE_RECIPIENT_CODE' => 'Recipient Code',
|
||||
'LBL_EDITTABLE_DISCOUNT' => 'Discount',
|
||||
'LBL_EDITTABLE_TOTAL' => 'Total',
|
||||
'LBL_EDITTABLE_OPTIONS' => 'Opt',
|
||||
|
||||
'LBL_MOVE_ROW_UP' => 'Move Up',
|
||||
'LBL_MOVE_ROW_DOWN' => 'Move Down',
|
||||
'LBL_INSERT_NEW_ROW' => 'Insert new row',
|
||||
'LBL_DELETE_ROW' => 'Delete row',
|
||||
|
||||
'LBL_VALIDTILL_DATE' => 'Valid Till',
|
||||
|
||||
// FOR MENU LINKS
|
||||
|
||||
'LNK_NEW_ECMQUOTE' => 'Create Quote',
|
||||
|
||||
'LNK_ECMQUOTES_LIST' => 'Quotes List',
|
||||
|
||||
'LBL_IMG_SEARCH' => 'Search',
|
||||
|
||||
'LBL_IMG_NEW' => 'New, add to base',
|
||||
|
||||
'LBL_IMG_EDIT' => 'Edit',
|
||||
|
||||
'LBL_CONFIRM_QUESTION' => 'Would you like to confirm this Quote?',
|
||||
|
||||
'LBL_QUOTE_PDF' => 'Show PDF',
|
||||
'LBL_QUOTE_PDF_BUTTON_KEY' => 'Show PDF [Alt+P]',
|
||||
'LBL_QUOTE_PDF_BUTTON_TITLE' => 'Show Quote in PDF file.',
|
||||
|
||||
'LBL_QUOTE_TO_INVOICE' => 'Create Invoice',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_KEY' => 'Create Invoice [Alt+I]',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_TITLE' => 'Create Invoice.',
|
||||
|
||||
'LBL_QUOTE_TO_SALE' => 'Create Sales Order',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_KEY' => 'Create Sales Order [Alt+O]',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_TITLE' => 'Create Sales Order.',
|
||||
|
||||
'LBL_SEND_TO_CONFIRM' => 'Send To Confirm',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_KEY' => 'Send To Confirm [Alt+C]',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_TITLE' => 'Send This Quote To Confirm.',
|
||||
|
||||
'LBL_LIST_TO_INVOICE' => 'Create Invoice.',
|
||||
'LBL_LIST_TO_SALE' => 'Create Sales Order.',
|
||||
|
||||
// buttons
|
||||
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Save & Send [Alt+D]',
|
||||
'LBL_SEND_BUTTON_KEY' => 'D',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Save & Send',
|
||||
|
||||
'LBL_REPAIR_BUTTON_TITLE' => 'Repair [Alt+R]',
|
||||
'LBL_REPAIR_BUTTON_KEY' => 'R',
|
||||
'LBL_REPAIR_BUTTON_LABEL' => 'Repair',
|
||||
|
||||
'LBL_ACCEPT_BUTTON_TITLE' => 'Accept [Alt+Z]',
|
||||
'LBL_ACCEPT_BUTTON_KEY' => 'Z',
|
||||
'LBL_ACCEPT_BUTTON_LABEL' => 'Accept',
|
||||
|
||||
'LBL_REJECT_BUTTON_TITLE' => 'Reject [Alt+R]',
|
||||
'LBL_REJECT_BUTTON_KEY' => 'R',
|
||||
'LBL_REJECT_BUTTON_LABEL' => 'Reject',
|
||||
|
||||
'LBL_GO_TO_LIST_BUTTON_TITLE' => 'Go to quotes list [Alt+G]',
|
||||
'LBL_GO_TO_LIST_BUTTON_KEY' => 'G',
|
||||
'LBL_GO_TO_LIST_BUTTON_LABEL' => 'Go to list',
|
||||
|
||||
'LBL_SENDEMAIL_BUTTON' => 'Send Email',
|
||||
|
||||
'LBL_NOT_SAVED' => 'Quote not saved. Please check all fields are correct!',
|
||||
|
||||
'LBL_SAVED' => 'Quote saved successfully.',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_HEADER_TEXT' => 'Witaj $contact_full_name!',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_FOOTER_TEXT' => 'Tekst pod tabelka dla Contact',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Contact',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_HEADER_TEXT' => 'Oferta dla:',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_FOOTER_TEXT' => 'Tekst pod tabelka dla Account',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Account',
|
||||
|
||||
'LBL_NOTES_SUBPANEL_TITLE' => 'Notes',
|
||||
|
||||
'LBL_EMAILS_SUBPANEL_TITLE' => 'Emails',
|
||||
|
||||
'LBL_DASHLET_MY_ECMQUOTES' => 'Quotes',
|
||||
|
||||
'LNK_ECMQUOTES_PDFLANGUAGES' => 'PDF Settings',
|
||||
'LBL_ECMLANGUAGE' => 'Language',
|
||||
'LBL_ECMQUOTES_PDFLANGUAGES_TITLE' => 'PDF Languages Settings',
|
||||
|
||||
'LBL_ACCESS_UNAVAIBLE_DELETE_EMAIL' => "You don't have a permission to send Email, because this Quote is not accepted by Manager!",
|
||||
'LBL_SEND_TO_CONFIRM_ERROR' => "Sending Quote to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_STATUS_s10_SET_MESSAGE' => "Quote status is set.",
|
||||
'LBL_STATUS_s20_SET_MESSAGE' => "Now Quote is waiting for confimations.",
|
||||
'LBL_STATUS_s30_SET_MESSAGE' => "Quote is confirmed.",
|
||||
'LBL_STATUS_s40_SET_MESSAGE' => "Quote status is set.",
|
||||
'LBL_STATUS_s70_SET_MESSAGE' => "Quote status is set to Lost :(",
|
||||
|
||||
'LBL_STATUS_s20_FAIL_MESSAGE' => "Sending Quote to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_LIST_SEND_TO_CONFIRM' => 'Send To Confirm',
|
||||
'LBL_LIST_DUPLICATE' => 'Duplicate',
|
||||
'LBL_LIST_PREVIEW_PDF' => 'Preview Quote',
|
||||
'LBL_LIST_REJECT' => 'Reject',
|
||||
'LBL_LIST_ACCEPT' => 'Accept',
|
||||
|
||||
'LBL_MODIFIED_USER' => 'Modified By',
|
||||
|
||||
'LBL_DEMO_VERSION_INFORMATION' => "This is only demo version.\nPlease contact us at ca@more7.com.",
|
||||
|
||||
'LBL_ORDER_ORIGIN' => 'Order Origin',
|
||||
|
||||
'LBL_PREVIEW_HEADER_NAME' => 'Preview',
|
||||
'LBL_PREVIEW_HEADER_CLOSE' => 'Close',
|
||||
|
||||
'LBL_CONTACT_NAME' => 'Contact',
|
||||
'LBL_CONTACT_ID' => 'Contact Id',
|
||||
'LBL_PARENT_NAME_COPY' => 'Company Name',
|
||||
'LBL_PARENT_CONTACT_NAME' => 'Contact Person',
|
||||
'LBL_PARENT_CONTACT_TITLE' => 'Contact Title',
|
||||
|
||||
'LBL_ALERT_ECMLANGUAGE_CHANGE' => 'Would you like to load default texts correspondencing to this language?',
|
||||
'LBL_LIST_DOWNLOAD_PDF' => 'Download PDF',
|
||||
'LBL_CREATE_ECMINVOICEOUT_BUTTON_LABEL' => 'Create Invoice',
|
||||
|
||||
'LBL_ECMTEAM_NAME' => 'Team',
|
||||
'LBL_ECMTEAM_ID' => 'Team ID',
|
||||
|
||||
'LBL_IMAGE_SIZE' => 'Images size (%)',
|
||||
|
||||
//mz new labels
|
||||
'LBL_SEARCH' => 'Search',
|
||||
'LBL_CATEGORY' => 'Category',
|
||||
'LBL_SEARCH_STOCK' => 'Show stock states',
|
||||
'LBL_SEARCH_STOCK_OPT_NO' => 'Don\'t show stock states',
|
||||
'LBL_SEARCH_STOCK_OPT_YES' => 'Show stock states',
|
||||
'LBL_SEARCH_STOCK_OPT_NOT_NULL' => 'Only products on stock',
|
||||
'LBL_SEARCH_SORT' => 'Sort results by',
|
||||
'LBL_SEARCH_SORT_CODE' => 'Code ASC',
|
||||
'LBL_SEARCH_SORT_CODE_DESC' => 'Code DESC',
|
||||
'LBL_SEARCH_SORT_NAME' => 'Name ASC',
|
||||
'LBL_SEARCH_SORT_NAME_DESC' => 'Name DESC',
|
||||
//PDF labels
|
||||
'LBL_PDF_FOOTER_KRS' => 'KRS:',
|
||||
'LBL_PDF_FOOTER_NIP' => 'VATID:',
|
||||
'LBL_PDF_FOOTER_REGON' => 'REGON:',
|
||||
'LBL_PDF_FOOTER_BANK' => 'Bank name:',
|
||||
'LBL_PDF_FOOTER_BANK_ACCOUNT' => 'Bank account:',
|
||||
'LBL_PDF_FOOTER_GIOS' => 'GIOS number:',
|
||||
'LBL_PDF_FOOTER_SWIFT' => 'Bank SWIFT:',
|
||||
'LBL_PDF_CONTENT_QUOTE_FOR' => 'Offer for:',
|
||||
'LBL_PDF_CONTENT_REGISTER_DATE' => 'Register date:',
|
||||
'LBL_PDF_CONTENT_ISSUED_BY' => 'Issued by:',
|
||||
'LBL_PDF_CONTENT_NUMBER' => 'Number:',
|
||||
'LBL_PDF_CONTENT_LIST_POSITION' => 'No.',
|
||||
'LBL_PDF_CONTENT_LIST_IMAGE' => 'Picture',
|
||||
'LBL_PDF_CONTENT_LIST_NAME' => 'Name',
|
||||
'LBL_PDF_CONTENT_LIST_CODE' => 'Index',
|
||||
'LBL_PDF_CONTENT_LIST_QTY' => 'Quantity',
|
||||
'LBL_PDF_CONTENT_LIST_UNIT' => 'Unit',
|
||||
'LBL_PDF_CONTENT_LIST_EAN' => 'Ean',
|
||||
'LBL_PDF_CONTENT_LIST_EAN2' => 'Ean 2',
|
||||
'LBL_PDF_CONTENT_LIST_RECIPIENT_CODE' => 'Recipient Code',
|
||||
'LBL_PDF_CONTENT_LIST_REMARKS' => 'Remarks',
|
||||
'LBL_PDF_CONTENT_LIST_PRICE_START' => 'Start price',
|
||||
'LBL_PDF_CONTENT_LIST_PRICE_NETTO' => 'Price netto',
|
||||
'LBL_PDF_CONTENT_LIST_DISCOUNT' => 'Discount',
|
||||
'LBL_PDF_CONTENT_LIST_TOTAL_NETTO' => 'Total netto',
|
||||
'LBL_PDF_CONTENT_TOTAL_NETTO' => 'Total netto',
|
||||
'LBL_PDF_CONTENT_TOTAL_BRUTTO' => 'Total brutto',
|
||||
|
||||
|
||||
|
||||
)
|
||||
;
|
||||
|
||||
?>
|
||||
424
modules/EcmAgreements/language/ge_ge.lang.php
Executable file
424
modules/EcmAgreements/language/ge_ge.lang.php
Executable file
@@ -0,0 +1,424 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$mod_strings = array (
|
||||
|
||||
|
||||
|
||||
// FOR SYSTEM USE
|
||||
|
||||
'LBL_MODULE_NAME' => 'Quotes',
|
||||
|
||||
'LBL_MODULE_TITLE' => 'Quotes: Home',
|
||||
|
||||
'LBL_MODULE_ID' => 'EcmAgreements',
|
||||
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Quotes Search',
|
||||
|
||||
'LBL_LIST_FORM_TITLE' => 'Quotes List',
|
||||
|
||||
'LBL_NEW_FORM_TITLE' => 'New Quote',
|
||||
|
||||
|
||||
|
||||
'LBL_DETAILS' => 'Quote details:',
|
||||
|
||||
'LBL_ITEMS' => 'Items included:',
|
||||
|
||||
'LBL_TEXTS' => 'Texts to PDF:',
|
||||
|
||||
'LBL_PREVIEW' => 'Preview PDF:',
|
||||
|
||||
'LBL_EMAIL' => 'Create Email:',
|
||||
|
||||
'LBL_TO_INFORMATIONS' => 'To Informations:',
|
||||
|
||||
|
||||
|
||||
'LBL_DETAILS_TAB' => 'Details',
|
||||
|
||||
'LBL_ITEMS_TAB' => 'Items',
|
||||
|
||||
'LBL_TEXTS_TAB' => 'Texts',
|
||||
|
||||
'LBL_PREVIEW_TAB' => 'Preview',
|
||||
|
||||
'LBL_EMAIL_TAB' => 'Email',
|
||||
|
||||
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
|
||||
'LBL_NAME' => 'Name',
|
||||
|
||||
'LBL_DESCRIPTION' => 'Description',
|
||||
|
||||
'LBL_DATE_ENTERED' => 'Date Entered',
|
||||
|
||||
'LBL_DATE_MODIFIED' => 'Date Modified',
|
||||
|
||||
'LBL_MODIFIED' => 'Last Modified',
|
||||
|
||||
'LBL_ASSIGNED_TO_ID' => 'Assigned To',
|
||||
|
||||
'LBL_ASSIGNED_TO' => 'Assigned To',
|
||||
|
||||
'LBL_CREATED' => 'Created by',
|
||||
|
||||
'LBL_CREATED_BY_USER' => 'Created by',
|
||||
|
||||
'LBL_MODIFIED_BY_USER' => 'Modified by',
|
||||
|
||||
'LBL_ASSIGNED_TO_USER' => 'Assigned To',
|
||||
|
||||
'LBL_DELETED_BY' => 'Deleted by',
|
||||
|
||||
'LBL_NUMBER' => 'Number',
|
||||
|
||||
'LBL_DOCUMENT_NO' => 'Number',
|
||||
|
||||
'LBL_PARENT' => 'To',
|
||||
|
||||
'LBL_PARENT_NAME' => 'Account',
|
||||
|
||||
'LBL_PARENT_ID' => 'Account Id',
|
||||
|
||||
'LBL_TYPE' => 'Type',
|
||||
|
||||
'LBL_ECMQUOTE_ID' => 'Quote Id',
|
||||
|
||||
'LBL_ECMQUOTE_NAME' => 'Quote Name',
|
||||
|
||||
'LBL_STATUS' => 'Status',
|
||||
|
||||
'LBL_REGISTER_DATE' => 'Document Date',
|
||||
|
||||
'LBL_SELL_DATE' => 'Sell Date',
|
||||
|
||||
'LBL_PAYMENT_DATE' => 'Payment Date',
|
||||
|
||||
'LBL_PARENT_ADDRESS_STREET' => 'Street',
|
||||
|
||||
'LBL_PARENT_ADDRESS_CITY' => 'Postalcode / City',
|
||||
|
||||
'LBL_PARENT_ADDRESS_POSTALCODE' => 'Postalcode',
|
||||
|
||||
'LBL_PARENT_ADDRESS_COUNTRY' => 'Country',
|
||||
|
||||
'LBL_TO_VATID' => 'VAT-ID',
|
||||
|
||||
'LBL_TO_IS_VAT_FREE' => 'Is VAT Free?',
|
||||
|
||||
'LBL_HEADER_TEXT' => 'Header Text',
|
||||
|
||||
'LBL_FOOTER_TEXT' => 'Footer Text',
|
||||
|
||||
'LBL_ADS_TEXT' => 'Ads Text',
|
||||
|
||||
|
||||
|
||||
'LBL_SUBTOTAL' => 'Subtotal',
|
||||
|
||||
'LBL_TOTAL' => 'Total',
|
||||
|
||||
'LBL_DISCOUNT' => 'Discount',
|
||||
|
||||
'LBL_VAT' => 'VAT',
|
||||
|
||||
'LBL_ACCEPTED' => 'Accepted',
|
||||
|
||||
'LBL_TEMPLATE_ID' => 'Template Id',
|
||||
|
||||
'LBL_TEMPLATE_NAME' => 'Template',
|
||||
|
||||
'LBL_PAYMENTCONDITION_NAME' => 'Payment Condition',
|
||||
'LBL_PAYMENTCONDITION_ID' => 'Payment Condition ID',
|
||||
|
||||
'LBL_DELIVERYCONDITION_NAME' => 'Delivery Condition',
|
||||
'LBL_DELIVERYCONDITION_ID' => 'Delivery Condition ID',
|
||||
|
||||
'LBL_FORMAT_NUMBER_ERROR' => 'Format Number Error!',
|
||||
|
||||
'LBL_SAVE_FORM_ERROR' => 'There are some errors on items list or in form!',
|
||||
|
||||
'LBL_DISCOUNT_ERROR' => 'Discount Format Number Error',
|
||||
|
||||
'LBL_EDITTABLE_NO' => 'Lp.',
|
||||
'LBL_EDITTABLE_CODE' => 'Code',
|
||||
'LBL_EDITTABLE_NAME' => 'Name',
|
||||
'LBL_EDITTABLE_QUANTITY' => 'Quant',
|
||||
'LBL_EDITTABLE_PRICE' => 'Price',
|
||||
'LBL_EDITTABLE_VAT' => 'VAT',
|
||||
'LBL_EDITTABLE_DISCOUNT' => 'Discount',
|
||||
'LBL_EDITTABLE_TOTAL' => 'Total',
|
||||
'LBL_EDITTABLE_OPTIONS' => 'Opt',
|
||||
|
||||
|
||||
'LBL_MOVE_ROW_UP' => 'Move Up',
|
||||
'LBL_MOVE_ROW_DOWN' => 'Move Down',
|
||||
'LBL_INSERT_NEW_ROW' => 'Insert new row',
|
||||
'LBL_DELETE_ROW' => 'Delete row',
|
||||
|
||||
'LBL_VALIDTILL_DATE' => 'Valid Till',
|
||||
|
||||
// FOR MENU LINKS
|
||||
|
||||
'LNK_NEW_ECMQUOTE' => 'Create Quote',
|
||||
|
||||
'LNK_ECMQUOTES_LIST' => 'Quotes List',
|
||||
|
||||
|
||||
|
||||
'LBL_IMG_SEARCH' => 'Search',
|
||||
|
||||
'LBL_IMG_NEW' => 'New, add to base',
|
||||
|
||||
'LBL_IMG_EDIT' => 'Edit',
|
||||
|
||||
'LBL_CONFIRM_QUESTION' => 'Would you like to confirm this Quote?',
|
||||
|
||||
'LBL_QUOTE_PDF' => 'Show PDF',
|
||||
'LBL_QUOTE_PDF_BUTTON_KEY' => 'Show PDF [Alt+P]',
|
||||
'LBL_QUOTE_PDF_BUTTON_TITLE' => 'Show Quote in PDF file.',
|
||||
|
||||
'LBL_QUOTE_TO_INVOICE' => 'Create Invoice',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_KEY' => 'Create Invoice [Alt+I]',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_TITLE' => 'Create Invoice.',
|
||||
|
||||
'LBL_QUOTE_TO_SALE' => 'Create Sales Order',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_KEY' => 'Create Sales Order [Alt+O]',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_TITLE' => 'Create Sales Order.',
|
||||
|
||||
'LBL_SEND_TO_CONFIRM' => 'Send To Confirm',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_KEY' => 'Send To Confirm [Alt+C]',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_TITLE' => 'Send This Quote To Confirm.',
|
||||
|
||||
'LBL_LIST_TO_INVOICE' => 'Create Invoice.',
|
||||
'LBL_LIST_TO_SALE' => 'Create Sales Order.',
|
||||
|
||||
|
||||
|
||||
//buttons
|
||||
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Save & Send [Alt+D]',
|
||||
'LBL_SEND_BUTTON_KEY' => 'D',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Save & Send',
|
||||
|
||||
'LBL_REPAIR_BUTTON_TITLE' => 'Repair [Alt+R]',
|
||||
'LBL_REPAIR_BUTTON_KEY' => 'R',
|
||||
'LBL_REPAIR_BUTTON_LABEL' => 'Repair',
|
||||
|
||||
'LBL_ACCEPT_BUTTON_TITLE' => 'Accept [Alt+Z]',
|
||||
'LBL_ACCEPT_BUTTON_KEY' => 'Z',
|
||||
'LBL_ACCEPT_BUTTON_LABEL' => 'Accept',
|
||||
|
||||
'LBL_REJECT_BUTTON_TITLE' => 'Reject [Alt+R]',
|
||||
'LBL_REJECT_BUTTON_KEY' => 'R',
|
||||
'LBL_REJECT_BUTTON_LABEL' => 'Reject',
|
||||
|
||||
'LBL_GO_TO_LIST_BUTTON_TITLE' => 'Go to quotes list [Alt+G]',
|
||||
'LBL_GO_TO_LIST_BUTTON_KEY' => 'G',
|
||||
'LBL_GO_TO_LIST_BUTTON_LABEL' => 'Go to list',
|
||||
|
||||
'LBL_SENDEMAIL_BUTTON' => 'Send Email',
|
||||
|
||||
'LBL_NOT_SAVED' => 'Quote not saved. Please check all fields are correct!',
|
||||
|
||||
'LBL_SAVED' => 'Quote saved successfully.',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_CONTACT_HEADER_TEXT' => 'Witaj $contact_full_name!',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_FOOTER_TEXT' => 'Tekst pod tabelka dla Contact',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Contact',
|
||||
|
||||
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_HEADER_TEXT' => 'Oferta dla $account_name.',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_FOOTER_TEXT' => 'Tekst pod tabelka dla Account',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Account',
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_NOTES_SUBPANEL_TITLE' => 'Notes',
|
||||
|
||||
'LBL_EMAILS_SUBPANEL_TITLE' => 'Emails',
|
||||
|
||||
|
||||
|
||||
'LBL_DASHLET_MY_ECMQUOTES' => 'Quotes',
|
||||
|
||||
|
||||
|
||||
|
||||
'LBL_PDF_LIST_POSITION' => 'Poz.',
|
||||
'LBL_PDF_LIST_QUANTITY' => 'Ilosc',
|
||||
'LBL_PDF_LIST_UNIT' => '',
|
||||
'LBL_PDF_LIST_DESCRIPTION' => 'Opis',
|
||||
'LBL_PDF_LIST_PRICE' => 'Cena',
|
||||
'LBL_PDF_LIST_DISCOUNT' => 'Rabat',
|
||||
'LBL_PDF_LIST_VAT' => 'VAT',
|
||||
'LBL_PDF_LIST_TOTAL' => 'Suma',
|
||||
'LBL_PDF_TOTAL' => 'Suma',
|
||||
'LBL_PDF_DISCOUNT' => 'RABAT',
|
||||
'LBL_PDF_END_TOTAL' => 'Suma koncowa',
|
||||
'LBL_PDF_VAT' => 'VAT',
|
||||
'LBL_PDF_VATID' => 'VAT-ID',
|
||||
'LBL_PDF_NUMBER' => 'Numer',
|
||||
'LBL_PDF_DATE_REGISTER' => 'Data wystawienia',
|
||||
'LBL_PDF_VALIDTILL_DATE' => 'Waznosc oferty',
|
||||
'LBL_PDF_OWNER' => 'Wystawil',
|
||||
'LBL_PDF_DOCUMENT_NAME' => 'Oferta',
|
||||
'LBL_PDF_FILENAME' => 'Quote_',
|
||||
'LBL_PDF_CODE' => '',
|
||||
|
||||
'LNK_ECMQUOTES_PDFLANGUAGES' => 'PDF Settings',
|
||||
'LBL_ECMLANGUAGE' => 'Language',
|
||||
'LBL_ECMQUOTES_PDFLANGUAGES_TITLE' => 'PDF Languages Settings',
|
||||
|
||||
'LBL_ACCESS_UNAVAIBLE_DELETE_EMAIL' => "You don't have a permission to send Email, because this Quote is not accepted by Manager!",
|
||||
'LBL_SEND_TO_CONFIRM_ERROR' => "Sending Quote to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_STATUS_s10_SET_MESSAGE' => "Quote status is set.",
|
||||
'LBL_STATUS_s20_SET_MESSAGE' => "Now Quote is waiting for confimations.",
|
||||
'LBL_STATUS_s30_SET_MESSAGE' => "Quote is confirmed.",
|
||||
'LBL_STATUS_s40_SET_MESSAGE' => "Quote status is set.",
|
||||
|
||||
'LBL_STATUS_s20_FAIL_MESSAGE' => "Sending Quote to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_LIST_SEND_TO_CONFIRM' => 'Send To Confirm',
|
||||
'LBL_LIST_DUPLICATE' => 'Duplicate',
|
||||
'LBL_LIST_PREVIEW_PDF' => 'Preview Quote',
|
||||
'LBL_LIST_REJECT' => 'Reject',
|
||||
'LBL_LIST_ACCEPT' => 'Accept',
|
||||
|
||||
|
||||
'LBL_MODIFIED_USER' => 'Modified By',
|
||||
|
||||
'LBL_DEMO_VERSION_INFORMATION' => "This is only demo version.\nPlease contact us at ca@more7.com.",
|
||||
|
||||
'LBL_ORDER_ORIGIN' => 'Order Origin',
|
||||
|
||||
'LBL_PREVIEW_HEADER_NAME' => 'Preview',
|
||||
'LBL_PREVIEW_HEADER_CLOSE' => 'Close',
|
||||
|
||||
'LBL_CONTACT_NAME' => 'Contact',
|
||||
'LBL_CONTACT_ID' => 'Contact Id',
|
||||
'LBL_PARENT_NAME_COPY' => 'Company Name',
|
||||
'LBL_PARENT_CONTACT_NAME' => 'Contact Person',
|
||||
'LBL_PARENT_CONTACT_TITLE' => 'Contact Title',
|
||||
|
||||
'LBL_ALERT_ECMLANGUAGE_CHANGE' => 'Would you like to load default texts correspondencing to this language?',
|
||||
'LBL_LIST_DOWNLOAD_PDF' => 'Download PDF',
|
||||
|
||||
'LBL_IMAGE_SIZE' => 'Images size (%)',
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
490
modules/EcmAgreements/language/pl_pl.lang.php
Executable file
490
modules/EcmAgreements/language/pl_pl.lang.php
Executable file
@@ -0,0 +1,490 @@
|
||||
<?php
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
|
||||
/**
|
||||
* ***************************************************************************
|
||||
*
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
*
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
*
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
*
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
*
|
||||
* either express or implied.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You may:
|
||||
*
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
*
|
||||
* a royalty or other fee.
|
||||
*
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
*
|
||||
* publicly available and document your modifications clearly.
|
||||
*
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
*
|
||||
* obligations for your customers.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You may NOT:
|
||||
*
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
*
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
*
|
||||
* Provider).
|
||||
*
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
*
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
*
|
||||
* involves PHYSICAL media.
|
||||
*
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
*
|
||||
* or License text in the Licensed Software
|
||||
*
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
*
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
*
|
||||
* Licensed Software.
|
||||
*
|
||||
*
|
||||
*
|
||||
* You must:
|
||||
*
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
*
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
*
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
*
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
*
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
*
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
*
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
*
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
*
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
*
|
||||
* Olavo Farias
|
||||
*
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
*
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
*
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* ******************************************************************************
|
||||
*/
|
||||
|
||||
$mod_strings = array(
|
||||
'LBL_SHOW_PDF_TEMPLATE' => 'Pokaż przykładowy PDF',
|
||||
'LBL_DEFAULT_VALUE' => 'Domyślna wartość',
|
||||
'LBL_PDF_TEMPLATE_ADITIONAL_FIELDS_HELP' => 'Proszę używać podkreślenia zamiast spacji',
|
||||
'LBL_PDF_TEMPLATE_ADITIONAL_FIELDS'=> 'Dodatkowe pola szablonu',
|
||||
'LBL_CANCEL' => 'Anuluj',
|
||||
'LBL_MARGIN_TOP' =>'Margines górny',
|
||||
'LBL_MARGIN_BOTTOM' => 'Margines dolny',
|
||||
'LBL_MARGIN_LEFT' => 'Margines lewy',
|
||||
'LBL_MARGIN_RIGHT' => 'Margines prawy',
|
||||
'LBL_NAME' => 'Nazwa',
|
||||
'LBL_AGREEMENT_TEMPLATE_HELP' => 'By użyć znacznika w tekście proszę wpisać PRAWĄ stronę wartości',
|
||||
'LBL_ADD_NEW' => 'Dodaj',
|
||||
'LBL_REFRESH' => 'Odśwież',
|
||||
'LBL_ADD_NEW_TIP' => 'Dodaj nowy szablon',
|
||||
'LBL_PDF_AGREEMENT' => 'Szablon umowy',
|
||||
'LBL_REMOVE' => 'Usuń',
|
||||
'LBL_REMOVE_TIP' => 'Usuń zaznaczony szablon',
|
||||
'LBL_EDIT_LABEL' => 'Edytuj tytuł',
|
||||
'LBL_EDIT_LABEL_TIP' => 'Edytuj tytuł szablonu',
|
||||
'LBL_SAVE' => 'Zapisz',
|
||||
'LBL_SAVE_TIP' => 'Zapisz zaminy',
|
||||
'LBL_AGREEMENT_TEMPLATE_EDITOR' => 'Edytor szablonów',
|
||||
'LBL_BTN_CREATE_ZS' => 'Utwórz ZS',
|
||||
'LBL_ECMPRICE' => 'Ceny B2B',
|
||||
'LBL_SEARCH' => 'Wyszukaj',
|
||||
'LBL_CATEGORY' => 'Kategoria',
|
||||
'LBL_PDF_TEXT' => 'Tekst na PDFie',
|
||||
'LBL_PARENT_NIP' => 'NIP',
|
||||
'LBL_NO_TAX' => 'Bez Vatu',
|
||||
'LBL_SITE' => 'Strona',
|
||||
'LBL_SHOW_EAN' => 'Pokaż EAN1',
|
||||
'LBL_SHOW_EAN2' => 'Pokaż EAN2',
|
||||
// added 01.09.2009
|
||||
'LBL_ECMLANGUAGE' => 'Język',
|
||||
'LBL_PRICEBOOK' => 'Cennik',
|
||||
'LBL_EDITTABLE_RECIPIENT_CODE' => 'Kod Odbiorcy',
|
||||
// added 05.08.2009
|
||||
'LBL_CURRENCY' => 'Waluta',
|
||||
'LBL_CORRECT_TITLE' => 'Utwórz korektę',
|
||||
'LBL_CORRECT' => 'Utwórz korektę',
|
||||
'LBL_DETAIL_BUTTON' => 'Szczegóły',
|
||||
// added 15.07.2009
|
||||
'LBL_PRINCIPAL_VALUE' => 'Rata kapitałowa',
|
||||
'LBL_PARENT_SHIPPING_ADDRESS' => 'Adres wysyłki',
|
||||
'LBL_TO_PAYMENTS' => 'Płatności',
|
||||
'LBL_AGREEMENT_TAB' => 'Teksty',
|
||||
'LBL_2_5' => '§2 pkt 5.',
|
||||
'LBL_7_1' => '§7 pkt 1.',
|
||||
'LBL_RATE' => 'Przedłużenie umowy na okres',
|
||||
'LBL_AGREEMENT' => 'Teksty na umowie',
|
||||
'LBL_TO_PAID' => 'Do zapłaty',
|
||||
'LBL_PDF_CONTENT_INVOICE_FOR' => 'NABYWCA',
|
||||
'LBL_LEFT' => 'Pozostało',
|
||||
'LBL_PREPAID' => 'Przedpłata',
|
||||
'LBL_PREPAID_NR' => 'Numer FK przedpłatowej',
|
||||
'LBL_PAID' => 'Zapłacono',
|
||||
'LBL_PAYMENT_METHOD_PAID' => 'Sposób zapłaty (zapłacono)',
|
||||
'LBL_EDITTABLE_UNIT' => 'J.m.',
|
||||
'LBL_ECMINVOICEOUT_NAME' => 'Faktura do korygowania',
|
||||
'LBL_STOCK_NAME' => 'Magazyn',
|
||||
'LBL_INTEREST_RATE' => 'Stopa odsetkowa',
|
||||
'LBL_RAFE_OF_COMMISSION' => 'Stopa prowizji',
|
||||
'LBL_CURRENCY' => 'Waluta',
|
||||
'LBL_PAYMENT_METHOD' => 'Sposób zapłaty',
|
||||
'LBL_NUMBER_OF_INSTALLMENTS' => 'Ilość rat',
|
||||
// added 09.02.2009
|
||||
'LBL_SHOW_IMAGES_ON_OFFERS' => 'Pokaż obrazki w PDFie',
|
||||
'LBL_SHOW_RECIPIENT_CODE' => 'Pokaż kod odbiorcy',
|
||||
|
||||
// FOR SYSTEM USE
|
||||
|
||||
'LBL_MODULE_NAME' => 'Umowy',
|
||||
|
||||
'LBL_MODULE_TITLE' => 'Umowy: Strona Główna',
|
||||
|
||||
'LBL_MODULE_ID' => 'EcmAgreements',
|
||||
|
||||
'LBL_SEARCH_FORM_TITLE' => 'Wyszukiwanie',
|
||||
|
||||
'LBL_LIST_FORM_TITLE' => 'Lista Umów',
|
||||
|
||||
'LBL_NEW_FORM_TITLE' => 'Nowa Umowa',
|
||||
|
||||
'LBL_DETAILS' => 'Szczegóły Umowy',
|
||||
'LBL_DATE_END' => 'Data 2',
|
||||
'LBL_ITEMS' => ' ',
|
||||
'LBL_PARENT_REGON' => 'REGON',
|
||||
'LBL_CONTACT_POSITION' => 'Stanowisko',
|
||||
'LBL_TEXTS' => 'Teksty do PDFa:',
|
||||
|
||||
'LBL_PREVIEW' => 'Podgląd PDF:',
|
||||
|
||||
'LBL_EMAIL' => 'Stwórz Email:',
|
||||
|
||||
'LBL_TO_INFORMATIONS' => 'Informacje o Kontrahencie:',
|
||||
|
||||
'LBL_DETAILS_TAB' => 'Szczegóły',
|
||||
|
||||
'LBL_ITEMS_TAB' => 'Harmonogram',
|
||||
|
||||
'LBL_TEXTS_TAB' => 'Teksty',
|
||||
|
||||
'LBL_PREVIEW_TAB' => 'Podgląd',
|
||||
|
||||
'LBL_EMAIL_TAB' => 'Email',
|
||||
|
||||
'LBL_ID' => 'Id',
|
||||
|
||||
'LBL_AMOUNT' => 'Kwota kredytu',
|
||||
|
||||
'LBL_DESCRIPTION' => 'Opis',
|
||||
|
||||
'LBL_DATE_ENTERED' => 'Data dodania',
|
||||
|
||||
'LBL_DATE_MODIFIED' => 'Date modyfikacji',
|
||||
|
||||
'LBL_MODIFIED' => 'Ostatnio modyfikowane',
|
||||
|
||||
'LBL_ASSIGNED_TO_ID' => 'Przypisane Do',
|
||||
|
||||
'LBL_ASSIGNED_TO' => 'Przypisane Do',
|
||||
|
||||
'LBL_CREATED' => 'Utworzone Przez',
|
||||
|
||||
'LBL_CREATED_BY_USER' => 'Utworzone Przez',
|
||||
|
||||
'LBL_MODIFIED_BY_USER' => 'Zmodyfikowane Przez',
|
||||
|
||||
'LBL_ASSIGNED_TO_USER' => 'Przypisane Do',
|
||||
|
||||
'LBL_DELETED_BY' => 'Usuniete Przez',
|
||||
|
||||
'LBL_NUMBER' => 'Numer',
|
||||
|
||||
'LBL_DOCUMENT_NO' => 'Numer',
|
||||
|
||||
'LBL_PARENT' => 'Do',
|
||||
|
||||
'LBL_PARENT_NAME' => 'Kontrahent',
|
||||
|
||||
'LBL_PARENT_ID' => 'Kontrahent Id',
|
||||
|
||||
'LBL_TYPE' => 'Rodzaj kredytu',
|
||||
|
||||
'LBL_ECMQUOTE_ID' => 'Id Oferty',
|
||||
|
||||
'LBL_ECMQUOTE_NAME' => 'Nazwa Oferty',
|
||||
|
||||
'LBL_STATUS' => 'Status',
|
||||
|
||||
'LBL_REGISTER_DATE' => 'Data Dokumentu',
|
||||
|
||||
'LBL_DATE_OF_THE_LOAN' => 'Data 1',
|
||||
|
||||
'LBL_PAYMENT_DATE' => 'Data Płatności',
|
||||
|
||||
'LBL_PARENT_ADDRESS_STREET' => 'Ulica',
|
||||
|
||||
'LBL_PARENT_ADDRESS_CITY' => 'Kod pocztowy / Miasto',
|
||||
'LBL_PARENT_ADDRESS_CITY_SS' => 'Miasto',
|
||||
'LBL_PARENT_ADDRESS_POSTALCODE' => 'Kod pocztowy',
|
||||
|
||||
'LBL_PARENT_ADDRESS_COUNTRY' => 'Państwo',
|
||||
|
||||
'LBL_TO_VATID' => 'VAT-ID',
|
||||
|
||||
'LBL_TO_IS_VAT_FREE' => 'Czy jest wolne od vatu?',
|
||||
|
||||
'LBL_HEADER_TEXT' => 'Tekst nagłówka',
|
||||
|
||||
'LBL_FOOTER_TEXT' => 'Tekst stopki',
|
||||
|
||||
'LBL_ADS_TEXT' => 'Dodatkowy tekst',
|
||||
|
||||
'LBL_SUBTOTAL' => 'Suma',
|
||||
|
||||
'LBL_TOTAL' => 'Suma',
|
||||
|
||||
'LBL_DISCOUNT' => 'Upust',
|
||||
|
||||
'LBL_VAT' => 'VAT',
|
||||
|
||||
'LBL_ACCEPTED' => 'Zaakceptowane',
|
||||
|
||||
'LBL_TEMPLATE_ID' => 'Id Szablonu',
|
||||
|
||||
'LBL_TEMPLATE_NAME' => 'Szablon',
|
||||
|
||||
'LBL_PAYMENTCONDITION_NAME' => 'Warunki Płatności',
|
||||
'LBL_PAYMENTCONDITION_VALUE' => 'Termin płatności',
|
||||
'LBL_PAYMENTCONDITION_ID' => 'Warunki Platnosci ID',
|
||||
|
||||
'LBL_DELIVERYCONDITION_NAME' => 'Warunki Dostawy',
|
||||
'LBL_DELIVERYCONDITION_ID' => 'Warunki Dostawy ID',
|
||||
|
||||
'LBL_FORMAT_NUMBER_ERROR' => 'Błąd formatu numeru!',
|
||||
|
||||
'LBL_SAVE_FORM_ERROR' => 'Wystepuja bledy na liscie produktów albo w formularzu!',
|
||||
|
||||
'LBL_DISCOUNT_ERROR' => 'Błąd formatu upustu',
|
||||
|
||||
'LBL_EDITTABLE_NO' => 'Lp.',
|
||||
'LBL_EDITTABLE_CODE' => 'Kod',
|
||||
'LBL_EDITTABLE_NAME' => 'Nazwa',
|
||||
'LBL_EDITTABLE_QUANTITY' => 'Ilość',
|
||||
'LBL_EDITTABLE_PRICE' => 'Cena',
|
||||
'LBL_EDITTABLE_VAT' => 'VAT',
|
||||
'LBL_EDITTABLE_DISCOUNT' => 'Upust',
|
||||
'LBL_EDITTABLE_TOTAL' => 'Suma',
|
||||
'LBL_EDITTABLE_OPTIONS' => 'Opcje',
|
||||
|
||||
'LBL_MOVE_ROW_UP' => 'W góre',
|
||||
'LBL_MOVE_ROW_DOWN' => 'W dół',
|
||||
'LBL_INSERT_NEW_ROW' => 'Wstaw nowy wiersz',
|
||||
'LBL_DELETE_ROW' => 'Usuń wiersz',
|
||||
|
||||
'LBL_VALIDTILL_DATE' => 'Ważne do',
|
||||
|
||||
// FOR MENU LINKS
|
||||
|
||||
'LNK_NEW_ECMQUOTE' => 'Utwórz Umowę',
|
||||
|
||||
'LNK_ECMQUOTES_LIST' => 'Lista Umów',
|
||||
|
||||
'LBL_IMG_SEARCH' => 'Wyszukiwanie',
|
||||
|
||||
'LBL_IMG_NEW' => 'Nowy, dodaj do bazy',
|
||||
|
||||
'LBL_IMG_EDIT' => 'Edycja',
|
||||
|
||||
'LBL_CONFIRM_QUESTION' => 'Chcesz potwierdzic tą Umowę?',
|
||||
|
||||
'LBL_QUOTE_PDF' => 'Pokaz PDF',
|
||||
'LBL_QUOTE_PDF_BUTTON_KEY' => 'Pokaz PDF [Alt+P]',
|
||||
'LBL_QUOTE_PDF_BUTTON_TITLE' => 'Pokaz Umowę w pliku PDF.',
|
||||
|
||||
'LBL_QUOTE_TO_INVOICE' => 'Stwórz Fakture',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_KEY' => 'Stwórz Fakture [Alt+I]',
|
||||
'LBL_QUOTE_TO_INVOICE_BUTTON_TITLE' => 'Stwórz Fakture.',
|
||||
|
||||
'LBL_QUOTE_TO_SALE' => 'Stwórz Zamówienie Sprzedazy',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_KEY' => 'Stwórz Zamówienie Sprzedazy [Alt+O]',
|
||||
'LBL_QUOTE_TO_SALE_BUTTON_TITLE' => 'Stwórz Zamówienie Sprzedazy.',
|
||||
|
||||
'LBL_SEND_TO_CONFIRM' => 'Wyslij Do Potwierdzenia',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_KEY' => 'Wyslij Do Potwierdzenia [Alt+C]',
|
||||
'LBL_SEND_TO_CONFIRM_BUTTON_TITLE' => 'Wyslij Do Potwierdzenia.',
|
||||
|
||||
'LBL_LIST_TO_INVOICE' => 'Stwórz Fakture.',
|
||||
'LBL_LIST_TO_SALE' => 'Stwórz Zamówienie Sprzedazy.',
|
||||
|
||||
// buttons
|
||||
|
||||
'LBL_SEND_BUTTON_TITLE' => 'Zapisz i Wyslij [Alt+D]',
|
||||
'LBL_SEND_BUTTON_KEY' => 'D',
|
||||
'LBL_SEND_BUTTON_LABEL' => 'Zapisz i Wyslij',
|
||||
|
||||
'LBL_REPAIR_BUTTON_TITLE' => 'Napraw [Alt+R]',
|
||||
'LBL_REPAIR_BUTTON_KEY' => 'R',
|
||||
'LBL_REPAIR_BUTTON_LABEL' => 'Napraw',
|
||||
|
||||
'LBL_ACCEPT_BUTTON_TITLE' => 'Zaakceptuj [Alt+Z]',
|
||||
'LBL_ACCEPT_BUTTON_KEY' => 'Z',
|
||||
'LBL_ACCEPT_BUTTON_LABEL' => 'Zaakceptuj',
|
||||
|
||||
'LBL_REJECT_BUTTON_TITLE' => 'Nie akceptuj [Alt+R]',
|
||||
'LBL_REJECT_BUTTON_KEY' => 'R',
|
||||
'LBL_REJECT_BUTTON_LABEL' => 'Nie akceptuj',
|
||||
// PAYER START
|
||||
'LBL_PARENT_PAYER_ADDRESS' => 'Adres płatnika',
|
||||
// PAYER END
|
||||
'LBL_GO_TO_LIST_BUTTON_TITLE' => 'Idz do listy Ofert [Alt+G]',
|
||||
'LBL_GO_TO_LIST_BUTTON_KEY' => 'G',
|
||||
'LBL_GO_TO_LIST_BUTTON_LABEL' => 'Idz do listy',
|
||||
|
||||
'LBL_SENDEMAIL_BUTTON' => 'Wyslij Email',
|
||||
|
||||
'LBL_NOT_SAVED' => 'Oferta nie została zapisana. Sprawdz czy wszytskie pola sa poprawne!',
|
||||
|
||||
'LBL_SAVED' => 'Oferta została zapisana pomyslnie.',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_HEADER_TEXT' => 'Witaj $contact_full_name!',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_FOOTER_TEXT' => 'Tekst pod tabelka dla Contact',
|
||||
|
||||
'LBL_DEFAULT_CONTACT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Contact',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_HEADER_TEXT' => 'Oferta dla $account_name.',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_FOOTER_TEXT' => 'Tekst pod tabelka dla Account',
|
||||
|
||||
'LBL_DEFAULT_ACCOUNT_ADS_TEXT' => 'Tekst pogrubiony pod tabelka dla Account',
|
||||
|
||||
'LBL_NOTES_SUBPANEL_TITLE' => 'Notatki',
|
||||
|
||||
'LBL_EMAILS_SUBPANEL_TITLE' => 'Emaile',
|
||||
|
||||
'LBL_DASHLET_MY_ECMQUOTES' => 'Oferty',
|
||||
|
||||
'LNK_ECMQUOTES_PDFLANGUAGES' => 'Ustawienia PDF',
|
||||
'LBL_ECMQUOTES_PDFLANGUAGES_TITLE' => 'Ustawienia jezyków PDFa',
|
||||
|
||||
'LBL_ACCESS_UNAVAIBLE_DELETE_EMAIL' => "You don't have a permission to send Email, because this Correct Document is not accepted by Manager!",
|
||||
'LBL_SEND_TO_CONFIRM_ERROR' => "Sending Correct Document to confirm error! Refresh site and try again.",
|
||||
|
||||
'LBL_STATUS_s10_SET_MESSAGE' => "Status Oferty ustawiony.",
|
||||
'LBL_STATUS_s20_SET_MESSAGE' => "Oferta czeka na potwierdzenie.",
|
||||
'LBL_STATUS_s30_SET_MESSAGE' => "Oferta jest potwierdzony.",
|
||||
'LBL_STATUS_s40_SET_MESSAGE' => "Status Oferty ustawiony.",
|
||||
|
||||
'LBL_STATUS_s20_FAIL_MESSAGE' => "Blad wysylki do potwierdzenia! Odswiez strone i sprobuj ponownie.",
|
||||
|
||||
'LBL_LIST_SEND_TO_CONFIRM' => 'Wyslij do Potwierdzenia',
|
||||
'LBL_LIST_DUPLICATE' => 'Duplikuj',
|
||||
'LBL_LIST_PREVIEW_PDF' => 'Podglad Oferty',
|
||||
'LBL_LIST_REJECT' => 'Nie akceptuj',
|
||||
'LBL_LIST_ACCEPT' => 'Akceptuj',
|
||||
|
||||
'LBL_MODIFIED_USER' => 'Zmodyfikowane Przez',
|
||||
|
||||
'LBL_DEMO_VERSION_INFORMATION' => "This is only demo version.\nPlease contact us at ca@more7.com.",
|
||||
|
||||
'LBL_ORDER_ORIGIN' => 'Zródlo zamówienia',
|
||||
|
||||
'LBL_PREVIEW_HEADER_NAME' => 'Podglad',
|
||||
'LBL_PREVIEW_HEADER_CLOSE' => 'Zamknij',
|
||||
|
||||
'LBL_CONTACT_NAME' => 'Kontakt',
|
||||
'LBL_CONTACT_ID' => 'Id Kontaktu',
|
||||
'LBL_PARENT_NAME_COPY' => 'Nazwa Kontrahenta',
|
||||
'LBL_PARENT_CONTACT_NAME' => 'Osoba Kontaktowa',
|
||||
'LBL_PARENT_CONTACT_TITLE' => 'Tytul Kontaktu',
|
||||
|
||||
'LBL_ALERT_ECMLANGUAGE_CHANGE' => 'Czy zaladowac domyslne teksty dla tego jezyka?',
|
||||
'LBL_LIST_DOWNLOAD_PDF' => 'Pobierz PDF',
|
||||
|
||||
'LBL_IMAGE_SIZE' => 'Rozmiar obrazków (%)',
|
||||
|
||||
// mz new fields
|
||||
'LBL_SEARCH' => 'Wyszukaj',
|
||||
'LBL_CATEGORY' => 'Kategoria',
|
||||
'LBL_SEARCH_STOCK' => 'Stan magazynowy',
|
||||
'LBL_SEARCH_STOCK_OPT_NO' => 'Nie pokazuj',
|
||||
'LBL_SEARCH_STOCK_OPT_YES' => 'Pokaż',
|
||||
'LBL_SEARCH_STOCK_OPT_NOT_NULL' => 'Tylko produkty dostępne',
|
||||
'LBL_SEARCH_SORT' => 'Sortuj wyniki wg.',
|
||||
'LBL_SEARCH_SORT_CODE' => 'Kod rosnąco',
|
||||
'LBL_SEARCH_SORT_CODE_DESC' => 'Kod malejąco',
|
||||
'LBL_SEARCH_SORT_NAME' => 'Nazwa rosnąco',
|
||||
'LBL_SEARCH_SORT_NAME_DESC' => 'Nazwa malejąco',
|
||||
// PDF labels
|
||||
'LBL_PDF_FOOTER_KRS' => 'KRS:',
|
||||
'LBL_PDF_FOOTER_NIP' => 'NIP:',
|
||||
'LBL_PDF_FOOTER_REGON' => 'REGON:',
|
||||
'LBL_PDF_FOOTER_BANK' => 'Bank:',
|
||||
'LBL_PDF_FOOTER_BANK_ACCOUNT' => 'Number konta:',
|
||||
'LBL_PDF_FOOTER_GIOS' => 'Numer GIOS:',
|
||||
'LBL_PDF_CONTENT_QUOTE_FOR' => 'Oferta dla:',
|
||||
'LBL_PDF_CONTENT_REGISTER_DATE' => 'Data wystawienia:',
|
||||
'LBL_PDF_CONTENT_ISSUED_BY' => 'Wystawił:',
|
||||
'LBL_PDF_CONTENT_NUMBER' => 'Numer:',
|
||||
'LBL_PDF_CONTENT_LIST_POSITION' => 'Lp.',
|
||||
'LBL_PDF_CONTENT_LIST_IMAGE' => 'Zdjęcie',
|
||||
'LBL_PDF_CONTENT_LIST_NAME' => 'Nazwa',
|
||||
'LBL_PDF_CONTENT_LIST_CODE' => 'Indeks',
|
||||
'LBL_PDF_CONTENT_LIST_QTY' => 'Ilość',
|
||||
'LBL_PDF_CONTENT_LIST_UNIT' => 'j.m.',
|
||||
'LBL_PDF_CONTENT_LIST_EAN' => 'Ean',
|
||||
'LBL_PDF_CONTENT_LIST_EAN2' => 'Ean 2',
|
||||
'LBL_PDF_CONTENT_LIST_RECIPIENT_CODE' => 'Kod odbiorcy',
|
||||
'LBL_PDF_CONTENT_LIST_REMARKS' => 'Uwagi',
|
||||
'LBL_PDF_CONTENT_LIST_PRICE_START' => 'Cena początkowa',
|
||||
'LBL_PDF_CONTENT_LIST_PRICE_NETTO' => 'Cena netto',
|
||||
'LBL_PDF_CONTENT_LIST_DISCOUNT' => 'Rabat',
|
||||
'LBL_PDF_CONTENT_LIST_TOTAL_NETTO' => 'Wartość netto',
|
||||
'LBL_PDF_CONTENT_TOTAL_NETTO' => 'Suma netto',
|
||||
'LBL_PDF_CONTENT_TOTAL_BRUTTO' => 'Suma brutto',
|
||||
'LBL_PDF_CONTENT_PARENT_DOCUMENT_WZ' => 'Nr dokumentu WZ',
|
||||
'LBL_PDF_CONTENT_PARENT_DOCUMENT_NO' => 'Nr zamówienia',
|
||||
'LBL_PDF_CONTENT_PARENT_SUPPLIER_CODE' => 'Kod dostawcy',
|
||||
'LBL_PDF_CONTENT_DELIVERY' => 'ODBIORCA',
|
||||
'LBL_PDF_CONTENT_SELL_DATE' => 'Data dokonania lub zakończenia dostawy towarów lub wykonania usługi:',
|
||||
'LBL_PDF_CONTENT_NIP' => 'NIP:',
|
||||
'LBL_PDF_TO_PAY' => 'Do zapłaty:',
|
||||
'LBL_PDF_PAID' => 'Zapłacono:',
|
||||
'LBL_PDF_LEFT_TO_PAID' => 'Pozostało:',
|
||||
);
|
||||
|
||||
?>
|
||||
125
modules/EcmAgreements/metadata/SearchFields.php
Executable file
125
modules/EcmAgreements/metadata/SearchFields.php
Executable file
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
|
||||
* with the License. You may obtain a copy of the License at
|
||||
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
|
||||
* either express or implied.
|
||||
|
||||
*
|
||||
|
||||
* You may:
|
||||
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
|
||||
* a royalty or other fee.
|
||||
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
|
||||
* publicly available and document your modifications clearly.
|
||||
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
|
||||
* obligations for your customers.
|
||||
|
||||
*
|
||||
|
||||
* You may NOT:
|
||||
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
|
||||
* Provider).
|
||||
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
|
||||
* involves PHYSICAL media.
|
||||
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
|
||||
* or License text in the Licensed Software
|
||||
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
|
||||
* Licensed Software.
|
||||
|
||||
*
|
||||
|
||||
* You must:
|
||||
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
|
||||
*
|
||||
|
||||
* The Original Code is: CommuniCore
|
||||
|
||||
* Olavo Farias
|
||||
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
|
||||
*
|
||||
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
|
||||
* All Rights Reserved.
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$searchFields['EcmAgreements'] = array (
|
||||
|
||||
'name' => array ( 'query_type' => 'default' ),
|
||||
|
||||
'description' => array ( 'query_type' => 'default' ),
|
||||
|
||||
'current_user_only' => array ( 'query_type' => 'default', 'db_field' => array ( 'assigned_user_id' ), 'my_items' => true ),
|
||||
|
||||
'assigned_user_id' => array ( 'query_type' => 'default' ),
|
||||
|
||||
'status' => array ( 'query_type' => 'default' ),
|
||||
|
||||
'register_date' => array ( 'query_type' => 'default' ),
|
||||
|
||||
'parent_name' => array( 'query' => 'default' ),
|
||||
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
229
modules/EcmAgreements/metadata/detailviewdefs.php
Executable file
229
modules/EcmAgreements/metadata/detailviewdefs.php
Executable file
@@ -0,0 +1,229 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* *******************************************************************************/
|
||||
global $app_list_strings;
|
||||
|
||||
$viewdefs['EcmAgreements']['DetailView'] = array(
|
||||
|
||||
'templateMeta' => array(
|
||||
|
||||
'form' => array(
|
||||
|
||||
'buttons' => array(
|
||||
'EDIT',
|
||||
/* array(
|
||||
'customCode' => '{$CREATE_PDF}'
|
||||
),
|
||||
array(
|
||||
'customCode' => '{$CREATE_PDF2}'
|
||||
),*/
|
||||
array(
|
||||
'customCode' => '{$CREATE_PDF_FROM_TEMPLATE}'
|
||||
)
|
||||
),
|
||||
|
||||
'hidden' => array(
|
||||
'<input type="hidden" id="total_interest_rate" name="total_interest_rate" value=\'{$fields.total_interest_rate.value}\'>',
|
||||
'<input type="hidden" id="total_total" name="total_total" value=\'{$fields.total_total.value}\'>',
|
||||
'<input type="hidden" id="total_rate_of_commission" name="total_rate_of_commission" value=\'{$fields.total_rate_of_commission.value}\'>',
|
||||
'<input type="hidden" id="total_principal_value" name="total_principal_value" value=\'{$fields.total_principal_value.value}\'>'
|
||||
)
|
||||
),
|
||||
|
||||
'maxColumns' => '2',
|
||||
|
||||
'widths' => array(
|
||||
|
||||
array(
|
||||
'label' => '10',
|
||||
'field' => '30',
|
||||
),
|
||||
|
||||
array(
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
|
||||
'includes' => array(
|
||||
array(
|
||||
'file' => 'include/JSON.js'
|
||||
),
|
||||
array(
|
||||
'file' => 'modules/EcmAgreements/javascript/EcmAgreementsDetail.js'
|
||||
),
|
||||
array(
|
||||
'file' => 'modules/EcmAgreements/javascript/bimit_table.js'
|
||||
),
|
||||
array(
|
||||
'file' => 'modules/EcmAgreements/javascript/columndefs-detail.js'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'panels' => array(
|
||||
|
||||
'LBL_DETAILS_TAB' => array(
|
||||
|
||||
array(
|
||||
'document_no',
|
||||
'assigned_user_name'
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'parent_name',
|
||||
'tabIndex' => '1'
|
||||
),
|
||||
array(
|
||||
'name' => 'type',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'register_date',
|
||||
'tabIndex' => '1',
|
||||
'type' => 'datetime',
|
||||
'displayParams' => array(
|
||||
'showFormats' => true
|
||||
)
|
||||
),
|
||||
array(
|
||||
'name' => 'pdf_template',
|
||||
'customCode' => '{$TEMPLATES}'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'name' => 'date_of_the_loan',
|
||||
'tabIndex' => '1',
|
||||
'type' => 'datetime',
|
||||
'displayParams' => array(
|
||||
'showFormats' => true
|
||||
)
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'amount',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
|
||||
),
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
|
||||
'name' => 'to_informations',
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '<b>Pola dodatkowe</b><br>{$additiona_field}'
|
||||
)
|
||||
),
|
||||
array(
|
||||
|
||||
array(
|
||||
|
||||
'name' => 'to_informations',
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '<br><b>{$MOD.LBL_TO_INFORMATIONS}</b>'
|
||||
)
|
||||
),
|
||||
|
||||
array(
|
||||
array(
|
||||
'name' => 'parent_name_copy',
|
||||
'customCode' => '{$fields.parent_name.value}'
|
||||
)
|
||||
|
||||
),
|
||||
array(
|
||||
'parent_nip'
|
||||
|
||||
),
|
||||
array(
|
||||
'parent_regon'
|
||||
|
||||
),
|
||||
array(
|
||||
'parent_address_street'
|
||||
),
|
||||
array(
|
||||
array(
|
||||
'name' => 'parent_address_city',
|
||||
'tabIndex' => 't',
|
||||
'customCode' => '{$fields.parent_address_postalcode.value} {$fields.parent_address_city.value}'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'parent_address_country'
|
||||
),
|
||||
|
||||
|
||||
array(
|
||||
array(
|
||||
'name' => 'date_modified',
|
||||
'label' => 'LBL_DATE_MODIFIED',
|
||||
'customCode' => '{$fields.date_modified.value} {$APP.LBL_BY} {$MODIFIED_BY_NAME}'
|
||||
),
|
||||
array(
|
||||
'name' => 'date_entered',
|
||||
'customCode' => '{$fields.date_entered.value} {$APP.LBL_BY} {$CREATED_BY_NAME}'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
/* 'LBL_ITEMS_TAB' => array(
|
||||
|
||||
array(
|
||||
|
||||
array(
|
||||
'name' => 'items_list_panel',
|
||||
'allCols' => true,
|
||||
|
||||
'hideLabel' => true,
|
||||
|
||||
'customCode' => '<div id="itemsTable"></div>'
|
||||
)
|
||||
)
|
||||
)*/
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
288
modules/EcmAgreements/metadata/editviewdefs.php
Executable file
288
modules/EcmAgreements/metadata/editviewdefs.php
Executable file
@@ -0,0 +1,288 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* *******************************************************************************/
|
||||
global $sugar_config;
|
||||
$viewdefs ['EcmAgreements'] ['EditView'] = array (
|
||||
'templateMeta' => array (
|
||||
'form' => array (
|
||||
'enctype' => 'multipart/form-data',
|
||||
'buttons' => array (
|
||||
'SAVE',
|
||||
'CANCEL'
|
||||
),
|
||||
'hidden' => array (
|
||||
'<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>',
|
||||
'<input type="hidden" name="new_number" id="new_number" value=\'{$NEW_NUMBER}\'>',
|
||||
'<input type="hidden" name="is_correct" id="is_correct" value=\'{$IS_CORRECT}\'>',
|
||||
'<input type="hidden" name="is_wz" id="is_wz" value=\'{$IS_WZ}\'>',
|
||||
'<input type="hidden" name="wz_id" id="wz_id" value=\'{$WZ_ID}\'>',
|
||||
'<input type="hidden" name="wz_name" id="wz_name" value=\'{$WZ_NAME}\'>',
|
||||
'<input type="hidden" name="so_id" id="so_id" value=\'{$SO_ID}\'>',
|
||||
'<input type="hidden" name="vats_summary" id="vats_summary" value=\'\'>',
|
||||
'<input type="hidden" id="total_interest_rate" name="total_interest_rate" value=\'{$fields.total_interest_rate.value}\'>',
|
||||
'<input type="hidden" id="total_total" name="total_total" value=\'{$fields.total_total.value}\'>',
|
||||
'<input type="hidden" id="total_rate_of_commission" name="total_rate_of_commission" value=\'{$fields.total_rate_of_commission.value}\'>',
|
||||
'<input type="hidden" id="total_principal_value" name="total_principal_value" value=\'{$fields.total_principal_value.value}\'>',
|
||||
'<input type="hidden" id="duplicate" name="duplicate" value=\'{$DUPLICATE}\'>',
|
||||
)
|
||||
),
|
||||
'maxColumns' => '2',
|
||||
'widths' => array (
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
),
|
||||
array (
|
||||
'label' => '10',
|
||||
'field' => '30'
|
||||
)
|
||||
),
|
||||
'includes' => array (
|
||||
array (
|
||||
'file' => 'include/JSON.js'
|
||||
),
|
||||
|
||||
array (
|
||||
'file' => 'modules/EcmAgreements/javascript/EcmAgreements.js'
|
||||
),
|
||||
|
||||
array (
|
||||
'file' => 'modules/EcmAgreements/javascript/bimit_table.js'
|
||||
),
|
||||
|
||||
array (
|
||||
'file' => 'modules/EcmAgreements/javascript/columndefs.js'
|
||||
),
|
||||
array (
|
||||
'file' => 'include/ECM/EcmDocumentNumberGenerator/EcmDocumentNumberGenerator.js'
|
||||
),
|
||||
|
||||
)
|
||||
),
|
||||
'panels' => array (
|
||||
'LBL_DETAILS_TAB' => array (
|
||||
array (
|
||||
array (
|
||||
'type' => 'tab',
|
||||
'active' => true
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'document_no',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<div id="tst" style="display:none;"></div><input readonly="readonly" type="text" name="document_no" id="document_no" value=\'{$fields.document_no.value}\'>
|
||||
<input type="hidden" name="number" id="number" value=\'{$fields.number.value}\'>'
|
||||
),
|
||||
array (
|
||||
'name' => 'assigned_user_name',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_name',
|
||||
'tabIndex' => '1'
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'register_date',
|
||||
'tabIndex' => '1',
|
||||
'type' => 'datetime',
|
||||
'displayParams' => array (
|
||||
'showFormats' => true
|
||||
)
|
||||
),
|
||||
array (
|
||||
'name' => 'contact_name',
|
||||
'tabIndex' => '1'
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'date_of_the_loan',
|
||||
'tabIndex' => '1',
|
||||
'type' => 'datetime',
|
||||
'displayParams' => array (
|
||||
'showFormats' => true
|
||||
)
|
||||
),
|
||||
array (
|
||||
'name' => 'contact_position',
|
||||
'tabIndex' => '1'
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'date_end',
|
||||
'tabIndex' => '1',
|
||||
'type' => 'datetime',
|
||||
'displayParams' => array (
|
||||
'showFormats' => true
|
||||
)
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'amount',
|
||||
'tabIndex' => '1'
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '{include file="modules/EcmAgreements/tpl/EditViewAditionalFields.tpl"}'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '<div class="tabForm" style="border-top:none;width:100%;height:1px;padding:0px;align:center;"></div><h4>{$MOD.LBL_TO_INFORMATIONS}</h4>'
|
||||
)
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_name_copy',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input type="text" name="parent_name_copy" id="parent_name_copy" value="{$fields.parent_name.value}" readOnly="readonly" size="30" />'
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_nip',
|
||||
'tabIndex' => '1'
|
||||
),
|
||||
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_regon',
|
||||
'tabIndex' => '1'
|
||||
),
|
||||
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_address_street',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<textarea tabindex="1" id="parent_address_street" name="parent_address_street" rows="2" cols="30" maxlength="150" >{$fields.parent_address_street.value}</textarea>'
|
||||
),
|
||||
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_address_city',
|
||||
'tabIndex' => '1',
|
||||
'customCode' => '<input maxlength="8" type="text" name="parent_address_postalcode" id="parent_address_postalcode" value="{$fields.parent_address_postalcode.value}" style="vertical-align:top;width:80px;" /> <input type="text" name="parent_address_city" id="parent_address_city" value="{$fields.parent_address_city.value}" style="vertical-align:top;width:150px;" />'
|
||||
),
|
||||
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'name' => 'parent_address_country',
|
||||
'tabIndex' => '1'
|
||||
)
|
||||
),
|
||||
),
|
||||
/* 'LBL_ITEMS_TAB' => array (
|
||||
0 =>
|
||||
array (
|
||||
0 => array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '
|
||||
<input type="button" name="oblicz" value="Oblicz" onclick="ObliczRaty();">
|
||||
|
||||
<br><div id="itemsTable"></div>'
|
||||
),
|
||||
),
|
||||
),
|
||||
'LBL_AGREEMENT_TAB' => array (
|
||||
array(
|
||||
array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => false,
|
||||
'name' => 'a2_5',
|
||||
'displayParams' => array (
|
||||
'rows' => 6,
|
||||
'cols'=>100,
|
||||
),
|
||||
),
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => false,
|
||||
'name' => 'a7_1',
|
||||
'displayParams' => array (
|
||||
'rows' => 6,
|
||||
'cols'=>100,
|
||||
),
|
||||
),
|
||||
|
||||
),
|
||||
array (
|
||||
'rate'
|
||||
|
||||
),
|
||||
array (
|
||||
array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '
|
||||
<link rel="stylesheet" type="text/css" href="modules/Accounts/MyTable.css"/>
|
||||
Harmonogram wypłat kredytu
|
||||
<div style="width:90%;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;">
|
||||
<table id="formaWplatyTable" class="positions">
|
||||
</table>
|
||||
</div>'
|
||||
),
|
||||
),
|
||||
), */
|
||||
'LBL_PDF_AGREEMENT' => array (
|
||||
0 =>
|
||||
array (
|
||||
0 => array (
|
||||
'allCols' => true,
|
||||
'hideLabel' => true,
|
||||
'customCode' => '{include file="modules/EcmAgreements/tpl/EditViewPDFTemplate.tpl"}'
|
||||
),
|
||||
),
|
||||
),
|
||||
)
|
||||
);
|
||||
102
modules/EcmAgreements/metadata/listviewdefs.php
Executable file
102
modules/EcmAgreements/metadata/listviewdefs.php
Executable file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
$listViewDefs["EcmAgreements"] = array(
|
||||
|
||||
'DOCUMENT_NO' => array(
|
||||
'width' => '5',
|
||||
'label' => 'LBL_DOCUMENT_NO',
|
||||
'sortable' => true,
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
'PARENT_NAME' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_PARENT_NAME',
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
'TOTAL_TOTAL' => array(
|
||||
'width' => '10',
|
||||
'label' => 'Wartość brutto',
|
||||
'align' => 'right',
|
||||
'default' => true,
|
||||
),
|
||||
|
||||
'MODIFIED_BY_NAME' => array(
|
||||
'width' => '10',
|
||||
'label' => 'LBL_MODIFIED_USER',
|
||||
'module' => 'Users',
|
||||
'id' => 'USERS_ID',
|
||||
'default' => false,
|
||||
'sortable' => false,
|
||||
'related_fields' => array('modified_user_id'),
|
||||
),
|
||||
|
||||
'REGISTER_DATE' => array(
|
||||
'width' => '15',
|
||||
'label' => 'LBL_REGISTER_DATE',
|
||||
'default' => true,
|
||||
'sortable' => true,
|
||||
),
|
||||
|
||||
'OPTIONS' => array (
|
||||
'width' => '2',
|
||||
'label' => 'PDF',
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
'align' => 'center',
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
?>
|
||||
121
modules/EcmAgreements/metadata/searchdefs.php
Executable file
121
modules/EcmAgreements/metadata/searchdefs.php
Executable file
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
|
||||
$searchdefs['EcmAgreements'] = array (
|
||||
|
||||
'templateMeta' => array (
|
||||
|
||||
'maxColumns' => '2',
|
||||
|
||||
'widths' => array (
|
||||
|
||||
'label' => '10',
|
||||
|
||||
'field' => '30'
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
'layout' => array (
|
||||
|
||||
'basic_search' => array (
|
||||
'document_no',
|
||||
'name',
|
||||
|
||||
|
||||
|
||||
|
||||
array('name'=>'current_user_only', 'label'=>'LBL_CURRENT_USER_FILTER', 'type'=>'bool'),
|
||||
|
||||
),
|
||||
|
||||
'advanced_search' => array (
|
||||
'document_no',
|
||||
'name',
|
||||
|
||||
|
||||
|
||||
'parent_name',
|
||||
|
||||
'register_date',
|
||||
|
||||
),
|
||||
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
76
modules/EcmAgreements/metadata/studio.php
Executable file
76
modules/EcmAgreements/metadata/studio.php
Executable file
@@ -0,0 +1,76 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/*****************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
********************************************************************************/
|
||||
|
||||
$GLOBALS['studioDefs']['EcmAgreements'] = array(
|
||||
'LBL_DETAILVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmAgreements/DetailView.html',
|
||||
'php_file' => 'modules/EcmAgreements/DetailView.php',
|
||||
'type' => 'DetailView',
|
||||
),
|
||||
'LBL_EDITVIEW'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmAgreements/EditView.html',
|
||||
'php_file' => 'modules/EcmAgreements/EditView.php',
|
||||
'type' => 'EditView',
|
||||
),
|
||||
'LBL_LISTVIEW'=>array(
|
||||
'template' => 'listview',
|
||||
'meta_file' => 'modules/EcmAgreements/listviewdefs.php',
|
||||
'type' => 'ListView',
|
||||
),
|
||||
'LBL_SEARCHFORM'=>array(
|
||||
'template' => 'xtpl',
|
||||
'template_file' => 'modules/EcmAgreements/SearchForm.html',
|
||||
'php_file' => 'modules/EcmAgreements/ListView.php',
|
||||
'type' => 'SearchForm',
|
||||
),
|
||||
|
||||
);
|
||||
115
modules/EcmAgreements/metadata/subpaneldefs.php
Executable file
115
modules/EcmAgreements/metadata/subpaneldefs.php
Executable file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/**
|
||||
|
||||
* Layout definition for Accounts
|
||||
|
||||
*
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
*/
|
||||
|
||||
|
||||
$layout_defs['EcmAgreements']['subpanel_setup'] = array (
|
||||
|
||||
'documents' => array(
|
||||
'order' => 130,
|
||||
'module' => 'Documents',
|
||||
'subpanel_name' => 'default',
|
||||
'get_subpanel_data' => 'documents',
|
||||
'title_key' => 'Dokumenty',
|
||||
),
|
||||
/*
|
||||
'emails' => array (
|
||||
|
||||
'order' => 15,
|
||||
|
||||
'module' => 'Emails',
|
||||
|
||||
'sort_order' => 'asc',
|
||||
|
||||
'sort_by' => 'date_modified',
|
||||
|
||||
'get_subpanel_data' => 'emails',
|
||||
|
||||
'add_subpanel_data' => 'emails_id',
|
||||
|
||||
'subpanel_name' => 'ForEcmAgreements',
|
||||
|
||||
'title_key' => 'LBL_EMAILS_SUBPANEL_TITLE',
|
||||
|
||||
'top_buttons' => array(),
|
||||
|
||||
),
|
||||
*/
|
||||
);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
124
modules/EcmAgreements/metadata/subpanels/default.php
Executable file
124
modules/EcmAgreements/metadata/subpanels/default.php
Executable file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
/**
|
||||
* Subpanel Layout definition for Contacts
|
||||
*
|
||||
* 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".
|
||||
*/
|
||||
|
||||
$subpanel_layout = array(
|
||||
'top_buttons' => array(
|
||||
array('widget_class' => 'SubPanelTopCreateButton'),
|
||||
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmAgreements'),
|
||||
),
|
||||
|
||||
'where' => '',
|
||||
|
||||
|
||||
|
||||
'list_fields' => array (
|
||||
|
||||
'status' => array (
|
||||
'name' => 'status',
|
||||
'vname' => 'LBL_STATUS',
|
||||
'module' => 'EcmAgreements',
|
||||
'width' => '5%',
|
||||
),
|
||||
/*
|
||||
'number' => array (
|
||||
'name' => 'number',
|
||||
'vname' => 'LBL_NUMBER',
|
||||
'module' => 'EcmAgreements',
|
||||
'usage' => 'query_only',
|
||||
),
|
||||
*/
|
||||
'document_no' => array (
|
||||
'name' => 'document_no',
|
||||
'vname' => 'LBL_DOCUMENT_NO',
|
||||
'module' => 'EcmAgreements',
|
||||
'widget_class' => 'SubPanelDetailViewLink',
|
||||
'width' => '15%',
|
||||
),
|
||||
|
||||
'name' => array (
|
||||
'name' => 'name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'module' => 'EcmAgreements',
|
||||
'width' => '40%'
|
||||
),
|
||||
|
||||
'total' => array (
|
||||
'name' => 'total',
|
||||
'vname' => 'LBL_TOTAL',
|
||||
'module' => 'EcmAgreements',
|
||||
'width' => '15%',
|
||||
),
|
||||
|
||||
'register_date' => array (
|
||||
'name' => 'register_date',
|
||||
'vname' => 'LBL_REGISTER_DATE',
|
||||
'module' => 'EcmAgreements',
|
||||
'width' => '10%',
|
||||
),
|
||||
'price' => array (
|
||||
'name' => 'price',
|
||||
'vname' => 'Cena',
|
||||
'module' => 'EcmStockDocIns',
|
||||
'width' => '5%',
|
||||
),
|
||||
'options' => array (
|
||||
'name' => 'options',
|
||||
'label' => ' ',
|
||||
'default' => true,
|
||||
'width' => '2%',
|
||||
'sortable' => false,
|
||||
),
|
||||
/*
|
||||
'PDF_URL' => array(
|
||||
'width' => '2%',
|
||||
'label' => ' ',
|
||||
'link' => true,
|
||||
'default' => true,
|
||||
'sortable' => false,
|
||||
),
|
||||
|
||||
'edit_button'=>array(
|
||||
'widget_class' => 'SubPanelEditButton',
|
||||
'width' => '2%',
|
||||
),
|
||||
*/
|
||||
|
||||
),
|
||||
);
|
||||
?>
|
||||
947
modules/EcmAgreements/vardefs.php
Executable file
947
modules/EcmAgreements/vardefs.php
Executable file
@@ -0,0 +1,947 @@
|
||||
<?php
|
||||
if (!defined('sugarEntry') || !sugarEntry)
|
||||
die('Not A Valid Entry Point');
|
||||
/**
|
||||
* ***************************************************************************
|
||||
* The contents of this file are subject to the RECIPROCAL PUBLIC LICENSE
|
||||
* Version 1.1 ("License"); You may not use this file except in compliance
|
||||
* with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* http://opensource.org/licenses/rpl.php. Software distributed under the
|
||||
* License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND,
|
||||
* either express or implied.
|
||||
*
|
||||
* You may:
|
||||
* a) Use and distribute this code exactly as you received without payment or
|
||||
* a royalty or other fee.
|
||||
* b) Create extensions for this code, provided that you make the extensions
|
||||
* publicly available and document your modifications clearly.
|
||||
* c) Charge for a fee for warranty or support or for accepting liability
|
||||
* obligations for your customers.
|
||||
*
|
||||
* You may NOT:
|
||||
* a) Charge for the use of the original code or extensions, including in
|
||||
* electronic distribution models, such as ASP (Application Service
|
||||
* Provider).
|
||||
* b) Charge for the original source code or your extensions other than a
|
||||
* nominal fee to cover distribution costs where such distribution
|
||||
* involves PHYSICAL media.
|
||||
* c) Modify or delete any pre-existing copyright notices, change notices,
|
||||
* or License text in the Licensed Software
|
||||
* d) Assert any patent claims against the Licensor or Contributors, or
|
||||
* which would in any way restrict the ability of any third party to use the
|
||||
* Licensed Software.
|
||||
*
|
||||
* You must:
|
||||
* a) Document any modifications you make to this code including the nature of
|
||||
* the change, the authors of the change, and the date of the change.
|
||||
* b) Make the source code for any extensions you deploy available via an
|
||||
* Electronic Distribution Mechanism such as FTP or HTTP download.
|
||||
* c) Notify the licensor of the availability of source code to your extensions
|
||||
* and include instructions on how to acquire the source code and updates.
|
||||
* d) Grant Licensor a world-wide, non-exclusive, royalty-free license to use,
|
||||
* reproduce, perform, modify, sublicense, and distribute your extensions.
|
||||
*
|
||||
* The Original Code is: CommuniCore
|
||||
* Olavo Farias
|
||||
* 2006-04-7 olavo.farias@gmail.com
|
||||
*
|
||||
* The Initial Developer of the Original Code is CommuniCore.
|
||||
* Portions created by CommuniCore are Copyright (C) 2005 CommuniCore Ltda
|
||||
* All Rights Reserved.
|
||||
* ******************************************************************************
|
||||
*/
|
||||
$dictionary['EcmAgreement'] = array(
|
||||
'table' => "ecmagreements",
|
||||
'comment' => 'EcmAgreements',
|
||||
'duplicate_merge' => true,
|
||||
'unified_search' => true,
|
||||
// FIELDS SECTION
|
||||
'fields' => array(
|
||||
// STANDARD FIELDS SECTION
|
||||
'id' => array(
|
||||
'name' => 'id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => true,
|
||||
'reportable' => false,
|
||||
'comment' => 'Unique identifier'
|
||||
),
|
||||
/* 'amount' => array(
|
||||
'name' => 'amount',
|
||||
'vname' => 'LBL_AMOUNT',
|
||||
'type' => 'name',
|
||||
'required' => true,
|
||||
'dbType' => 'decimal',
|
||||
'len' => '15,2',
|
||||
'unified_search' => true,
|
||||
'comment' => 'The short description of the record contents',
|
||||
'massupdate' => true,
|
||||
'merge_filter' => 'selected'
|
||||
),*/
|
||||
'wz_id' => array(
|
||||
'name' => 'wz_id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => false,
|
||||
'reportable' => false,
|
||||
'comment' => 'Unique identifier'
|
||||
),
|
||||
'so_id' => array(
|
||||
'name' => 'so_id',
|
||||
'vname' => 'LBL_ID',
|
||||
'type' => 'id',
|
||||
'required' => false,
|
||||
'reportable' => false,
|
||||
'comment' => 'Unique identifier'
|
||||
),
|
||||
'wz_name' => array(
|
||||
'name' => 'wz_name',
|
||||
'vname' => 'LBL_NAME',
|
||||
'type' => 'name',
|
||||
'required' => false,
|
||||
'dbType' => 'varchar',
|
||||
'len' => 255,
|
||||
'unified_search' => true,
|
||||
'comment' => 'The short description of the record contents',
|
||||
'massupdate' => true,
|
||||
'merge_filter' => 'selected'
|
||||
),
|
||||
'description' => array(
|
||||
'type' => 'text',
|
||||
'name' => 'description',
|
||||
'vname' => 'LBL_DESCRIPTION',
|
||||
'comment' => 'Description',
|
||||
'unified_search' => true
|
||||
// 'required' => true,
|
||||
),
|
||||
'pdf_text' => array(
|
||||
'type' => 'text',
|
||||
'name' => 'pdf_text',
|
||||
'vname' => 'LBL_PDF_TEXT',
|
||||
'comment' => 'pdf_text',
|
||||
'unified_search' => false,
|
||||
// 'required' => true,
|
||||
),
|
||||
'date_entered' => array(
|
||||
'name' => 'date_entered',
|
||||
'vname' => 'LBL_DATE_ENTERED',
|
||||
'type' => 'datetime',
|
||||
'required' => true,
|
||||
'comment' => 'Date record created'
|
||||
),
|
||||
'date_end' => array(
|
||||
'name' => 'date_end',
|
||||
'vname' => 'LBL_DATE_END',
|
||||
'type' => 'date',
|
||||
'required' => true,
|
||||
'comment' => 'Date record created'
|
||||
),
|
||||
'date_modified' => array(
|
||||
'name' => 'date_modified',
|
||||
'vname' => 'LBL_DATE_MODIFIED',
|
||||
'type' => 'datetime',
|
||||
'required' => true,
|
||||
'comment' => 'Date record last modified'
|
||||
),
|
||||
'modified_user_id' => array(
|
||||
'name' => 'modified_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'modified_user_id',
|
||||
'vname' => 'LBL_MODIFIED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'modified_user_id_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'varchar',
|
||||
'len' => 36,
|
||||
'required' => true,
|
||||
'reportable' => true,
|
||||
'comment' => 'User who last modified record'
|
||||
),
|
||||
'assigned_user_id' => array(
|
||||
'name' => 'assigned_user_id',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'vname' => 'LBL_ASSIGNED_TO_ID',
|
||||
'group' => 'assigned_user_name',
|
||||
'type' => 'relate',
|
||||
'table' => 'users',
|
||||
'reportable' => true,
|
||||
'Importable' => false,
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'audited' => true,
|
||||
'comment' => 'User ID assigned to record',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false
|
||||
),
|
||||
'assigned_user_name' => array(
|
||||
'name' => 'assigned_user_name',
|
||||
'vname' => 'LBL_ASSIGNED_TO',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'users',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'module' => 'Users',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false
|
||||
),
|
||||
'created_by' => array(
|
||||
'name' => 'created_by',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'created_by',
|
||||
'vname' => 'LBL_CREATED',
|
||||
'type' => 'assigned_user_name',
|
||||
'table' => 'created_by_users',
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'varchar',
|
||||
'len' => 36,
|
||||
'comment' => 'User that created the record'
|
||||
),
|
||||
'created_by_link' => array(
|
||||
'name' => 'created_by_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmagreements' . '_created_by',
|
||||
'vname' => 'LBL_CREATED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'modified_user_link' => array(
|
||||
'name' => 'modified_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmagreements' . '_modified_user',
|
||||
'vname' => 'LBL_MODIFIED_BY_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'assigned_user_link' => array(
|
||||
'name' => 'assigned_user_link',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmagreements' . '_assigned_user',
|
||||
'vname' => 'LBL_ASSIGNED_TO_USER',
|
||||
'link_type' => 'one',
|
||||
'module' => 'Users',
|
||||
'bean_name' => 'User',
|
||||
'source' => 'non-db',
|
||||
'duplicate_merge' => 'enabled',
|
||||
'rname' => 'user_name',
|
||||
'id_name' => 'assigned_user_id',
|
||||
'table' => 'users'
|
||||
),
|
||||
'deleted' => array(
|
||||
'name' => 'deleted',
|
||||
'vname' => 'LBL_DELETED_BY',
|
||||
'type' => 'bool',
|
||||
'required' => true,
|
||||
'reportable' => false,
|
||||
'comment' => 'Record deletion indicator'
|
||||
),
|
||||
// NEW FIELDS SECTION
|
||||
'number' => array(
|
||||
'name' => 'number',
|
||||
'vname' => 'LBL_NUMBER',
|
||||
'type' => 'varchar',
|
||||
'required_option' => true,
|
||||
'unified_search' => true,
|
||||
'required' => true,
|
||||
'len' => '20'
|
||||
),
|
||||
'document_no' => array(
|
||||
'name' => 'document_no',
|
||||
'vname' => 'LBL_DOCUMENT_NO',
|
||||
'type' => 'varchar',
|
||||
'required_option' => true,
|
||||
'unified_search' => true,
|
||||
'required' => true,
|
||||
'len' => '30'
|
||||
),
|
||||
'parent_id' => array(
|
||||
'name' => 'parent_id',
|
||||
'rname' => 'name',
|
||||
'id_name' => 'parent_id',
|
||||
'vname' => 'LBL_PARENT_ID',
|
||||
'group' => 'parent_name',
|
||||
'type' => 'relate',
|
||||
'table' => 'accounts',
|
||||
'reportable' => true,
|
||||
'Importable' => false,
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'audited' => true,
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false
|
||||
),
|
||||
'parent_name' => array(
|
||||
'name' => 'parent_name',
|
||||
'vname' => 'LBL_PARENT_NAME',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'required' => true,
|
||||
'source' => 'non-db',
|
||||
'table' => 'accounts',
|
||||
'id_name' => 'parent_id',
|
||||
'module' => 'Accounts',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false
|
||||
),
|
||||
'type' => array(
|
||||
'name' => 'type',
|
||||
'vname' => 'LBL_TYPE',
|
||||
'required' => true,
|
||||
'default' => 'normal',
|
||||
'type' => 'enum',
|
||||
'options' => 'ecmagreements_type_dom',
|
||||
'massupdate' => false
|
||||
),
|
||||
'ecmagreement_id' => array(
|
||||
'name' => 'ecmagreement_id',
|
||||
'type' => 'id',
|
||||
'vname' => 'LBL_ECMINVOICEOUT_ID',
|
||||
'group' => 'ecmagreement_name',
|
||||
'reportable' => false
|
||||
),
|
||||
'ecmagreement_name' => array(
|
||||
'name' => 'ecmagreement_name',
|
||||
'rname' => 'document_no',
|
||||
// 'db_concat_fields'=> array(0=>'name'),
|
||||
// 'source' => 'non-db',
|
||||
'dbType' => 'varchar',
|
||||
'len' => '255',
|
||||
'group' => 'ecmagreement_name',
|
||||
'vname' => 'LBL_ECMINVOICEOUT_NAME',
|
||||
'reportable' => false,
|
||||
'id_name' => 'ecmagreement_id',
|
||||
'join_name' => 'ecmagreements',
|
||||
'type' => 'relate',
|
||||
'module' => 'EcmAgreements',
|
||||
'link' => 'ecmagreements'
|
||||
),
|
||||
'date_of_the_loan' => array(
|
||||
'name' => 'date_of_the_loan',
|
||||
'vname' => 'LBL_DATE_OF_THE_LOAN',
|
||||
'type' => 'date',
|
||||
'reportable' => false,
|
||||
'showFormats' => true,
|
||||
'massupdate' => false,
|
||||
'required' => true
|
||||
),
|
||||
'stock_name' => array(
|
||||
'name' => 'stock_name',
|
||||
'vname' => 'LBL_STOCK_NAME',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'ecmstocks',
|
||||
'id_name' => 'stock_id',
|
||||
'module' => 'EcmStocks',
|
||||
'group' => 'stock_name',
|
||||
'massupdate' => false,
|
||||
'required' => false
|
||||
),
|
||||
'stock_id' => array(
|
||||
'name' => 'stock_id',
|
||||
'type' => 'enum',
|
||||
'module' => 'EcmStocks',
|
||||
'table' => 'ecmstocks',
|
||||
'vname' => 'LBL_STOCK_NAME',
|
||||
'group' => 'stock_name',
|
||||
'options' => 'ecmstocks_list_dom',
|
||||
'required' => false,
|
||||
'massupdate' => false
|
||||
),
|
||||
'interest_rate' => array(
|
||||
'name' => 'interest_rate',
|
||||
'vname' => 'LBL_INTEREST_RATE',
|
||||
'type' => 'decimal',
|
||||
'required' => true,
|
||||
'len' => '2,2'
|
||||
),
|
||||
'rate_of_commission' => array(
|
||||
'name' => 'rate_of_commission',
|
||||
'vname' => 'LBL_RAFE_OF_COMMISSION',
|
||||
'type' => 'decimal',
|
||||
'required' => true,
|
||||
'len' => '2,2'
|
||||
),
|
||||
'status' => array(
|
||||
'name' => 'status',
|
||||
'vname' => 'LBL_STATUS',
|
||||
'type' => 'enum',
|
||||
'size' => '3',
|
||||
'options' => 'ecmagreements_status_dom',
|
||||
'massupdate' => false
|
||||
),
|
||||
'register_date' => array(
|
||||
'name' => 'register_date',
|
||||
'vname' => 'LBL_REGISTER_DATE',
|
||||
'type' => 'date',
|
||||
'reportable' => false,
|
||||
'showFormats' => true,
|
||||
'massupdate' => false,
|
||||
'required' => true
|
||||
),
|
||||
'parent_name_copy' => array(
|
||||
'name' => 'parent_name_copy',
|
||||
'vname' => 'LBL_PARENT_NAME_COPY',
|
||||
'type' => 'varchar',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'parent_address_street' => array(
|
||||
'name' => 'parent_address_street',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_STREET',
|
||||
'type' => 'varchar',
|
||||
'len' => '150',
|
||||
'comment' => 'The street address used for parent address',
|
||||
'group' => 'parent_address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'documents' => array(
|
||||
'name' => 'documents',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmagreement_documents',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_NOTES'
|
||||
),
|
||||
'parent_address_city' => array(
|
||||
'name' => 'parent_address_city',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_CITY',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
'comment' => 'The city used for parent address',
|
||||
'group' => 'parent_address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'parent_address_postalcode' => array(
|
||||
'name' => 'parent_address_postalcode',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_POSTALCODE',
|
||||
'type' => 'varchar',
|
||||
'len' => '20',
|
||||
'group' => 'parent_address',
|
||||
'comment' => 'The postal code used for parent address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'parent_address_country' => array(
|
||||
'name' => 'parent_address_country',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_COUNTRY',
|
||||
'type' => 'varchar',
|
||||
'group' => 'parent_address',
|
||||
'comment' => 'The country used for the parent address',
|
||||
'merge_filter' => 'enabled'
|
||||
),
|
||||
'total_interest_rate' => array(
|
||||
'name' => 'total_interest_rate',
|
||||
'vname' => 'LBL_SUBTOTAL',
|
||||
'type' => 'varchar',
|
||||
'len' => '20'
|
||||
),
|
||||
'total_total' => array(
|
||||
'name' => 'total_total',
|
||||
'vname' => 'LBL_VAT',
|
||||
'type' => 'varchar',
|
||||
'len' => '20'
|
||||
),
|
||||
'rate' => array(
|
||||
'name' => 'rate',
|
||||
'vname' => 'LBL_RATE',
|
||||
'type' => 'varchar',
|
||||
'len' => '20'
|
||||
),
|
||||
'total_rate_of_commission' => array(
|
||||
'name' => 'total_rate_of_commission',
|
||||
'vname' => 'LBL_TOTAL',
|
||||
'type' => 'varchar',
|
||||
'len' => '20'
|
||||
),
|
||||
'total_principal_value' => array(
|
||||
'name' => 'total_principal_value',
|
||||
'vname' => 'LBL_TOTAL',
|
||||
'type' => 'varchar',
|
||||
'len' => '20'
|
||||
),
|
||||
|
||||
'parent_nip' => array(
|
||||
'name' => 'parent_nip',
|
||||
'vname' => 'LBL_PARENT_NIP',
|
||||
'type' => 'varchar',
|
||||
'len' => 15
|
||||
),
|
||||
'contact_position' => array(
|
||||
'name' => 'contact_position',
|
||||
'vname' => 'LBL_CONTACT_POSITION',
|
||||
'type' => 'varchar',
|
||||
'len' => 15
|
||||
),
|
||||
'parent_regon' => array(
|
||||
'name' => 'parent_regon',
|
||||
'vname' => 'LBL_PARENT_REGON',
|
||||
'type' => 'varchar',
|
||||
'len' => 15
|
||||
),
|
||||
'parent_nip_unformated' => array(
|
||||
'name' => 'parent_nip_unformated',
|
||||
'vname' => 'LBL_PARENT_NIP',
|
||||
'type' => 'varchar',
|
||||
'len' => 15
|
||||
),
|
||||
'ecmlanguage' => array(
|
||||
'name' => 'ecmlanguage',
|
||||
'vname' => 'LBL_ECMLANGUAGE',
|
||||
'type' => 'enum',
|
||||
'options' => 'ecmlanguages_dom',
|
||||
'required' => true,
|
||||
'len' => 35,
|
||||
'massupdate' => false
|
||||
),
|
||||
'no_tax' => array(
|
||||
'massupdate' => false,
|
||||
'name' => 'no_tax',
|
||||
'vname' => 'LBL_NO_TAX',
|
||||
'type' => 'bool',
|
||||
'default' => '0'
|
||||
),
|
||||
'number_of_installments' => array(
|
||||
'name' => 'number_of_installments',
|
||||
'vname' => 'LBL_NUMBER_OF_INSTALLMENTS',
|
||||
'type' => 'decimal',
|
||||
'required' => true,
|
||||
'len' => '10'
|
||||
),
|
||||
//prices
|
||||
'ecmprice_id' => array(
|
||||
'name' => 'ecmprice_id',
|
||||
'type' => 'varchar',
|
||||
'len' => '36',
|
||||
'vname' => 'LBL_PRICE',
|
||||
'source' => 'non_db'
|
||||
),
|
||||
'ecmprice_name' => array(
|
||||
'name' => 'ecmprice_name',
|
||||
'type' => 'relate',
|
||||
'id_name' => 'ecmprice_id',
|
||||
'module' => 'EcmPrices',
|
||||
'len' => '30',
|
||||
'vname' => 'LBL_PRICE',
|
||||
'source' => 'non-db',
|
||||
'rname' => 'name'
|
||||
),
|
||||
//end prices
|
||||
'contact_id' => array(
|
||||
'name' => 'contact_id',
|
||||
'rname' => 'name',
|
||||
'id_name' => 'contact_id',
|
||||
'vname' => 'LBL_CONTACT_ID',
|
||||
'group' => 'contact_name',
|
||||
'type' => 'relate',
|
||||
'table' => 'contacts',
|
||||
'reportable' => true,
|
||||
'Importable' => false,
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'audited' => false,
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false
|
||||
),
|
||||
'contact_name' => array(
|
||||
'name' => 'contact_name',
|
||||
'vname' => 'LBL_CONTACT_NAME',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'contacts',
|
||||
'id_name' => 'contact_id',
|
||||
'module' => 'Contacts',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false,
|
||||
'other_data' => array(
|
||||
'from_relation' => array(
|
||||
'module' => 'Accounts',
|
||||
'rel_name' => 'contacts',
|
||||
'rel_bean_name' => 'Contact',
|
||||
'field_id_name' => 'parent_id',
|
||||
'field_name' => 'parent_name',
|
||||
'field_id_value' => ''
|
||||
)
|
||||
),
|
||||
'initial_filter_fields' => array(
|
||||
'account_name' => 'parent_name'
|
||||
)
|
||||
),
|
||||
'currency_id' => array(
|
||||
'name' => 'currency_id',
|
||||
'type' => 'enum',
|
||||
'options' => 'currency_dom',
|
||||
'label' => 'LBL_CURRENCY'
|
||||
),
|
||||
'principal_value' => array(
|
||||
'name' => 'principal_value',
|
||||
'type' => 'decimal',
|
||||
'len' => '14,2',
|
||||
'vname' => 'LBL_PRINCIPAL_VALUE',
|
||||
'reportable' => false,
|
||||
'required' => true
|
||||
),
|
||||
'parent_shipping_address_name' => array(
|
||||
'name' => 'parent_shipping_address_name',
|
||||
'vname' => 'LBL_PARENT_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '100'
|
||||
),
|
||||
'parent_shipping_address_street' => array(
|
||||
'name' => 'parent_shipping_address_street',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_STREET',
|
||||
'type' => 'varchar',
|
||||
'len' => '100'
|
||||
),
|
||||
'parent_shipping_address_city' => array(
|
||||
'name' => 'parent_shipping_address_city',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_CITY',
|
||||
'type' => 'varchar',
|
||||
'len' => '100'
|
||||
),
|
||||
'parent_shipping_address_postalcode' => array(
|
||||
'name' => 'parent_shipping_address_id',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_POSTALCODE',
|
||||
'type' => 'varchar',
|
||||
'len' => '100'
|
||||
),
|
||||
'parent_shipping_address_country' => array(
|
||||
'name' => 'parent_shipping_address_country',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_COUNTRY',
|
||||
'type' => 'varchar',
|
||||
'len' => '100'
|
||||
),
|
||||
'pdf_template' => array(
|
||||
'name' => 'pdf_template',
|
||||
'vname' => 'Szablon PDF',
|
||||
'type' => 'varchar',
|
||||
'len' => '100',
|
||||
),
|
||||
'parent_payer_address_name' => array(
|
||||
'name' => 'parent_payer_address_name',
|
||||
'vname' => 'LBL_PARENT_NAME',
|
||||
'type' => 'varchar',
|
||||
'len' => '100'
|
||||
),
|
||||
'a2_5' => array(
|
||||
'name' => 'a2_5',
|
||||
'vname' => 'LBL_2_5',
|
||||
'type' => 'text',
|
||||
'default' => 'Strony uzgadniają, że przedmiot pożyczki będzie spłacany co miesiąc, począwszy już od pierwszego miesiąca co najmniej w kwocie xxx w stosunku miesięcznym (minimalna rata kapitałowa). Harmonogram spłaty pożyczki stanowi zał. nr 3 do umowy.'
|
||||
),
|
||||
'a7_1' => array(
|
||||
'name' => 'a7_1',
|
||||
'vname' => 'LBL_7_1',
|
||||
'type' => 'text',
|
||||
'default' => 'Strony zgodnie ustalają, iż w celu zabezpieczenia spłaty pożyczki Pożyczkobiorca ustanawia na rzecz
|
||||
Pożyczkodawcy zabezpieczenie w postaci wpisu na hipotekę, sporządzonego odrębną umową.'
|
||||
),
|
||||
'parent_payer_address_street' => array(
|
||||
'name' => 'parent_payer_address_street',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_STREET',
|
||||
'type' => 'varchar',
|
||||
'len' => '100'
|
||||
),
|
||||
'parent_payer_address_city' => array(
|
||||
'name' => 'parent_payer_address_city',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_CITY',
|
||||
'type' => 'varchar',
|
||||
'len' => '100'
|
||||
),
|
||||
'parent_payer_address_postalcode' => array(
|
||||
'name' => 'parent_payer_address_id',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_POSTALCODE',
|
||||
'type' => 'varchar',
|
||||
'len' => '100'
|
||||
),
|
||||
'parent_payer_address_country' => array(
|
||||
'name' => 'parent_payer_address_country',
|
||||
'vname' => 'LBL_PARENT_ADDRESS_COUNTRY',
|
||||
'type' => 'varchar',
|
||||
'len' => '100'
|
||||
),
|
||||
'paid_val' => array(
|
||||
'name' => 'paid_val',
|
||||
'vname' => 'LBL_PAID',
|
||||
'type' => 'decimal',
|
||||
'len' => '15,2',
|
||||
'required' => false
|
||||
),
|
||||
'prepaid' => array(
|
||||
'name' => 'prepaid',
|
||||
'vname' => 'LBL_PREPAID',
|
||||
'type' => 'decimal',
|
||||
'len' => '15,2',
|
||||
'required' => false
|
||||
),
|
||||
'prepaid_nr' => array(
|
||||
'name' => 'prepaid_nr',
|
||||
'vname' => 'LBL_PREPAID_NR',
|
||||
'type' => 'varchar',
|
||||
'len' => 100
|
||||
),
|
||||
'payment_date_d' => array(
|
||||
'name' => 'payment_date_d',
|
||||
'vname' => 'LBL_DAYS',
|
||||
'type' => 'varchar',
|
||||
'len' => 5
|
||||
),
|
||||
'payment_method' => array(
|
||||
'name' => 'payment_method',
|
||||
'vname' => 'LBL_PAYMENT_METHOD',
|
||||
'type' => 'enum',
|
||||
'options' => 'payment_method_dom'
|
||||
),
|
||||
'payment_method_paid' => array(
|
||||
'name' => 'payment_method_paid',
|
||||
'vname' => 'LBL_PAYMENT_METHOD_PAID',
|
||||
'type' => 'enum',
|
||||
'options' => 'ecmpaymentconditions_payment_method_dom',
|
||||
'massupdate' => false
|
||||
),
|
||||
'payment_date' => array(
|
||||
'name' => 'payment_date',
|
||||
'vname' => 'LBL_PAYMENT_DATE',
|
||||
'type' => 'date',
|
||||
'reportable' => false,
|
||||
'showFormats' => true,
|
||||
'massupdate' => false,
|
||||
'required' => false
|
||||
),
|
||||
'ecmpaymentcondition_id' => array(
|
||||
'name' => 'ecmpaymentcondition_id',
|
||||
'rname' => 'name',
|
||||
'id_name' => 'ecmpaymentcondition_id',
|
||||
'vname' => 'LBL_PAYMENTCONDITION_ID',
|
||||
'group' => 'ecmpaymentcondition_name',
|
||||
'type' => 'relate',
|
||||
'table' => 'ecmpaymentconditions',
|
||||
'reportable' => true,
|
||||
'Importable' => false,
|
||||
'isnull' => 'false',
|
||||
'dbType' => 'id',
|
||||
'audited' => true,
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false
|
||||
),
|
||||
'ecmpaymentcondition_name' => array(
|
||||
'name' => 'ecmpaymentcondition_name',
|
||||
'vname' => 'LBL_PAYMENTCONDITION_NAME',
|
||||
'type' => 'relate',
|
||||
'reportable' => false,
|
||||
'source' => 'non-db',
|
||||
'table' => 'ecmpaymentcondition',
|
||||
'id_name' => 'ecmpaymentcondition_id',
|
||||
'module' => 'EcmPaymentConditions',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false,
|
||||
'required' => false
|
||||
),
|
||||
'ecmpaymentcondition_text' => array(
|
||||
'name' => 'ecmpaymentcondition_text',
|
||||
'vname' => 'LBL_PAYMENTCONDITION_TEXT',
|
||||
'type' => 'text',
|
||||
'reportable' => false,
|
||||
'module' => 'EcmPaymentConditions',
|
||||
'duplicate_merge' => 'disabled',
|
||||
'massupdate' => false
|
||||
),
|
||||
|
||||
'pricebook_id' => array(
|
||||
'name' => 'pricebook_id',
|
||||
'vname' => 'LBL_PRICEBOOK_NAME',
|
||||
'type' => 'id',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'to_informations' => array(
|
||||
'name' => 'to_informations',
|
||||
'vname' => 'LBL_TO_INFORMATIONS',
|
||||
'type' => 'text',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'items_list_panel' => array(
|
||||
'name' => 'items_list_panel',
|
||||
'vname' => '',
|
||||
'type' => 'text',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
'preview_panel' => array(
|
||||
'name' => 'preview_panel',
|
||||
'vname' => 'LBL_PREVIEW',
|
||||
'type' => 'text',
|
||||
'source' => 'non-db'
|
||||
),
|
||||
// FOR SUBPANELS
|
||||
'account' => array(
|
||||
'name' => 'account',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmagreements_account',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_ACCOUNTS'
|
||||
),
|
||||
'contact' => array(
|
||||
'name' => 'contact',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmagreements_contact',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_CONTACTS'
|
||||
),
|
||||
'bugs' => array(
|
||||
'name' => 'bugs',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmagreements_bug',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_BUGS'
|
||||
),
|
||||
'notes' => array(
|
||||
'name' => 'notes',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmagreements_notes',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_NOTES'
|
||||
),
|
||||
'emails' => array(
|
||||
'name' => 'emails',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmagreements_emails',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_EMAILS'
|
||||
),
|
||||
'tasks' => array(
|
||||
'name' => 'tasks',
|
||||
'type' => 'link',
|
||||
'relationship' => 'ecmagreements_task',
|
||||
'source' => 'non-db',
|
||||
'vname' => 'LBL_TASKS'
|
||||
)
|
||||
),
|
||||
// INDICES SECTION
|
||||
'indices' => array(
|
||||
array(
|
||||
'name' => 'ecmagreements' . 'pk',
|
||||
'type' => 'primary',
|
||||
'fields' => array(
|
||||
'id'
|
||||
)
|
||||
),
|
||||
array(
|
||||
'name' => 'idx_' . 'ecmagreements' . '_document_no',
|
||||
'type' => 'index',
|
||||
'fields' => array(
|
||||
'document_no'
|
||||
)
|
||||
)
|
||||
),
|
||||
// RELATIONSHIPS SECTION
|
||||
'relationships' => array(
|
||||
'ecmagreements' . '_assigned_user' => array(
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmAgreements',
|
||||
'rhs_table' => 'ecmagreements',
|
||||
'rhs_key' => 'assigned_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmagreements' . '_modified_user' => array(
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmAgreements',
|
||||
'rhs_table' => 'ecmagreements',
|
||||
'rhs_key' => 'modified_user_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmagreements' . '_created_by' => array(
|
||||
'lhs_module' => 'Users',
|
||||
'lhs_table' => 'users',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmAgreements',
|
||||
'rhs_table' => 'ecmagreements',
|
||||
'rhs_key' => 'created_by',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmagreements' . '_account' => array(
|
||||
'lhs_module' => 'Accounts',
|
||||
'lhs_table' => 'accounts',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmAgreements',
|
||||
'rhs_table' => 'ecmagreements',
|
||||
'rhs_key' => 'parent_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmagreements' . '_contact' => array(
|
||||
'lhs_module' => 'Contacts',
|
||||
'lhs_table' => 'contacts',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmAgreements',
|
||||
'rhs_table' => 'ecmagreements',
|
||||
'rhs_key' => 'contact_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmagreements' . '_project' => array(
|
||||
'lhs_module' => 'Project',
|
||||
'lhs_table' => 'project',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmAgreements',
|
||||
'rhs_table' => 'ecmagreements',
|
||||
'rhs_key' => 'parent_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmagreements' . '_bug' => array(
|
||||
'lhs_module' => 'Bugs',
|
||||
'lhs_table' => 'bugs',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmAgreements',
|
||||
'rhs_table' => 'ecmagreements',
|
||||
'rhs_key' => 'parent_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmagreement_documents' => array(
|
||||
'lhs_module' => 'EcmAgreements',
|
||||
'lhs_table' => 'ecmagreements',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Documents',
|
||||
'rhs_table' => 'documents',
|
||||
'rhs_key' => 'parent_id',
|
||||
'relationship_type' => 'one-to-many',
|
||||
'relationship_role_column' => 'parent_type',
|
||||
'relationship_role_column_value' => 'EcmAgreements'
|
||||
),
|
||||
'ecmagreements_notes' => array(
|
||||
'lhs_module' => 'EcmAgreements',
|
||||
'lhs_table' => 'ecmagreements',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'Notes',
|
||||
'rhs_table' => 'notes',
|
||||
'rhs_key' => 'parent_id',
|
||||
'relationship_type' => 'one-to-many',
|
||||
'relationship_role_column' => 'parent_type',
|
||||
'relationship_role_column_value' => 'EcmAgreements'
|
||||
),
|
||||
'ecmagreements' . '_case' => array(
|
||||
'lhs_module' => 'Cases',
|
||||
'lhs_table' => 'cases',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmAgreements',
|
||||
'rhs_table' => 'ecmagreements',
|
||||
'rhs_key' => 'parent_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
),
|
||||
'ecmagreements' . '_task' => array(
|
||||
'lhs_module' => 'Tasks',
|
||||
'lhs_table' => 'tasks',
|
||||
'lhs_key' => 'id',
|
||||
'rhs_module' => 'EcmAgreements',
|
||||
'rhs_table' => 'ecmagreements',
|
||||
'rhs_key' => 'parent_id',
|
||||
'relationship_type' => 'one-to-many'
|
||||
)
|
||||
),
|
||||
// THIS FLAG ENABLES OPTIMISTIC LOCKING FOR SAVES FROM EDITVIEW
|
||||
'optimistic_locking' => true
|
||||
);
|
||||
95
modules/EcmAgreements/views/DetailView/view.detail.my.php
Executable file
95
modules/EcmAgreements/views/DetailView/view.detail.my.php
Executable file
@@ -0,0 +1,95 @@
|
||||
<?php
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
* *******************************************************************************/
|
||||
/*
|
||||
* Created on Apr 13, 2007
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
*/
|
||||
require_once('include/DetailView/DetailView2.php');
|
||||
|
||||
class ViewDetailMy extends SugarView{
|
||||
var $type ='detail';
|
||||
var $dv;
|
||||
var $tplFile = 'include/DetailView/DetailView.tpl';
|
||||
|
||||
function ViewDetailMy(){
|
||||
$this->options['show_subpanels'] = true;
|
||||
parent::SugarView();
|
||||
}
|
||||
|
||||
function preDisplay(){
|
||||
$metadataFile = null;
|
||||
$foundViewDefs = false;
|
||||
if(file_exists('custom/modules/' . $this->module . '/metadata/detailviewdefs.php')){
|
||||
$metadataFile = 'custom/modules/' . $this->module . '/metadata/detailviewdefs.php';
|
||||
$foundViewDefs = true;
|
||||
}else{
|
||||
if(file_exists('custom/modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
require_once('custom/modules/'.$this->module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$this->module]['detailviewdefs'])){
|
||||
$metadataFile = $metafiles[$this->module]['detailviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}elseif(file_exists('modules/'.$this->module.'/metadata/metafiles.php')){
|
||||
require_once('modules/'.$this->module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$this->module]['detailviewdefs'])){
|
||||
$metadataFile = $metafiles[$this->module]['detailviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
$GLOBALS['log']->debug("metadatafile=". $metadataFile);
|
||||
if(!$foundViewDefs && file_exists('modules/'.$this->module.'/metadata/detailviewdefs.php')){
|
||||
$metadataFile = 'modules/'.$this->module.'/metadata/detailviewdefs.php';
|
||||
}
|
||||
|
||||
$this->dv = new DetailView2();
|
||||
$this->dv->ss =& $this->ss;
|
||||
$this->dv->setup($this->module, $this->bean, $metadataFile, $this->tplFile);
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(empty($this->bean->id)){
|
||||
global $app_strings;
|
||||
sugar_die($app_strings['ERROR_NO_RECORD']);
|
||||
}
|
||||
$this->dv->process();
|
||||
echo $this->dv->display();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
186
modules/EcmAgreements/views/EditView/view.edit.ecmagreements.php
Executable file
186
modules/EcmAgreements/views/EditView/view.edit.ecmagreements.php
Executable file
@@ -0,0 +1,186 @@
|
||||
<?php
|
||||
|
||||
/*********************************************************************************
|
||||
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
|
||||
*
|
||||
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
|
||||
*
|
||||
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
|
||||
* details.
|
||||
|
||||
*
|
||||
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
|
||||
* 02110-1301 USA.
|
||||
|
||||
*
|
||||
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
|
||||
*
|
||||
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
|
||||
*
|
||||
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
|
||||
* "Powered by SugarCRM".
|
||||
|
||||
* *******************************************************************************/
|
||||
|
||||
/*
|
||||
|
||||
* Created on Apr 13, 2007
|
||||
|
||||
*
|
||||
|
||||
* To change the template for this generated file go to
|
||||
|
||||
* Window - Preferences - PHPeclipse - PHP - Code Templates
|
||||
|
||||
*/
|
||||
|
||||
require_once('include/EditView/EditView2.php');
|
||||
|
||||
|
||||
|
||||
class ViewEditEcmAgreements 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 ViewEditEcmAgreements(){
|
||||
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
251
modules/EcmAgreements/views/view.list.php
Executable file
251
modules/EcmAgreements/views/view.list.php
Executable file
@@ -0,0 +1,251 @@
|
||||
<?php
|
||||
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
|
||||
|
||||
/*********************************************************************************
|
||||
* SugarCRM is a customer relationship management program developed by
|
||||
* SugarCRM, Inc. Copyright (C) 2004 - 2007 SugarCRM Inc.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License version 3 as published by the
|
||||
* Free Software Foundation with the addition of the following permission added
|
||||
* to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
|
||||
* IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
|
||||
* OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program; if not, see http://www.gnu.org/licenses or write to the Free
|
||||
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA.
|
||||
*
|
||||
* You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
|
||||
* SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
|
||||
*
|
||||
* The interactive user interfaces in modified source and object code versions
|
||||
* of this program must display Appropriate Legal Notices, as required under
|
||||
* Section 5 of the GNU General Public License version 3.
|
||||
*
|
||||
* In accordance with Section 7(b) of the GNU General Public License version 3,
|
||||
* these Appropriate Legal Notices must retain the display of the "Powered by
|
||||
* SugarCRM" logo. If the display of the logo is not reasonably feasible for
|
||||
* technical reasons, the Appropriate Legal Notices must display the words
|
||||
* "Powered by SugarCRM".
|
||||
********************************************************************************/
|
||||
/*********************************************************************************
|
||||
|
||||
* 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.list.php');
|
||||
|
||||
class EcmAgreementsViewList extends ViewList{
|
||||
|
||||
function EcmAgreementsViewList(){
|
||||
parent::ViewList();
|
||||
}
|
||||
|
||||
function display(){
|
||||
if(!$this->bean->ACLAccess('list')){
|
||||
ACLController::displayNoAccess();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
$this->module=$module = "EcmAgreements";
|
||||
$metadataFile = null;
|
||||
$foundViewDefs = false;
|
||||
if(file_exists('custom/modules/' . $module. '/metadata/listviewdefs.php')){
|
||||
$metadataFile = 'custom/modules/' . $module . '/metadata/listviewdefs.php';
|
||||
$foundViewDefs = true;
|
||||
}else{
|
||||
if(file_exists('custom/modules/'.$module.'/metadata/metafiles.php')){
|
||||
require_once('custom/modules/'.$module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$module]['listviewdefs'])){
|
||||
$metadataFile = $metafiles[$module]['listviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}elseif(file_exists('modules/'.$module.'/metadata/metafiles.php')){
|
||||
require_once('modules/'.$module.'/metadata/metafiles.php');
|
||||
if(!empty($metafiles[$module]['listviewdefs'])){
|
||||
$metadataFile = $metafiles[$module]['listviewdefs'];
|
||||
$foundViewDefs = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!$foundViewDefs && file_exists('modules/'.$module.'/metadata/listviewdefs.php')){
|
||||
$metadataFile = 'modules/'.$module.'/metadata/listviewdefs.php';
|
||||
}
|
||||
require_once($metadataFile);
|
||||
|
||||
if(!empty($_REQUEST['saved_search_select']) && $_REQUEST['saved_search_select']!='_none') {
|
||||
if(empty($_REQUEST['button']) && (empty($_REQUEST['clear_query']) || $_REQUEST['clear_query']!='true')) {
|
||||
$this->saved_search = loadBean('SavedSearch');
|
||||
$this->saved_search->retrieveSavedSearch($_REQUEST['saved_search_select']);
|
||||
$this->saved_search->populateRequest();
|
||||
}
|
||||
elseif(!empty($_REQUEST['button'])) { // click the search button, after retrieving from saved_search
|
||||
$_SESSION['LastSavedView'][$_REQUEST['module']] = '';
|
||||
unset($_REQUEST['saved_search_select']);
|
||||
unset($_REQUEST['saved_search_select_name']);
|
||||
}
|
||||
}
|
||||
|
||||
$storeQuery = new StoreQuery();
|
||||
if(!isset($_REQUEST['query'])){
|
||||
$storeQuery->loadQuery($this->module);
|
||||
$storeQuery->populateRequest();
|
||||
}else{
|
||||
$storeQuery->saveFromRequest($this->module);
|
||||
}
|
||||
|
||||
$seed = $this->bean;
|
||||
$lv = new ListViewSmarty();
|
||||
$displayColumns = array();
|
||||
if(!empty($_REQUEST['displayColumns'])) {
|
||||
foreach(explode('|', $_REQUEST['displayColumns']) as $num => $col) {
|
||||
if(!empty($listViewDefs[$module][$col]))
|
||||
$displayColumns[$col] = $listViewDefs[$module][$col];
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($listViewDefs[$module] as $col => $params) {
|
||||
if(!empty($params['default']) && $params['default'])
|
||||
$displayColumns[$col] = $params;
|
||||
}
|
||||
}
|
||||
$params = array('massupdate' => true, 'export'=>false);
|
||||
|
||||
$lv->quickViewLinks = false;
|
||||
$lv->export = false;
|
||||
$lv->mergeduplicates = false;
|
||||
|
||||
if(!empty($_REQUEST['orderBy'])) {
|
||||
$params['orderBy'] = $_REQUEST['orderBy'];
|
||||
$params['overrideOrder'] = true;
|
||||
if(!empty($_REQUEST['sortOrder'])) $params['sortOrder'] = $_REQUEST['sortOrder'];
|
||||
}
|
||||
|
||||
$lv->displayColumns = $displayColumns;
|
||||
|
||||
$this->seed = $seed;
|
||||
$this->module = $module;
|
||||
|
||||
$searchForm = null;
|
||||
|
||||
//search
|
||||
$view = 'basic_search';
|
||||
if(!empty($_REQUEST['search_form_view']))
|
||||
$view = $_REQUEST['search_form_view'];
|
||||
$headers = true;
|
||||
if(!empty($_REQUEST['search_form_only']) && $_REQUEST['search_form_only'])
|
||||
$headers = false;
|
||||
elseif(!isset($_REQUEST['search_form']) || $_REQUEST['search_form'] != 'false') {
|
||||
if(isset($_REQUEST['searchFormTab']) && $_REQUEST['searchFormTab'] == 'advanced_search') {
|
||||
$view = 'advanced_search';
|
||||
}else {
|
||||
$view = 'basic_search';
|
||||
}
|
||||
}
|
||||
|
||||
$use_old_search = true;
|
||||
if(file_exists('modules/'.$this->module.'/SearchForm.html')){
|
||||
require_once('include/SearchForm/SearchForm.php');
|
||||
$searchForm = new SearchForm($this->module, $this->seed);
|
||||
}else{
|
||||
$use_old_search = false;
|
||||
require_once('include/SearchForm/SearchForm2.php');
|
||||
|
||||
if(!empty($metafiles[$this->module]['searchdefs']))
|
||||
require_once($metafiles[$this->module]['searchdefs']);
|
||||
elseif(file_exists('modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
require_once('modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
|
||||
if (file_exists('custom/modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
{
|
||||
require_once('custom/modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}
|
||||
elseif (!empty($metafiles[$this->module]['searchdefs']))
|
||||
{
|
||||
require_once($metafiles[$this->module]['searchdefs']);
|
||||
}
|
||||
elseif (file_exists('modules/'.$this->module.'/metadata/searchdefs.php'))
|
||||
{
|
||||
require_once('modules/'.$this->module.'/metadata/searchdefs.php');
|
||||
}
|
||||
|
||||
if(!empty($metafiles[$this->module]['searchfields']))
|
||||
require_once($metafiles[$this->module]['searchfields']);
|
||||
elseif(file_exists('modules/'.$this->module.'/metadata/SearchFields.php'))
|
||||
require_once('modules/'.$this->module.'/metadata/SearchFields.php');
|
||||
|
||||
$searchForm = new SearchForm($this->seed, $this->module, $this->action);
|
||||
$searchForm->setup($searchdefs, $searchFields, 'include/SearchForm/tpls/SearchFormGeneric.tpl', $view, $listViewDefs);
|
||||
|
||||
$searchForm->lv = $lv;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(isset($this->options['show_title']) && $this->options['show_title'] && (!isset($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] != "true")) {
|
||||
$moduleName = isset($this->seed->module_dir) ? $this->seed->module_dir : $GLOBALS['mod_strings']['LBL_MODULE_NAME'];
|
||||
|
||||
echo "\n<p>\n";
|
||||
echo get_module_title($moduleName, $GLOBALS['mod_strings']['LBL_MODULE_TITLE'], true);
|
||||
echo "\n</p>\n";
|
||||
|
||||
}
|
||||
|
||||
$where = '';
|
||||
if(isset($_REQUEST['query']))
|
||||
{
|
||||
// we have a query
|
||||
if(!empty($_SERVER['HTTP_REFERER']) && preg_match('/action=EditView/', $_SERVER['HTTP_REFERER'])) { // from EditView cancel
|
||||
$searchForm->populateFromArray($storeQuery->query);
|
||||
}
|
||||
else {
|
||||
$searchForm->populateFromRequest();
|
||||
}
|
||||
$where_clauses = $searchForm->generateSearchWhere(true, $this->seed->module_dir);
|
||||
if (count($where_clauses) > 0 )$where = '('. implode(' ) AND ( ', $where_clauses) . ')';
|
||||
$GLOBALS['log']->info("List View Where Clause: $where");
|
||||
}
|
||||
if($use_old_search){
|
||||
switch($view) {
|
||||
case 'basic_search':
|
||||
$searchForm->setup();
|
||||
$searchForm->displayBasic($headers);
|
||||
break;
|
||||
case 'advanced_search':
|
||||
$searchForm->setup();
|
||||
$searchForm->displayAdvanced($headers);
|
||||
break;
|
||||
case 'saved_views':
|
||||
echo $searchForm->displaySavedViews($listViewDefs, $lv, $headers);
|
||||
break;
|
||||
}
|
||||
|
||||
}else{
|
||||
echo $searchForm->display($headers);
|
||||
}
|
||||
if(!$headers)
|
||||
return;
|
||||
|
||||
if(empty($_REQUEST['search_form_only']) || $_REQUEST['search_form_only'] == false){
|
||||
// $this->processQuickSearch();
|
||||
$lv->setup($seed, 'include/ListView/ListViewGeneric.tpl', $where, $params);
|
||||
$savedSearchName = empty($_REQUEST['saved_search_select_name']) ? '' : (' - ' . $_REQUEST['saved_search_select_name']);
|
||||
echo get_form_header($GLOBALS['mod_strings']['LBL_LIST_FORM_TITLE'] . $savedSearchName, '', false);
|
||||
echo $lv->display();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user