This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

View File

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

View File

@@ -0,0 +1,412 @@
<?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['EcmServices']['CreateView'] = array(
'templateMeta' => array(
'form' => array(
'enctype' => 'multipart/form-data',
'buttons' => array(
array(
'customCode' =>
'
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="window.onbeforeunload=\'\';return SaveForm();" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">
',
),
array(
'customCode' =>
'
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="removeDocumentReservations(this.form.temp_id.value,\'cancel\');" type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
',
),
array(
'customCode' =>
'
&nbsp;
<input title="{$MOD.LBL_GO_TO_LIST_BUTTON_TITLE}" accessKey="{$MOD.LBL_GO_TO_LIST_BUTTON_KEY}" class="button" onclick="removeDocumentReservations(this.form.temp_id.value,\'list\');" type="button" name="button" value="{$MOD.LBL_GO_TO_LIST_BUTTON_LABEL}" />
',
),
// array(
// 'customCode' =>
// '
// <input title="{$MOD.LBL_PRINT_INCOME_PDF_BUTTON_TITLE}" onclick="removeDocumentReservations(this.form.temp_id.value,\'income_pdf\');" class="button" type="button" name="button" value="{$MOD.LBL_PRINT_INCOME_PDF_BUTTON_LABEL}" />
// ',
// ),
// array(
// 'customCode' =>
// '
// <input title="{$MOD.LBL_PRINT_SERVICE_PDF_BUTTON_TITLE}" onclick="removeDocumentReservations(this.form.temp_id.value,\'income_pdf\');" class="button" type="button" name="button" value="{$MOD.LBL_PRINT_SERVICE_PDF_BUTTON_LABEL}" />
// ',
// ),
// array(
// 'customCode' =>
// '
// <input title="{$MOD.LBL_PRINT_WARRANTY_PDF_BUTTON_TITLE}" onclick="removeDocumentReservations(this.form.temp_id.value,\'income_pdf\');" class="button" type="button" name="button" value="{$MOD.LBL_PRINT_WARRANTY_PDF_BUTTON_LABEL}" />
// ',
// ),
),
'hidden' => array(
'<input type="hidden" name="stock_doc_inside_in" id="stock_doc_inside_in" value=\'1\'>', // temp ?
'<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>',
'<input type="hidden" name="services_list" id="services_list" value=\'{$SERVICES_LIST}\'>',
'<input type="hidden" name="income_list" id="income_list" value=\'{$INCOME_LIST}\'>',
'<input type="hidden" name="email_id" id="email_id" value="">',
'<input type="hidden" name="temp_id" id="temp_id" value="{$TEMP_ID}">',
'<input type="hidden" name="parent_type" id="parent_type" value="Accounts">',
// Fieds used for searching account etc.
'<input type="hidden" name="parent_address_postalcode" id="parent_address_postalcode" value="{$fields.parent_address_postalcode.value}" />',
'<input type="hidden" name="parent_address_city" id="parent_address_city" value="{$fields.parent_address_city.value}" />',
'<input type="hidden" name="parent_address_street" id="parent_address_street" value="{$fields.parent_address_street.value}" />',
'<input type="hidden" name="to_is_vat_free" id="to_is_vat_free" value="{$fields.to_is_vat_free.value}" />',
'<input type="hidden" name="parent_name_copy" id="parent_name_copy" value="{$fields.parent_name.value}" />',
),
),
'maxColumns' => '2',
'widths' => array(
array(
'label' => '10',
'field' => '30',
),
array(
'label' => '10',
'field' => '30',
),
),
'includes' => array(
array(
'file' => 'include/JSON.js',
),
array(
'file' => 'include/javascript/quicksearch.js',
),
array(
'file' => 'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js',
),
array(
'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch.js',
),
// array(
// 'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch1.js',
// ),
// array(
// 'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch2.js',
// ),
array(
'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch3.js',
),
array(
'file' => 'modules/EcmServices/formloader.js',
),
array(
'file' => 'modules/EcmServices/MyTable.js',
),
array(
'file' => 'modules/EcmServices/EcmServices.js',
),
array(
'file' => 'modules/EcmServices/EcmServicesCreateView.js',
),
array(
'file' => 'modules/EcmServices/CreateItem.js',
),
array(
'file' => 'modules/EcmProducts/mintajax.js',
),
array(
'file' => 'modules/EcmProducts/helper.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' => 'currency_id',
'label' => 'LBL_CURRENCY',
),
),
array(
array(
'name' => 'parent_name',
'tabIndex' => '1',
),
'ecmpaymentcondition_name',
),
array(
'name',
'ecmdeliverycondition_name',
),
array(
//'status',
//'status',
array(
'label' => 'LBL_STATUS',
'name' => 'status',
'customCode' =>
'
<select name="status" id="status">
{$STATUS}
</select>
',
),
array(
'label' => 'LBL_TEMPLATE_NAME',
'tabIndex' => '1',
'customCode' =>
'
<select tabindex="1" id="template_id" name="template_id" onChange="document.getElementById(\'template_name\').value=this.options[this.selectedIndex].text;">
{$DOCUMENT_TEMPLATES_OPTIONS}
</select>
<input type="hidden" id="template_name" name="template_name" value="{$fields.template_name.value}">
',
),
),
array(
array(
'name' => 'register_date',
'tabIndex' => '1',
'type' => 'datetime',
'displayParams' => array(
'showFormats' => true,
),
),
array(
'label' => 'LBL_STOCK_NAME',
'name' => 'stock_id',
'customCode' =>
'
<select name="stock_id" id="stock_id">
{$STOCK}
</select>
',
),
),
array(
array(
'name' => 'validtill_date',
'tabIndex' => '1',
'type' => 'datetime',
'displayParams' => array(
'showFormats' => true,
),
),
array(
'label' => 'LBL_PW_STOCK_NAME',
'name' => 'pw_stock_id',
'customCode' =>
'
<select name="pw_stock_id" id="pw_stock_id">
{$PW_STOCK}
</select>
',
),
),
// Informations section.
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(
'allCols' => true,
'name' => 'parent_comment',
'tabIndex' => '1',
'customCode' =>
'
<textarea name="parent_comment" id="parent_comment" style="width: 90%; resize: vertical;">{$fields.parent_comment.value}</textarea>
',
),
),
array(
array(
'allCols' => true,
'name' => 'service_comment',
'tabIndex' => '1',
'customCode' =>
'
<textarea name="service_comment" id="service_comment" style="width: 90%; resize: vertical;">{$fields.service_comment.value}</textarea>
',
),
),
// 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" />
// ',
// ),
// 'ecmlanguage',
// ),
array(
'parent_contact_name',
array(
'name' => 'assigned_user_name',
'tabIndex' => '1',
),
),
array(
'parent_contact_phone_fax',
array(
'name' => 'servicer_user_name',
'tabIndex' => '1',
),
),
// array(
// 'parent_contact_title',
// array(
// 'name' => 'to_is_vat_free',
// 'tabIndex' => '1',
// 'customCode' =>
// '
// <input tabindex="1" type="checkbox" id="to_is_vat_free" name="to_is_vat_free" value="{$fields.to_is_vat_free.value}" {if $fields.to_is_vat_free.value == 1}checked{/if}>
// ',
// ),
// ),
// 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>
// ',
// ),
// 'show_primary_params',
// ),
// 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;" />
// &nbsp;&nbsp;
// <input type="text" name="parent_address_city" id="parent_address_city" value="{$fields.parent_address_city.value}" style="vertical-align:top;width:150px;" />
// ',
// ),
// 'show_advanced_params',
// ),
// array(
// 'parent_address_country',
// '',
// ),
),
'LBL_INCOME_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<link rel="stylesheet" type="text/css" href="modules/EcmServices/MyTable.css" />
<link rel="stylesheet" type="text/css" href="modules/EcmServices/AjaxSearch/AjaxSearch.css" />
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="incomeTableDIV">
<table class="positions" style="width:100%;" id="incomeTable">
<thead id="head">
<tr id="tr">
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="16%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="39%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
',
)
),
),
'LBL_PREVIEW_INCOME_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<span id=\'previewPDF_INCOME\' width="100%" height="100%"></span>
',
),
),
),
),
);

View File

@@ -0,0 +1,546 @@
<?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['EcmServices']['DetailView'] = array(
'templateMeta' => array(
'form' => array(
// 'enctype' => 'multipart/form-data',
'buttons' => array(
array(
'customCode' =>
'
<input title="{$APP.LBL_EDIT_BUTTON_TITLE}" accessKey="{$APP.LBL_EDIT_BUTTON_KEY}" class="button" onclick="location.href=\'index.php?module=EcmServices&action=EditView&record={$id}\';" type="button" name="Edit" id="edit_button" value="{$APP.LBL_EDIT_BUTTON_LABEL}">
',
),
array(
'customCode' => '{$CATALOGUE}'
),
// array(
// 'customCode' =>
// '
// <input title="Utwórz fakturę zaliczkową" accessKey="" class="button" onclick="location.href=\'index.php?module=EcmPrepaymentInvoices&action=EditView&ecmservice_id={$id}\';" type="button" name="ecmprepaymentinvoice" id="ecmprepaymentinvoice_button" value="Utwórz fakturę zaliczkową">
// ',
// ),
// array(
// 'customCode' =>
// '
// <input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="removeDocumentReservations(this.form.temp_id.value,\'cancel\');" type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
// ',
// ),
// array(
// 'customCode' =>
// '
// &nbsp;
// <input title="{$MOD.LBL_GO_TO_LIST_BUTTON_TITLE}" accessKey="{$MOD.LBL_GO_TO_LIST_BUTTON_KEY}" class="button" onclick="removeDocumentReservations(this.form.temp_id.value,\'list\');" type="button" name="button" value="{$MOD.LBL_GO_TO_LIST_BUTTON_LABEL}" />
// ',
// ),
// array(
// 'customCode' =>
// '
// <input title="{$MOD.LBL_PRINT_INCOME_PDF_BUTTON_TITLE}" onclick="removeDocumentReservations(this.form.temp_id.value,\'income_pdf\');" class="button" type="button" name="button" value="{$MOD.LBL_PRINT_INCOME_PDF_BUTTON_LABEL}" />
// ',
// ),
// array(
// 'customCode' =>
// '
// <input title="{$MOD.LBL_PRINT_SERVICE_PDF_BUTTON_TITLE}" onclick="removeDocumentReservations(this.form.temp_id.value,\'income_pdf\');" class="button" type="button" name="button" value="{$MOD.LBL_PRINT_SERVICE_PDF_BUTTON_LABEL}" />
// ',
// ),
// array(
// 'customCode' =>
// '
// <input title="{$MOD.LBL_PRINT_WARRANTY_PDF_BUTTON_TITLE}" onclick="removeDocumentReservations(this.form.temp_id.value,\'income_pdf\');" class="button" type="button" name="button" value="{$MOD.LBL_PRINT_WARRANTY_PDF_BUTTON_LABEL}" />
// ',
// ),
array(
'customCode' =>
'
&nbsp;
<input title="{$MOD.LBL_GO_TO_LIST_BUTTON_TITLE}" accessKey="{$MOD.LBL_GO_TO_LIST_BUTTON_KEY}" class="button" onclick="window.location=\'index.php?module=EcmServices&action=index\';" type="button" name="button" value="{$MOD.LBL_GO_TO_LIST_BUTTON_LABEL}" />
',
),
),
'hidden' => array(
'<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>',
'<input type="hidden" name="services_list" id="services_list" value=\'{$SERVICES_LIST}\'>',
'<input type="hidden" name="income_list" id="income_list" value=\'{$INCOME_LIST}\'>',
'<input type="hidden" name="discount" id="discount" value=\'{$fields.discount.value}\'>',
'<input type="hidden" name="parent_type" id="parent_type" value="{$fields.parent_type.value}">',
'<input type="hidden" name="parent_id" id="parent_id" value="{$fields.parent_id.value}">',
'<input type="hidden" name="assigned_user_id" id="assigned_user_id" value="{$fields.assigned_user_id.value}">',
'<input type="hidden" name="email_id" id="email_id" value="">',
'<input type="hidden" name="history" id="history" value="{$fields.history.value|htmlspecialchars}" />',
'<span id="quickInfoH2" style="display:none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>{$fields.document_no.value}</span> - <span>{$fields.parent_name.value}</span> - <span>{$fields.parent_contact_name.value}</span> - <span>{$fields.parent_address_street.value}</span>&nbsp; &nbsp;<span>{$fields.parent_address_postalcode.value}</span>&nbsp;<span>{$fields.parent_address_city.value}</span>&nbsp; &nbsp;<span>{$fields.parent_address_country.value}</span> - <span>{$fields.total.value}</span></span>',
),
),
'maxColumns' => '2',
'widths' => array(
array(
'label' => '10',
'field' => '30',
),
array(
'label' => '10',
'field' => '30',
),
),
'includes' => array(
array(
'file' => 'include/JSON.js',
),
array(
'file' => 'modules/EcmServices/MyTable.js',
),
array(
'file' => 'modules/EcmServices/EcmServices.js',
),
array(
'file' => 'modules/EcmServices/EcmServicesDetailView.js',
),
array(
'file' => 'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js',
),
// array(
// 'file' => 'modules/EcmProducts/mintajax.js',
// ),
// array(
// 'file' => 'modules/EcmProducts/helper.js',
// ),
),
),
'panels' => array(
'LBL_DETAILS_TAB' => array(
array(
'document_no',
array(
'name' => 'currency_id',
'label' => 'LBL_CURRENCY',
),
),
array(
'total',
'subtotal',
),
array(
array(
'name'=> 'fk_parent_id',
'label'=> 'LBL_FK_PARENT_ID',
),
array(
'name'=> 'wz_parent_id',
'label'=> 'LBL_WZ_PARENT_ID',
),
),
array(
array(
'name' => 'parent_name',
'customCode' =>
'
<a href="index.php?module=Accounts&action=DetailView&record={$fields.parent_id.value}">
{$fields.parent_name.value}
</a>
',
),
'ecmpaymentcondition_name',
),
array(
'name',
'ecmdeliverycondition_name',
),
array(
array(
'name' => 'status',
'type' => 'enum',
'customCode' =>
'
<span id="statusEcmService">
{$fields.status.options[$fields.status.value]}
</span>
',
),
'template_name',
),
array(
array(
'name' => 'repair_status',
'type' => 'enum',
'customCode' =>
'
<span id="repair_statusEcmService">
{$fields.repair_status.options[$fields.repair_status.value]}
</span>
',
),
'stock_name',
),
array(
'register_date',
'pw_stock_name',
),
array(
'validtill_date',
'',
),
// Informations section.
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(
//'allCols' => true,
'name' => 'parent_comment',
),
),
array(
array(
//'allCols' => true,
'name' => 'service_comment',
),
),
array(
array(
//'allCols' => true,
'name' => 'fault_comment',
),
),
array(
'parent_contact_name',
'assigned_user_name',
),
array(
'parent_contact_phone_fax',
'servicer_user_name'
),
),
'LBL_INCOME_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<link rel="stylesheet" type="text/css" href="modules/EcmServices/MyTable.css" />
<link rel="stylesheet" type="text/css" href="modules/EcmServices/AjaxSearch/AjaxSearch.css" />
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="incomeTableDIV">
<table class="positions" style="width:100%;" id="incomeTable">
<thead id="head">
<tr id="tr">
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="16%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="39%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
',
)
),
),
'LBL_ITEMS_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<link rel="stylesheet" type="text/css" href="modules/EcmServices/MyTable.css" />
<link rel="stylesheet" type="text/css" href="modules/EcmServices/AjaxSearch/AjaxSearch.css" />
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV">
<table class="positions" style="width:100%;" id="itemsTable">
<thead id="head">
<tr id="tr">
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="16%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="39%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
<td width="8%">{$MOD.LBL_EDITTABLE_RESERVATION}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_DISCOUNT}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_VAT}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_UNIT}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
<td width="8%">Mag.</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="55%" class="dataLabel" valign="top">
<a href="javascript: N.moveUpRow();" >{$MOD.LBL_MOVE_ROW_UP}</a> - <a href="javascript: N.moveDownRow();" >{$MOD.LBL_MOVE_ROW_DOWN}</a>
</td> <!--color:#b3b9cf;-->
<td width="40%" class="dataField" style="text-align: left;">
<br>
<table id="position_result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
<tr id="subtotal_tr">
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_ARTICLES_SUBTOTAL}</td>
<td class="positionsField" style="border-top:0px;">
<input tabindex="127" type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="articles_subtotal" id="articles_subtotal" value=\'{$fields.articles_subtotal.value}\'>
</td>
</tr>
<tr id="total_tr">
<td class="positionsLabel">{$MOD.LBL_ARTICLES_TOTAL}</td>
<td class="positionsField">
<input tabindex="127" type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="articles_total" id="articles_total" value=\'{$fields.articles_total.value}\'>
</td>
</tr>
</table>
</td>
<td width="5%" class="dataField" style="text-align: left;">&nbsp;</td>
</tr>
</table>
',
)
),
),
'LBL_SERVICES_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<link rel="stylesheet" type="text/css" href="modules/EcmServices/MyTable.css" />
<link rel="stylesheet" type="text/css" href="modules/EcmServices/AjaxSearch/AjaxSearch.css" />
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="servicesTableDIV">
<table class="positions" style="width:100%;" id="servicesTable">
<thead id="head">
<tr id="tr">
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="16%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="39%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_DISCOUNT}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_VAT}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="55%" class="dataLabel" valign="top">
<a href="javascript: N.moveUpRow();" >{$MOD.LBL_MOVE_ROW_UP}</a> - <a href="javascript: N.moveDownRow();" >{$MOD.LBL_MOVE_ROW_DOWN}</a>
</td> <!--color:#b3b9cf;-->
<td width="40%" class="dataField" style="text-align: left;">
<br>
<table id="services_result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
<tr id="subtotal_tr">
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_SERVICES_SUBTOTAL}</td>
<td class="positionsField" style="border-top:0px;">
<input tabindex="127" type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="services_subtotal" id="services_subtotal" value=\'{$fields.services_subtotal.value}\'>
</td>
</tr>
<tr id="total_tr">
<td class="positionsLabel">{$MOD.LBL_SERVICES_TOTAL}</td>
<td class="positionsField">
<input tabindex="127" type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="services_total" id="services_total" value=\'{$fields.services_total.value}\'>
</td>
</tr>
</table>
</td>
<td width="5%" class="dataField" style="text-align: left;">&nbsp;</td>
</tr>
</table>
',
)
),
),
'LBL_HISTORY_TAB'=> array(
array(
array(
'name' => 'history_panel',
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<div id="history_wrapper">
<ul>
{section name=i loop=$HISTORY}
<li class="result" id="{$smarty.section.i.index}" style="margin-bottom: 15px;">
<p class="history_header">{$HISTORY[i][0]|date_format:\'%d.%m.%Y\'}, {$HISTORY[i][1]}: </p>
<p class="history_record">{$HISTORY[i][2]}</p>
</li>
{sectionelse}
<li class="no-results">
Brak wpisów w historii
</li>
{/section}
</ul>
</div>
',
),
),
),
/*
'LBL_PREVIEW_TAB'=> array(
array(
array(
'name' => 'preview_panel',
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<select id="preview_type" name="preview_type" onChange="setPREVIEW();">
<option value="income">Otwarcie</option>
<option value="qty">Wykaz ilościowy</option>
<option value="val">Wykaz wartościowy</option>
<option value="warranty">Protokół</option>
<option value="fault">Usterka</option>
</select>
<input type="button" class="button" onClick="preview_pdf();" value="Generuj"/>
<hr/>
<span id="previewPDF" width="100%" height="100%"></span>
',
),
),
),
/*
'LBL_PREVIEW_INCOME_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'name' => 'PREVIEW_INCOME',
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<span id="previewPDF_INCOME" width="100%" height="100%"></span>
',
),
),
),
'LBL_PREVIEW_QTY_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'name' => 'PREVIEW_QTY',
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<span id="previewPDF_QTY" width="100%" height="100%"></span>
',
),
),
),
'LBL_PREVIEW_VAL_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'name' => 'PREVIEW_VAL',
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<span id="previewPDF_VAL" width="100%" height="100%"></span>
',
),
),
),
'LBL_PREVIEW_WARRANTY_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'name' => 'PREVIEW_WARRANTY',
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<span id="previewPDF_WARRANTY" width="100%" height="100%"></span>
',
),
),
),
*/
),
);

View File

@@ -0,0 +1,638 @@
<?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['EcmServices']['EditView'] = array(
'templateMeta' => array(
'form' => array(
'enctype' => 'multipart/form-data',
'buttons' => array(
array(
'customCode' =>
'
<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="window.onbeforeunload=\'\';return SaveForm();" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">
',
),
array(
'customCode' =>
'
<input title="{$APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{$APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="removeDocumentReservations(this.form.temp_id.value,\'cancel\');" type="button" name="button" value="{$APP.LBL_CANCEL_BUTTON_LABEL}">
',
),
array(
'customCode' =>
'
&nbsp;
<input title="{$MOD.LBL_GO_TO_LIST_BUTTON_TITLE}" accessKey="{$MOD.LBL_GO_TO_LIST_BUTTON_KEY}" class="button" onclick="removeDocumentReservations(this.form.temp_id.value,\'list\');" type="button" name="button" value="{$MOD.LBL_GO_TO_LIST_BUTTON_LABEL}" />
',
),
),
'hidden' => array(
'<input type="hidden" name="stock_doc_inside_in" id="stock_doc_inside_in" value=\'\'>',
'<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>',
'<input type="hidden" name="services_list" id="services_list" value=\'{$SERVICES_LIST}\'>',
'<input type="hidden" name="income_list" id="income_list" value=\'{$INCOME_LIST}\'>',
'<input type="hidden" name="email_id" id="email_id" value="">',
'<input type="hidden" name="temp_id" id="temp_id" value="{$TEMP_ID}">',
'<input type="hidden" name="temp_date" id="temp_date" value="{$TEMP_DATE}">',
'<input type="hidden" name="parent_type" id="parent_type" value="Accounts">',
// Fieds used for searching account etc.
'<input type="hidden" name="parent_address_postalcode" id="parent_address_postalcode" value="{$fields.parent_address_postalcode.value}" />',
'<input type="hidden" name="parent_address_city" id="parent_address_city" value="{$fields.parent_address_city.value}" />',
'<input type="hidden" name="parent_address_street" id="parent_address_street" value="{$fields.parent_address_street.value}" />',
'<input type="hidden" name="to_is_vat_free" id="to_is_vat_free" value="{$fields.to_is_vat_free.value}" />',
'<input type="hidden" name="parent_name_copy" id="parent_name_copy" value="{$fields.parent_name.value}" />',
'<input type="hidden" name="history" id="history" value="{$fields.history.value|htmlspecialchars}" />',
),
),
'maxColumns' => '2',
'widths' => array(
array(
'label' => '10',
'field' => '30',
),
array(
'label' => '10',
'field' => '30',
),
),
'includes' => array(
array(
'file' => 'include/JSON.js',
),
array(
'file' => 'include/javascript/quicksearch.js',
),
array(
'file' => 'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js',
),
array(
'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch.js',
),
array(
'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch1.js',
),
array(
'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch2.js',
),
array(
'file' => 'modules/EcmServices/AjaxSearch/AjaxSearch3.js',
),
array(
'file' => 'modules/EcmServices/formloader.js',
),
array(
'file' => 'modules/EcmServices/MyTable.js',
),
array(
'file' => 'modules/EcmServices/EcmServices.js',
),
array(
'file' => 'modules/EcmServices/EcmServicesEditView.js',
),
array(
'file' => 'modules/EcmServices/CreateItem.js',
),
array(
'file' => 'modules/EcmProducts/mintajax.js',
),
array(
'file' => 'modules/EcmProducts/helper.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' => 'currency_id',
'label' => 'LBL_CURRENCY',
),
),
array(
array(
'name' => 'parent_name',
'tabIndex' => '1',
),
'ecmpaymentcondition_name',
),
array(
'name',
'ecmdeliverycondition_name',
),
array(
//'status',
array(
'label' => 'LBL_STATUS',
'name' => 'status',
'customCode' =>
'
<select name="status" id="status">
{$STATUS}
</select>
',
),
array(
'label' => 'LBL_TEMPLATE_NAME',
'tabIndex' => '1',
'customCode' =>
'
<select tabindex="1" id="template_id" name="template_id" onChange="document.getElementById(\'template_name\').value=this.options[this.selectedIndex].text;">
{$DOCUMENT_TEMPLATES_OPTIONS}
</select>
<input type="hidden" id="template_name" name="template_name" value=\'{$fields.template_name.value}\'>
',
),
),
array(
//'repair_status',
array(
'label' => 'LBL_REPAIR_STATUS',
'name' => 'repair_status',
'customCode' =>
'
<select name="repair_status" id="repair_status">
{$REPAIR_STATUS}
</select>
',
),
array(
'label' => 'LBL_STOCK_NAME',
'name' => 'stock_id',
'customCode' =>
'
<select name="stock_id" id="stock_id">
{$STOCK}
</select>
',
),
),
array(
array(
'name' => 'register_date',
'tabIndex' => '1',
'type' => 'datetime',
'displayParams' => array(
'showFormats' => true,
),
),
array(
'label' => 'LBL_PW_STOCK_NAME',
'name' => 'pw_stock_id',
'customCode' =>
'
<select name="pw_stock_id" id="pw_stock_id">
{$PW_STOCK}
</select>
',
),
),
array(
array(
'name' => 'validtill_date',
'tabIndex' => '1',
'type' => 'datetime',
'displayParams' => array(
'showFormats' => true,
),
),
'',
),
// Informations section.
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(
'allCols' => true,
'name' => 'parent_comment',
'tabIndex' => '1',
'customCode' =>
'
<textarea name="parent_comment" id="parent_comment" style="width: 90%; resize: vertical;">{$fields.parent_comment.value}</textarea>
',
),
),
array(
array(
'allCols' => true,
'name' => 'service_comment',
'tabIndex' => '1',
'customCode' =>
'
<textarea name="service_comment" id="service_comment" style="width: 90%; resize: vertical;">{$fields.service_comment.value}</textarea>
',
),
),
array(
array(
'allCols' => true,
'name' => 'fault_comment',
'tabIndex' => '1',
'customCode' =>
'
<textarea name="fault_comment" id="fault_comment" style="width: 90%; resize: vertical;">{$fields.fault_comment.value}</textarea>
',
),
),
// 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" />
// ',
// ),
// 'ecmlanguage',
// ),
array(
'parent_contact_name',
array(
'name' => 'assigned_user_name',
'tabIndex' => '1',
),
),
array(
'parent_contact_phone_fax',
array(
'name' => 'servicer_user_name',
'tabIndex' => '1',
),
),
),
'LBL_INCOME_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<link rel="stylesheet" type="text/css" href="modules/EcmServices/MyTable.css" />
<link rel="stylesheet" type="text/css" href="modules/EcmServices/AjaxSearch/AjaxSearch.css" />
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="incomeTableDIV">
<table class="positions" style="width:100%;" id="incomeTable">
<thead id="head">
<tr id="tr">
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="16%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="39%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
',
)
),
),
'LBL_ITEMS_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<link rel="stylesheet" type="text/css" href="modules/EcmServices/MyTable.css" />
<link rel="stylesheet" type="text/css" href="modules/EcmServices/AjaxSearch/AjaxSearch.css" />
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV">
<table class="positions" style="width:100%;" id="itemsTable">
<thead id="head">
<tr id="tr">
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="16%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="39%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
<td width="8%">{$MOD.LBL_EDITTABLE_RESERVATION}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_DISCOUNT}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_VAT}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_UNIT}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
<td width="8%">Mag.</td>
<td width="6%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="55%" class="dataLabel" valign="top">
<a href="javascript: N.moveUpRow();" >{$MOD.LBL_MOVE_ROW_UP}</a> - <a href="javascript: N.moveDownRow();" >{$MOD.LBL_MOVE_ROW_DOWN}</a>
</td> <!--color:#b3b9cf;-->
<td width="40%" class="dataField" style="text-align: left;">
<br>
<table id="position_result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
<tr id="subtotal_tr">
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_ARTICLES_SUBTOTAL}</td>
<td class="positionsField" style="border-top:0px;">
<input tabindex="127" type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="articles_subtotal" id="articles_subtotal" value=\'{$fields.articles_subtotal.value}\'>
</td>
</tr>
<tr id="total_tr">
<td class="positionsLabel">{$MOD.LBL_ARTICLES_TOTAL}</td>
<td class="positionsField">
<input tabindex="127" type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="articles_total" id="articles_total" value=\'{$fields.articles_total.value}\'>
</td>
</tr>
</table>
</td>
<td width="5%" class="dataField" style="text-align: left;">&nbsp;</td>
</tr>
</table>
',
)
),
),
'LBL_SERVICES_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<link rel="stylesheet" type="text/css" href="modules/EcmServices/MyTable.css" />
<link rel="stylesheet" type="text/css" href="modules/EcmServices/AjaxSearch/AjaxSearch.css" />
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="servicesTableDIV">
<table class="positions" style="width:100%;" id="servicesTable">
<thead id="head">
<tr id="tr">
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="16%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="39%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_DISCOUNT}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_VAT}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="55%" class="dataLabel" valign="top">
<a href="javascript: N.moveUpRow();" >{$MOD.LBL_MOVE_ROW_UP}</a> - <a href="javascript: N.moveDownRow();" >{$MOD.LBL_MOVE_ROW_DOWN}</a>
</td> <!--color:#b3b9cf;-->
<td width="40%" class="dataField" style="text-align: left;">
<br>
<table id="services_result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
<tr id="subtotal_tr">
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_SERVICES_SUBTOTAL}</td>
<td class="positionsField" style="border-top:0px;">
<input tabindex="127" type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="services_subtotal" id="services_subtotal" value=\'{$fields.services_subtotal.value}\'>
</td>
</tr>
<tr id="total_tr">
<td class="positionsLabel">{$MOD.LBL_SERVICES_TOTAL}</td>
<td class="positionsField">
<input tabindex="127" type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="services_total" id="services_total" value=\'{$fields.services_total.value}\'>
</td>
</tr>
</table>
</td>
<td width="5%" class="dataField" style="text-align: left;">&nbsp;</td>
</tr>
</table>
',
)
),
),
'LBL_HISTORY_TAB'=> array(
array(
array(
'name' => 'history_panel',
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<div id="history_wrapper">
<ul>
{section name=i loop=$HISTORY}
<li class="result" id="result_{$smarty.section.i.index}">
<p class="history_header">{$HISTORY[i][0]|date_format:\'%d.%m.%Y\'}, {$HISTORY[i][1]}: </p>
<p class="history_record">{$HISTORY[i][2]} <a class="delete" href="#" title="delete" style="display: inline;" onClick="removeHistory(this); return false;">usuń</a></p>
</li>
{sectionelse}
<li class="no-results">
Brak wpisów w historii
</li>
{/section}
</ul>
</div>
<div id="history_form_wrapper">
<dl>
<dt>Data:</dt>
<dd>
<input autocomplete="off" name="history_date" id="history_date" value="{\'d.m.Y\'|date}" title="" tabindex="" size="11" maxlength="10" type="text">
<img src="themes/default/images/jscalendar.gif" alt="Enter Date" id="history_date_trigger" align="absmiddle" border="0">
<script type="text/javascript">
{literal}
Calendar.setup ({
inputField : "history_date",
daFormat : "%d.%m.%Y",
button : "history_date_trigger",
singleClick : true,
dateStr : "",
step : 1
});
{/literal}
</script>
</dd>
<dt>Zgłosił:</dt>
<dd>
<input type="text" name="history_owner" id="parent_contact_no" value=\'{$fields.history_owner.value}\'>
<button type="button" value="Wybierz"
onClick=\'open_popup(
"Users",
600,
400,
"&account_name="+document.EditView.parent_name.value,
true,
false,
&#123;"call_back_function":"set_return","form_name":"EditView","field_to_name_array":&#123;"user_name":"history_owner","id":"contact_id"&#125;&#125;,
"single",
false
);\'>
<img src="themes/default/images/id-ff-select.png">
</button>
</dd>
<dt>Wpis:</dt>
<dd>
<textarea style="width: 90%; resize: vertical;" name="history_record" id="history_record"></textarea>
</dd>
<dt>&nbsp;</dt>
<dd>
<input id="add_record" name="add_record" value="Dodaj" type="button" onclick="addHistory(); return false;"/>
</dd>
</dl>
</div>
',
),
),
),
/*
'LBL_PREVIEW_INCOME_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<span id=\'previewPDF_INCOME\' width="100%" height="100%"></span>
',
),
),
),
'LBL_PREVIEW_QTY_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<span id=\'previewPDF_QTY\' width="100%" height="100%"></span>
',
),
),
),
'LBL_PREVIEW_VAL_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<span id=\'previewPDF_VAL\' width="100%" height="100%"></span>
',
),
),
),
'LBL_PREVIEW_WARRANTY_TAB' => array(
array(
array(
'type' => 'tab',
),
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' =>
'
<span id=\'previewPDF_WARRANTY\' width="100%" height="100%"></span>
',
),
),
),
*/
),
);

View File

@@ -0,0 +1,117 @@
<?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["EcmServices"] = array(
'NUMBER' =>
array (
'width' => '1%',
'label' => 'n',
'default' => true,
'sortable' => true,
),
'STATUS' => array(
'width' => '5',
'label' => 'LBL_STATUS',
'default' => true,
'sortable' => true,
),
'DOCUMENT_NO' => array(
'width' => '15',
'label' => 'LBL_DOCUMENT_NO',
'sortable' => true,
'link' => true,
'default' => true,
),
'NAME' => array(
'width' => '15',
'label' => 'LBL_NAME',
'default' => true,
),
'PARENT_NAME' => array(
'width' => '35',
'label' => 'LBL_PARENT_NAME',
'default' => true,
),
'CURRENCY_ID' => array(
'width' => '10',
'label' => 'LBL_CURRENCY',
'default' => true,
),
'TOTAL' => array(
'width' => '10',
'label' => 'LBL_TOTAL',
'default' => true,
),
'MODIFIED_BY_NAME' => array(
'width' => '10',
'label' => 'LBL_MODIFIED_USER',
'module' => 'Users',
'id' => 'USERS_ID',
'default' => false,
'sortable' => false,
'related_fields' => array('modified_user_id'),
),
'REGISTER_DATE' => array(
'width' => '15',
'label' => 'LBL_REGISTER_DATE',
'default' => true,
'sortable' => true,
),
'OPTIONS' => array(
'width' => '15',
'label' => '&nbsp;',
'default' => true,
'sortable' => false,
'align' => 'right',
),
);

View File

@@ -0,0 +1,105 @@
<?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['EcmServices'] = array(
'templateMeta' => array(
'maxColumns' => '3',
'widths' => array(
'label' => '10',
'field' => '30'
),
),
'layout' => array(
'basic_search' => array(
'document_no',
'name',
'parent_name',
'register_date',
'currency_id' => array(
'name' => 'currency_id',
'label' => 'LBL_CURRENCY',
),
'status',
'current_user_only' => array(
'name' => 'current_user_only',
'label' => 'LBL_CURRENT_USER_FILTER',
'type' => 'bool',
'default' => true,
'width' => '10%',
),
),
'advanced_search' => array(
'document_no',
'name',
'parent_name',
'register_date',
'currency_id' => array(
'name' => 'currency_id',
'label' => 'LBL_CURRENCY',
),
'status',
'validtill_date',
'assigned_user_id' => array(
'name' => 'assigned_user_id',
'type' => 'enum',
'label' => 'LBL_ASSIGNED_TO',
'function' => array(
'name' => 'get_user_array',
'params' => array(
0 => false,
),
),
'default' => true,
'width' => '10%',
),
'servicer_user_id' => array(
'name' => 'servicer_user_id',
'type' => 'enum',
'label' => 'LBL_SERVICER',
'function' => array(
'name' => 'get_user_array',
'params' => array(
0 => false,
),
),
'default' => true,
'width' => '10%',
),
),
),
);

View 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']['EcmServices'] = array(
'LBL_DETAILVIEW'=>array(
'template' => 'xtpl',
'template_file' => 'modules/EcmServices/DetailView.html',
'php_file' => 'modules/EcmServices/DetailView.php',
'type' => 'DetailView',
),
'LBL_EDITVIEW'=>array(
'template' => 'xtpl',
'template_file' => 'modules/EcmServices/EditView.html',
'php_file' => 'modules/EcmServices/EditView.php',
'type' => 'EditView',
),
'LBL_LISTVIEW'=>array(
'template' => 'listview',
'meta_file' => 'modules/EcmServices/listviewdefs.php',
'type' => 'ListView',
),
'LBL_SEARCHFORM'=>array(
'template' => 'xtpl',
'template_file' => 'modules/EcmServices/SearchForm.html',
'php_file' => 'modules/EcmServices/ListView.php',
'type' => 'SearchForm',
),
);

View File

@@ -0,0 +1,137 @@
<?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['EcmServices']['subpanel_setup'] = array (
'notes' => array (
'order' => 15,
'module' => 'Notes',
'sort_order' => 'asc',
'sort_by' => 'date_modified',
'get_subpanel_data' => 'notes',
'add_subpanel_data' => 'note_id',
'subpanel_name' => 'default',
'title_key' => 'LBL_NOTES_SUBPANEL_TITLE',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopSelectButton'),
array('widget_class' => 'SubPanelTopCreateButton'),
),
),
/*
'ecmprepaymentinvoices' => array (
'order' => 16,
'module' => 'EcmPrepaymentInvoices',
'sort_order' => 'asc',
'sort_by' => 'date_modified',
'get_subpanel_data' => 'ecmprepaymentinvoices',
'add_subpanel_data' => 'ecmservice_id',
'subpanel_name' => 'default',
'title_key' => 'Faktury zaliczkowe',
'top_buttons' => array(
),
),
'emails' => array (
'order' => 17,
'module' => 'Emails',
'sort_order' => 'asc',
'sort_by' => 'date_modified',
'get_subpanel_data' => 'emails',
'add_subpanel_data' => 'emails_id',
'subpanel_name' => 'ForEcmServices',
'title_key' => 'LBL_EMAILS_SUBPANEL_TITLE',
'top_buttons' => array(),
),
*/
);
?>

View File

@@ -0,0 +1,119 @@
<?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' => 'EcmServices'),
),
'where' => '',
'list_fields' => array (
'status' => array (
'name' => 'status',
'vname' => 'LBL_STATUS',
'module' => 'EcmServices',
'width' => '5%',
),
/*
'number' => array (
'name' => 'number',
'vname' => 'LBL_NUMBER',
'module' => 'EcmServices',
'usage' => 'query_only',
),
*/
'document_no' => array (
'name' => 'document_no',
'vname' => 'LBL_DOCUMENT_NO',
'module' => 'EcmServices',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '15%',
),
'name' => array (
'name' => 'name',
'vname' => 'LBL_NAME',
'module' => 'EcmServices',
'width' => '40%'
),
'total' => array (
'name' => 'total',
'vname' => 'LBL_TOTAL',
'module' => 'EcmServices',
'width' => '15%',
),
'register_date' => array (
'name' => 'register_date',
'vname' => 'LBL_REGISTER_DATE',
'module' => 'EcmServices',
'width' => '10%',
),
'options' => array (
'name' => 'options',
'label' => '&nbsp;',
'default' => true,
'width' => '2%',
'sortable' => false,
),
/*
'PDF_URL' => array(
'width' => '2%',
'label' => '&nbsp;',
'link' => true,
'default' => true,
'sortable' => false,
),
'edit_button'=>array(
'widget_class' => 'SubPanelEditButton',
'width' => '2%',
),
*/
),
);
?>