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['EcmStockDocIns'] = 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,425 @@
<?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['EcmStockDocIns']['DetailView'] = array (
'templateMeta' => array (
'form' => array (
'buttons' => array (
array(
'customCode' => '{if $bean->status=="registered"}<input title="{$APP.LBL_EDIT_BUTTON_TITLE}" accessKey="{$APP.LBL_EDIT_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'EcmStockDocIns\'; this.form.return_action.value=\'DetailView\'; this.form.return_id.value=\'{$id}\'; this.form.action.value=\'EditView\';" type="submit" name="Edit" id="edit_button" value="{$APP.LBL_EDIT_BUTTON_LABEL}">{/if}'
),
array(
'customCode' => '<input title="{$APP.LBL_DUPLICATE_BUTTON_TITLE}" accessKey="{$APP.LBL_DUPLICATE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'EcmStockDocIns\'; this.form.return_action.value=\'DetailView\'; this.form.isDuplicate.value=true; this.form.action.value=\'EditView\'; this.form.return_id.value=\'{$id}\';" type="submit" name="Duplicate" value="{$APP.LBL_DUPLICATE_BUTTON_LABEL}" id="duplicate_button" {if !$bean->aclAccess("duplicate")}style="display:none;"{/if}>'
),
array(
'customCode' => '{if $bean->status=="registered"}<input title="{$APP.LBL_DELETE_BUTTON_TITLE}" accessKey="{$APP.LBL_DELETE_BUTTON_KEY}" class="button" onclick="this.form.return_module.value=\'EcmStockDocIns\'; this.form.return_action.value=\'ListView\'; this.form.action.value=\'Delete\'; return confirm(\'{$APP.NTC_DELETE_CONFIRMATION}\');" type="submit" name="Delete" value="{$APP.LBL_DELETE_BUTTON_LABEL}">{/if}'
),
array(
'customCode' => '{if $bean->status=="accepted" and $bean->correct_id=="" and !$hasCorrect}<input title="{$MOD.LBL_CORRECT_BUTTON_TITLE}" accessKey="{$MOD.LBL_CORRECT_BUTTON_KEY}" class="button" onclick="if(confirm(\'{$MOD.LBL_CORRECT_CONFIRMATION}\')){literal}{{/literal}location.href=\'index.php?module=EcmStockDocIns&action=SaveCorrect&correct_id={$id}\';{literal}}{/literal}" type="button" name="Correct" value="{$MOD.LBL_CORRECT_BUTTON_LABEL}">{/if}'
),
array(
'customCode' => '<input name="pz_pdf" id="pz_pdf" title="Pokaż PDF" accessKey="" class="button" onclick="window.location = \'index.php?module=EcmStockDocIns&action=previewPDF&to_pdf=1&record={$fields.id.value}\';" type="button" value="Pokaż PDF">'
),
),
'hidden'=>array(
'<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_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="">',
'<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/EcmStockDocIns/MyTable.js'),
array('file'=>'modules/EcmStockDocIns/EcmStockDocInsDetailView4.js'),
array('file'=>'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js'),
),
),
'panels' => array (
'LBL_DETAILS_TAB'=> array(
array(
'document_no',
'assigned_user_name'
),
array (
'parent_name',
'template_name',
),
array (
'contact_name',
'stock_name'
),
array (
'name',
'kind',
),
array (
'register_date',
),
array('status'),
array('payment_date','data_fk'),
array('left_to_pay'),
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}',
),
'ecmlanguage'
),
array ('parent_contact_name',
),
array ('parent_contact_title',),
array ('parent_address_street'),
array (
array(
'name' => 'parent_address_city',
'tabIndex' => 't',
'customCode' => '{$fields.parent_address_postalcode.value}&nbsp;&nbsp;{$fields.parent_address_city.value}'
),
),
array ('parent_address_country'),
array(
array(
'name' => 'kind_title',
'allCols' => true,
'hideLabel' => true,
'customCode' => '<br><b>{$KIND_TITLE}</b>'
),
),
array(
array(
'name' => 'kind_table',
'allCols' => true,
'hideLabel' => true,
'customCode' => '{$KIND_TABLE}'
),
),
//end mz
),
'LBL_ITEMS_TAB'=> array(
array(
array(
'name' => 'items_label_panel',
'allCols' => true,
'hideLabel' => true,
'customCode' => '
'
// .'{literal}'.
// '<script language="javascript">var parent_options='.$json->encode($app_list_strings['ecmworkitems_parent_dom']).';</script>'
// .'{/literal}'.
.'
<link rel="stylesheet" type="text/css" href="modules/EcmStockDocIns/MyTable.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;">
<table class="positions" style="width:100%;" id="itemsTable">
<thead id="head">
<tr id="tr">
<td width="6%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="10%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="41%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
<td width="8%">{$MOD.LBL_EDITTABLE_UNIT}</td>
<td width="8%">{$MOD.LBL_EDITTABLE_INVOICE_PRICE}</td>
<td width="13%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_VAT}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_DISCOUNT}</td>
<td width="13%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
<td width="13%">{$MOD.LBL_EDITTABLE_WEIGHT_NETTO}</td>
<td width="13%">Nr parti</td>
<td width="13%">Data ważności</td>
<td width="13%">{$MOD.LBL_EDITTABLE_ADD_FIELDS}</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
<table width="100%"" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="55%" class="dataLabel" valign="top">
&nbsp;
</td> <!--color:#b3b9cf;-->
<td width="40%" class="dataField" style="text-align: left;">
<br>
<table id="result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
<tr id="subtotal_tr">
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_SUBTOTAL}</td>
<td class="positionsField" style="border-top:0px;"><input type="text" style="border:0px;font-weight:900;width:100%;text-align:right;" readonly="readonly" name="subtotal" id="subtotal" value=\'{$fields.subtotal.value}\'></td>
</tr>
<tr id="total_tr">
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total_2" id="total_2" value=\'\'></td>
</tr>
<tr id="discount_tr">
<td class="positionsLabel">{$MOD.LBL_DISCOUNT}</td>
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="discount_2" id="discount_2" value=\'\'></td>
</tr>
<tr id="total_tr">
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total" id="total" value=\'{$fields.total.value}\'></td>
</tr>
</table>
</td>
<td width="5%" class="dataField" style="text-align: left;">&nbsp;</td>
</tr>
</table>
',
)
),
),
'LBL_TEXTS_TAB'=> array(
array('header_text'),
array('footer_text'),
array('ads_text'),
),
/*
'LBL_PREVIEW_TAB'=> array(
array(
array(
'name' => 'preview_panel',
'allCols' => true,
'hideLabel' => true,
'customCode' => '<span id="previewPDF" width="100%" height="100%"></span>'
),
),
),
*/
'LBL_EMAIL_TAB'=> array(
array(
array(
'name' => 'email_panel',
'allCols' => true,
'hideLabel' => true,
'customCode' => '{$EMAIL_LINK_TAB}<span id="emailTAB" width="100%" height="100%"></span>'
),
),
),
),
);
?>

View File

@@ -0,0 +1,142 @@
<?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['EcmStockDocIns']['DetailView'] = array (
'templateMeta' => array (
'form' => array (
'buttons' => array ('EDIT', 'DUPLICATE', 'DELETE',
array(
'customCode' => '<input name="quote_pdf" id="quote_pdf" title="{$MOD.LBL_QUOTE_PDF_BUTTON_TITLE}" accessKey="{$MOD.LBL_QUOTE_PDF_BUTTON_KEY}" class="button" onclick="window.open(\'index.php?module=EcmStockDocIns&action=previewPDF&to_pdf=1&record={$fields.id.value}\');" type="button" value="{$MOD.LBL_QUOTE_PDF}">'
),
/*
array(
'customCode' => '<input name="workreport_to_invoice" id="workreport_to_invoice" title="{$MOD.LBL_WORKREPORT_TO_INVOICE_BUTTON_TITLE}" accessKey="{$MOD.LBL_WORKREPORT_TO_INVOICE_BUTTON_KEY}" class="button" onclick="window.location = \'index.php?module=EcmInvoiceOuts&action=EditView&work_report_record={$fields.id.value}\';" type="button" value="{$MOD.LBL_WORKREPORT_TO_INVOICE}">'
),
*/
)
),
'maxColumns' => '2',
'widths' => array (
array ('label' => '10', 'field' => '30'),
array ('label' => '10', 'field' => '30')
),
),
'panels' => array (
array('name', 'assigned_user_name'),
array('date_time_start', 'account_name'),
array('date_time_end', 'contact_name'),
array(
'parent_name',
'status'
),
array('description'),
),
);
?>

View File

@@ -0,0 +1,504 @@
<?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['EcmStockDocIns']['EditView'] = array (
'templateMeta' => array (
'form' => array (
'enctype'=>'multipart/form-data',
'buttons'=>array(
array('customCode' => '<input title="{$APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{$APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="return SaveForm(this);" type="button" name="button" value="{$APP.LBL_SAVE_BUTTON_LABEL}">'),
'CANCEL',
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=EcmStockDocIns&action=index\'" type="button" name="button" value="{$MOD.LBL_GO_TO_LIST_BUTTON_LABEL}">'),
),
'hidden'=>array(
'<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>',
'<input type="hidden" name="email_id" id="email_id" value=\'\'>',
'<input type="hidden" name="parent_type" id="parent_type" value="Accounts">',
'<input type="hidden" name="po_id" id="po_id" value="{$fields.po_id.value}">',
),
),
'maxColumns' => '2',
'widths' => array (
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30'),
),
'includes' => array(
array('file'=>'include/JSON.js'),
array('file'=>'include/javascript/quicksearch.js'),
array('file'=>'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js'),
array('file'=>'modules/EcmStockDocIns/AjaxSearch/AjaxSearch.js'),
array('file'=>'modules/EcmStockDocIns/formloader.js'),
array('file'=>'modules/EcmStockDocIns/MyTable.js'),
array('file'=>'modules/EcmStockDocIns/EcmStockDocIns44.js'),
array('file'=>'modules/EcmStockDocIns/CreateItem.js'),
array('file'=>'modules/EcmProducts/mintajax.js'),
array('file'=>'modules/EcmProducts/helper.js'),
),
),
'panels' => array (
'LBL_DETAILS_TAB'=> array(
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(
'name' => 'template_name',
'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 (
'contact_name',
array(
'label'=>'LBL_STOCK_NAME',
'tabIndex' => '1',
'name'=>'stock_id',
'customCode'=>'<select name="stock_id" id="stock_id">{$STOCK}</select>',
),
),
array (
array(
'name' => 'name',
'tabIndex' => '1',
),
array(
'name' => 'kind',
'tabIndex' => '1',
),
),
array (
array(
'name' => 'register_date',
'tabIndex' => '1',
'type' => 'datetime',
'displayParams'=>array('showFormats'=>true)
),
),
array('status'),
array('payment_date','data_fk'),
array('left_to_pay'),
array(
array(
'name' => 'to_informations',
'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(
'name' => 'ecmlanguage',
'tabIndex' => '1',
)
),
array (
array(
'name' => 'parent_contact_name',
'tabIndex' => '1',
),
),
array (
array(
'name' => 'parent_contact_title',
'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(
'name'=>'show_images_on_offers',
'tabindex'=>'1',
'customCode'=>'<input type="checkbox" id="show_images_on_offers" name="show_images_on_offers" value="1" {$CHECKBOX_SHOW_IMAGES_ON_OFFERS}>',
),
*/
),
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;" />'
),
),
array (
array(
'name' => 'parent_address_country',
'tabIndex' => '1',
),
),
array(
array(
'name' => 'to_informations',
'allCols' => true,
'hideLabel' => true,
'customCode' => '
<script>
{literal}
function hideElementsByClassName(cn){
var arr = new Array();
var els = document.getElementsByTagName("*");
var exp= new RegExp("^(.* )?"+cn+"( .*)?$", "g");
for (var i = 0; i < els.length; i++ ){
if (exp.test(els[i].className)){
els[i].style.display="none";
}
}
}
function showElementsByClassName(cn){
var arr = new Array();
var els = document.getElementsByTagName("*");
var exp= new RegExp("^(.* )?"+cn+"( .*)?$", "g");
for (var i = 0; i < els.length; i++ ){
if (exp.test(els[i].className)){
els[i].style.display="block";
}
}
}
function select_kind(value)
{
document.getElementById("import_title").style.display="none";
document.getElementById("import_table").style.display="none";
hideElementsByClassName("items_import_div");
hideElementsByClassName("items_country_div");
if (value=="import") {
document.getElementById("import_title").style.display="block";
document.getElementById("import_table").style.display="block";
showElementsByClassName("items_import_div");
}
}
{/literal}
</script>
<div class="tabForm" id="import_title" style="border-top:none;width:100%;height:1px;padding:0px;align:center;{$IMPORT}"><h4 style="padding-top: 5px;">Import</h4></div>
'
),
),
array(
array(
'name'=>'pz_options',
'hideLabel'=>true,
'customCode'=>'
<div id="import_table" style="{$IMPORT}"><br>{$IMPORT_TABLE}</div>
',
),
),
),
'LBL_ITEMS_TAB'=> array(
array(
array(
'name' => 'items_list_panel',
'allCols' => true,
'hideLabel' => true,
'customCode' => '
'
// .'{literal}'.
// '<script language="javascript">var parent_options='.$json->encode($app_list_strings['ecmworkitems_parent_dom']).';</script>'
// .'{/literal}'.
.'
<link rel="stylesheet" type="text/css" href="modules/EcmStockDocIns/MyTable.css" />
<link rel="stylesheet" type="text/css" href="modules/EcmStockDocIns/AjaxSearch/AjaxSearch.css" />
<br><input type="button" name="button" class="button" value="{$MOD.BTN_CALCULATE_PURCHASE_PRICE}" onClick="calculatePrices();"/><br>
<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="10%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="45%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
<td width="3%">{$MOD.LBL_EDITTABLE_UNIT}</td>
<td width="8%">Ostatnia cena</td>
<td width="8%">{$MOD.LBL_EDITTABLE_INVOICE_PRICE}</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="12%">{$MOD.LBL_EDITTABLE_WEIGHT_NETTO}</td>
<td width="12%">{$MOD.LBL_EDITTABLE_ADD_FIELDS}</td>
<td width="12%">Nr parti</td>
<td width="12%">Data ważności</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 width="100%"" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="55%" class="dataLabel" valign="top">
<a href="javascript: N.moveUpRow();" >{$MOD.LBL_MOVE_ROW_UP}</a> - <a href="javascript: N.moveDownRow();" >{$MOD.LBL_MOVE_ROW_DOWN}</a>
</td> <!--color:#b3b9cf;-->
<td width="40%" class="dataField" style="text-align: left;">
<br>
<table id="result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
<tr id="subtotal_tr">
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_SUBTOTAL}</td>
<td class="positionsField" style="border-top:0px;"><input type="text" style="border:0px;font-weight:900;width:100%;text-align:right;" readonly="readonly" name="subtotal" id="subtotal" value=\'{$fields.subtotal.value}\'></td>
</tr>
<tr id="total_tr">
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total_2" id="total_2" value=\'\'></td>
</tr>
<!--
<tr id="discount_tr">
<td class="positionsLabel">{$MOD.LBL_DISCOUNT}</td>
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="discount_2" id="discount_2" value=\'\'></td>
</tr>
<tr id="total_tr">
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total" id="total" value=\'{$fields.total.value}\'></td>
</tr>
-->
</table>
</td>
<td width="5%" class="dataField" style="text-align: left;">&nbsp;</td>
</tr>
</table>
',
)
),
),
'LBL_TEXTS_TAB'=> array(
array(array('name' => 'header_text', 'label' => 'LBL_HEADER_TEXT','customCode' => '{$MFP.footer}<br /><textarea id="header_text" name="header_text" rows="5" style="width:100%;">{$fields.header_text.value}</textarea>'),),
array(array('name' => 'footer_text', 'label' => 'LBL_FOOTER_TEXT','customCode' => '{$MFP.header}<br /><textarea id="footer_text" name="footer_text" rows="5" style="width:100%;">{$fields.footer_text.value}</textarea>'),),
array(array('name' => 'ads_text', 'label' => 'LBL_ADS_TEXT','customCode' => '{$MFP.ads}<br /><textarea id="ads_text" name="ads_text" rows="5" style="width:100%;">{$fields.ads_text.value}</textarea>'),),
),
/*
'LBL_PREVIEW_TAB'=> array(
array(
array(
'name' => 'preview_panel',
'allCols' => true,
'hideLabel' => true,
'customCode' => '<span id=\'previewPDF\' width="100%" height="100%"></span>'
),
),
),
*/
),
);
?>

View File

@@ -0,0 +1,502 @@
<?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;
$path = 'modules/EcmStockDocIns/ModuleFieldsParser/ModuleFieldsParser.php';
if(file_exists($path)) {
require_once($path);
$mfp = new ModuleFieldsParser();
}
/*
if((!isset($focus->footer_text) || $focus->footer_text == '') && (!isset($focus->name) || $focus->name == '') && (!isset($focus->id) || $focus->id == '')) $focus->footer_text = translate('LBL_DEFAULT_FOOTER_TEXT', 'EcmDocumentTemplates');
if((!isset($focus->header_text) || $focus->header_text == '') && (!isset($focus->name) || $focus->name == '') && (!isset($focus->id) || $focus->id == '')) $focus->header_text = translate('LBL_DEFAULT_HEADER_TEXT', 'EcmDocumentTemplates');
*/
$viewdefs['EcmStockDocIns']['EditView'] = array (
'templateMeta' => array (
'form' => array (
'enctype'=>'multipart/form-data',
'buttons'=>array(
'SAVE',
'CANCEL',
),
'hidden'=>array(
// '<input type="hidden" name="subtotal" id="subtotal" value=\'{$fields.subtotal.value}\'>',
// '<input type="hidden" name="total" id="total" value=\'{$fields.total.value}\'>',
),
),
'maxColumns' => '2',
'widths' => array (
array('label' => '10', 'field' => '30'),
array('label' => '10', 'field' => '30'),
),
'includes' => array(
array('file'=>'include/JSON.js'),
array('file'=>'include/javascript/quicksearch.js'),
array('file'=>'modules/EcmStockDocIns/EcmStockDocIns.js'),
),
),
'panels' => array (
'DETAILS'=> array(
array(array('type' => 'tab','active' => true,)),
array(
array(
'name' => 'document_no',
'tabIndex' => 'f',
'customCode' => '<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}\'>'
),
'assigned_user_name'
),
array (
'parent_name',
'type'
),
array (
'',
'ecmstockdocin_name'
),
array (
'status',
''
),
array (
array('name'=>'register_date','type'=>'date','displayParams'=>array('showFormats'=>true)),
''
),
array (
array('name'=>'sell_date','type'=>'date','displayParams'=>array('showFormats'=>true)),
'',
),
array (
array('name'=>'payment_date','type'=>'date','displayParams'=>array('showFormats'=>true)),
array(
'label'=>'LBL_TEMPLATE_NAME',
'customCode'=>'<select id="template_id" name="template_id" onChange="document.getElementById(\'template_name\').value=this.options[this.selectedIndex].text;">{$DOCUMENT_TEMPLATES_OPTIONS}</select><input type="hidden" id="template_name" name="template_name" value="{$fields.template_name.value}">'
)
),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' => '<br><div class="tabForm" style="border-top:none;width:100%;height:1px;padding:0px;align:center;"></div><h4>{$MOD.LBL_TO_INFORMATIONS}</h4>'
),
),
array (
array(
'name' => 'parent_address_street',
'tabIndex' => 'p',
'customCode' => '<textarea id="parent_address_street" name="parent_address_street" rows="2" cols="30" maxlength="150">{$fields.parent_address_street.value}</textarea>',
),
),
array ('parent_address_postalcode', 'to_nip'),
array ('parent_address_city', 'to_vatid'),
array (
'parent_address_country',
array(
'name' => 'to_is_vat_free',
'tabIndex' => 't',
'customCode' => '<input type="checkbox" id="to_is_vat_free" name="to_is_vat_free" value="{$fields.to_is_vat_free.value}" onClick="N.calculateTotal();" {if $fields.to_is_vat_free.value == 1}checked{/if}>'
),
),
),
'ITEMS'=> array(
array(array('type' => 'tab')),
array(
array(
'allCols' => true,
'hideLabel' => true,
'customCode' => '
'
// .'{literal}'.
// '<script language="javascript">var parent_options='.$json->encode($app_list_strings['ecmworkitems_parent_dom']).';</script>'
// .'{/literal}'.
.'
<link rel="stylesheet" type="text/css" href="modules/EcmStockDocIns/MyTable.css" />
<script src="modules/EcmStockDocIns/MyTable.js"></script>
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:300px;max-height:300px;overflow:auto;">
<table class="positions" style="width:100%;" id="itemsTable">
<thead id="head">
<tr id="tr">
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
<td width="10%">{$MOD.LBL_EDITTABLE_CODE}</td>
<td width="42%">{$MOD.LBL_EDITTABLE_NAME}</td>
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
<td width="13%">{$MOD.LBL_EDITTABLE_PRICE}</td>
<td width="8%">{$MOD.LBL_EDITTABLE_DISCOUNT}</td>
<td width="13%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
<td width="6%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
</tr>
</thead>
<tbody id="tbody">
</tbody>
</table>
</div>
<table width="100%"" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="55%" class="dataLabel" valign="top">
<a href="javascript: N.moveUpRow();" >{$MOD.LBL_MOVE_ROW_UP}</a> - <a href="javascript: N.moveDownRow();" >{$MOD.LBL_MOVE_ROW_DOWN}</a>
</td> <!--color:#b3b9cf;-->
<td width="40%" class="dataField" style="text-align: left;">
<br>
<table id="result_table" cellpadding="0" cellspacing="0" style="width:100%; height:100%; border: 1px solid rgb(48,192,255);">
<tr id="subtotal_tr">
<td class="positionsLabel" style="border-top:0px;">{$MOD.LBL_SUBTOTAL}</td>
<td class="positionsField" style="border-top:0px;"><input type="text" style="border:0px;font-weight:900;width:100%;text-align:right;" readonly="readonly" name="subtotal" id="subtotal" value=\'{$fields.subtotal.value}\'></td>
</tr>
<tr id="total_tr">
<td class="positionsLabel">{$MOD.LBL_TOTAL}</td>
<td class="positionsField"><input type="text" readonly="readonly" style="border:0px;font-weight:900;width:100%;text-align:right;" name="total" id="total" value=\'{$fields.total.value}\'></td>
</tr>
</table>
</td>
<td width="5%" class="dataField" style="text-align: left;">&nbsp;</td>
</tr>
</table>
',
)
),
),
'TEXTS'=> array(
array(array('type' => 'tab')),
array(array('label' => 'LBL_HEADER_TEXT','customCode' => $mfp->getFormHTML(true, 'header')),),
array(array('tabIndex'=>'f', 'customCode'=>'<textarea id="header_text" name="header_text" rows="5" style="width:100%;">{$fields.header_text.value}</textarea>')),
array(array('label' => 'LBL_FOOTER_TEXT','customCode' => $mfp->getFormHTML(true, 'footer')),),
array(array('tabIndex'=>'f', 'customCode'=>'<textarea id="footer_text" name="footer_text" rows="5" style="width:100%;">{$fields.footer_text.value}</textarea>')),
array(array('label' => 'LBL_ADS_TEXT','customCode' => $mfp->getFormHTML(true, 'ads')),),
array(array('tabIndex'=>'f', 'customCode'=>'<textarea id="ads_text" name="ads_text" rows="5" style="width:100%;">{$fields.ads_text.value}</textarea>')),
),
'PREVIEW'=> array(
array(array('type' => 'tab')),
array(
array(
'customCode' => 'preview'
),
),
),
'EMAIL'=> array(
array(array('type' => 'tab')),
array(
array(
'customCode' => 'email'
),
),
),
),
);
?>

View File

@@ -0,0 +1,164 @@
<?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["EcmStockDocIns"] = array(
'CONTACT_NAME'=>array(
'label'=>'LBL_CONTACT_NAME',
),
'ECMLANGUAGE'=>array(
'label'=>'LBL_ECMLANGUAGE',
),
'PARENT_NAME_COPY'=>array(
'label'=>'LBL_PARENT_NAME_COPY',
),
'PARENT_CONTACT_NAME'=>array(
'label'=>'LBL_PARENT_CONTACT_NAME',
),
'PARENT_CONTACT_TITLE'=>array(
'label'=>'LBL_PARENT_CONTACT_TITLE',
),
'PARENT_ADDRESS_STREET'=>array(
'label'=>'LBL_PARENT_ADDRESS_STREET',
),
'PARENT_ADDRESS_POSTALCODE'=>array(
'label'=>'LBL_PARENT_ADDRESS_POSTALCODE',
),
'PARENT_ADDRESS_COUNTRY'=>array(
'label'=>'LBL_PARENT_ADDRESS_COUNTRY',
),
'PARENT_ADDRESS_CITY'=>array(
'label'=>'LBL_PARENT_ADDRESS_CITY',
),
'STATUS' => array(
'width' => '1',
'label' => '&nbsp;',
'default' => true,
),
'DOCUMENT_NO' => array(
'width' => '10',
'label' => 'LBL_DOCUMENT_NO',
'sortable' => true,
'link' => true,
'default' => true,
),
'TYPE' => array(
'width' => '10',
'label' => 'LBL_TYPE',
'default' => true,
),
'NAME' => array(
'width' => '15',
'label' => 'LBL_NAME',
'default' => true,
'link'=>true,
'sortable' => true
),
'PARENT_ID' => array(
'width'=>'1',
'sortable'=>false,
'label'=>'&nbsp;',
'default'=>true,
'customCode'=>' ',
),
'PARENT_NAME' => array(
'width' => '20',
'label' => 'LBL_PARENT_NAME',
'link'=>true,
'module'=>'Accounts',
'id'=>'PARENT_ID',
'default' => true,
),
'SUBTOTAL' => array(
'width' => '10',
'label' => 'Wartość netto',
'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,
),
'ASSIGNED_USER_NAME' => array(
'width' => '10',
'label' => 'LBL_LIST_ASSIGNED_USER',
'default' => true
),
'OPTIONS' => array (
'width' => '7',
'label' => '&nbsp;',
'default' => true,
'sortable' => false,
'align' => 'right',
),
);
?>

View File

@@ -0,0 +1,128 @@
<?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['EcmStockDocIns'] = array (
'templateMeta' => array (
'maxColumns' => '3',
'widths' => array (
'label' => '10',
'field' => '30'
),
),
'layout' => array (
'basic_search' => array (
'document_no',
'parent_name',
'register_date',
'assigned_user_name',
),
'advanced_search' => array (
'name',
'assigned_user_name',
'parent_name',
'contact_name',
'stock_name',
'ecmlanguage',
'register_date',
'parent_name_copy',
'parent_contact_name',
'parent_contact_title',
'total',
'parent_address_street',
'parent_address_postalcode',
'parent_address_country',
'parent_address_city',
),
),
);
?>

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

View File

@@ -0,0 +1,217 @@
<?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['EcmStockDocIns']['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' => 'ForEcmStockDocIns',
'title_key' => 'LBL_NOTES_SUBPANEL_TITLE',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopSelectButton'),
array('widget_class' => 'SubPanelTopCreateButton'),
),
),
'emails' => array (
'order' => 15,
'module' => 'Emails',
'sort_order' => 'asc',
'sort_by' => 'date_modified',
'get_subpanel_data' => 'emails',
'add_subpanel_data' => 'emails_id',
'subpanel_name' => 'ForEcmStockDocIns',
'title_key' => 'LBL_EMAILS_SUBPANEL_TITLE',
'top_buttons' => array(),
),*/
'notes' => array(
'order' => 110,
'module' => 'Notes',
'sort_order' => 'asc',
'sort_by' => 'date_entered',
'subpanel_name' => 'default',
'get_subpanel_data' => 'notes',
'add_subpanel_data' => 'note_id',
'title_key' => 'LBL_NOTES_SUBPANEL_TITLE',
'top_buttons' => array(
array('widget_class' => 'SubPanelTopCreateButton'),
),
),
'documents' => array(
'order' => 130,
'module' => 'Documents',
'subpanel_name' => 'default',
'get_subpanel_data' => 'documents',
'title_key' => 'Dokumenty',
),
'ecmpurchaseorders' => array (
'order' => 10,
'module' => 'EcmPurchaseOrders',
'sort_order' => 'asc',
'sort_by' => 'name',
'get_subpanel_data' => 'ecmpurchaseorders',
'add_subpanel_data' => 'po_id',
'subpanel_name' => 'default',
'title_key' => 'Zamówienia zakupu',
),/*
'ecmstockins' => array (
'order' => 20,
'module' => 'EcmStockIns',
'sort_order' => 'asc',
'sort_by' => 'name',
'get_subpanel_data' => 'ecmstockins',
'add_subpanel_data' => 'ecmstockin_id',
'subpanel_name' => 'default',
'title_key' => 'LBL_ECMSTOCKINS_SUBPANEL_TITLE',
),
'ecmsales' => array (
'order' => 30,
'module' => 'EcmSales',
'sort_order' => 'asc',
'sort_by' => 'name',
'get_subpanel_data' => 'ecmsales',
'add_subpanel_data' => 'so_id',
'subpanel_name' => 'default',
'title_key' => 'Sales Order',
),*/
'ecmstockdocouts' => array (
'order' => 40,
'module' => 'EcmStockDocOuts',
'sort_order' => 'asc',
'sort_by' => 'name',
'get_subpanel_data' => 'ecmstockdocouts',
'add_subpanel_data' => 'wz_id',
'subpanel_name' => 'default',
'title_key' => 'LBL_ECMSTOCKDOCOUTS_SUBPANEL_TITLE',
),
'ecmdeliverynotes' => array (
'order' => 50,
'module' => 'EcmDeliveryNotes',
'sort_order' => 'asc',
'sort_by' => 'name',
'get_subpanel_data' => 'ecmdeliverynotes',
'add_subpanel_data' => 'dn_id',
'subpanel_name' => 'default',
'title_key' => 'LBL_ECMDELIVERYNOTES_SUBPANEL_TITLE',
),
'ecminvoiceouts' => array (
'order' => 60,
'module' => 'EcmInvoiceOuts',
'sort_order' => 'asc',
'sort_by' => 'name',
'get_subpanel_data' => 'ecminvoiceouts',
'add_subpanel_data' => 'ecminvoiceout_id',
'subpanel_name' => 'default',
'title_key' => 'LBL_ECMINVOICEOUTS_SUBPANEL_TITLE',
),
);
$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select correct_id from ecmstockdocins where id='".$_REQUEST['record']."'"));
if(!$r['correct_id']){
$layout_defs['EcmStockDocIns']['subpanel_setup']['ecmstockdocins'] = array (
'order' => 70,
'module' => 'EcmStockDocIns',
'sort_order' => 'asc',
'sort_by' => 'name',
'get_subpanel_data' => 'ecmstockdocins',
'add_subpanel_data' => 'correct_id',
'subpanel_name' => 'default',
'title_key' => 'LBL_ECMSTOCKDOCINS_SUBPANEL_TITLE',
);
}
?>

View File

@@ -0,0 +1,126 @@
<?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' => 'EcmStockDocIns'),
),
'where' => '',
'list_fields' => array(
'document_no' => array(
'name' => 'document_no',
'vname' => 'LBL_DOCUMENT_NO',
'module' => 'EcmStockDocIns',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '10%',
),
'parent_name' => array (
'name' => 'parent_name',
'vname' => 'Dostawca',
'module' => 'EcmStockDocIns',
'width' => '15%',
),
'register_date' => array(
'name' => 'register_date',
'vname' => 'LBL_REGISTER_DATE',
'module' => 'EcmStockDocIns',
'width' => '10%',
),
'QUANTITY' => array(
'name' => 'quantity',
'vname' => 'Ilość',
'align' => 'right',
'module' => 'EcmStockDocIns',
'width' => '10%',
),
'PRICE_NETTO' => array(
'name' => 'price_netto',
'vname' => 'Cena netto',
'align' => 'right',
'module' => 'EcmStockDocIns',
'width' => '10%',
),
'TOTAL_NETTO' => array(
'name' => 'total_netto',
'vname' => 'Wartość netto',
'align' => 'right',
'module' => 'EcmStockDocIns',
'width' => '10%',
),
'options' => array(
'name' => 'options',
'label' => '&nbsp;',
'default' => true,
'width' => '10%',
'sortable' => false,
),
'status' => array(
'name' => 'status',
'vname' => 'LBL_STATUS',
'module' => 'EcmStockDocIns',
'width' => '40%',
),
/*
'PDF_URL' => array(
'width' => '2%',
'label' => '&nbsp;',
'link' => true,
'default' => true,
'sortable' => false,
),
'edit_button'=>array(
'widget_class' => 'SubPanelEditButton',
'width' => '2%',
),
*/
),
);

View File

@@ -0,0 +1,121 @@
<?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".
*/
error_reporting(0);
$subpanel_layout = array(
/*'top_buttons' => array(
array('widget_class' => 'SubPanelTopCreateButton'),
array('widget_class' => 'SubPanelTopSelectButton', 'popup_module' => 'EcmStockDocIns'),
),*/
'where' => '',
'list_fields' => array (
'status' => array (
'name' => 'status',
'vname' => '&nbsp;',
'module' => 'EcmStockDocIns',
'width' => '1%',
'default'=>true,
),
'document_no' => array (
'name' => 'document_no',
'vname' => 'LBL_DOCUMENT_NO',
'module' => 'EcmStockDocIns',
'widget_class' => 'SubPanelDetailViewLink',
'width' => '15%',
),
'parent_name' => array (
'name' => 'parent_name',
'vname' => 'Kontrahent',
'module' => 'EcmStockDocIns',
'width' => '40%'
),
'register_date' => array (
'name' => 'register_date',
'vname' => 'LBL_REGISTER_DATE',
'module' => 'EcmStockDocOuts',
'width' => '10%',
),
'price' => array (
'name' => 'price',
'vname' => 'Cena',
'module' => 'EcmStockDocIns',
'width' => '5%',
),
'quantity' => array (
'name' => 'quantity',
'vname' => 'Ilość',
'module' => 'EcmStockDocIns',
'width' => '5%',
),
'wartosc' => array (
'name' => 'wartosc',
'vname' => 'Wartość',
'module' => 'EcmStockDocIns',
'width' => '5%',
),
'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%',
),
*/
),
);
?>