<?php

/* * *******************************************************************************
 * SugarCRM is a customer relationship management program developed by
 * SugarCRM, Inc. Copyright (C) 2004-2010 SugarCRM Inc.
 *
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 *
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 *
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words 
 *
 * "Powered by SugarCRM".
 * ****************************************************************************** */

$viewdefs['EcmFkVatRegisters']['EditView'] = array(
    'templateMeta' => array(
        'form' => array(
            'buttons'=>array(
                array(
                    'customCode' => '
                    <input type="submit" name="save" class="button" value="Zapisz" onclick="updatePositions(); saveItems(true); this.form.action.value=\'Save\'; /*return false;*/" />
                    ',
                ),
                'CANCEL',
            ),
            'enctype' => 'multipart/form-data',
            'hidden' => array(
                '<input type="hidden" name="sym_dok_use_type" id="sym_dok_use_type" value=""/>',
                '<input type="hidden" name="items_list" id="items_list" value="{$POSITION_LIST}"/>',
                // '<input type="hidden" name="type" id="type" value=""/>',
                '<input type="hidden" name="ecmfkvatkind_id_helper" id="ecmfkvatkind_id_helper" value="{$ECMFKVATKIND_ID_HELPER}"/>',
                '<input type="hidden" name="template_id" id="template_id" value=""/>',
            ),
        ),
        'maxColumns' => '2',
        'widths' => array(
            array(
                'label' => '10',
                'field' => '30',
            ),
            array(
                'label' => '10',
                'field' => '30',
            ),
        ),
        /*
        'javascript' =>
        '
        <script type="text/javascript" src="include/javascript/popup_parent_helper.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
        <script type="text/javascript" src="include/jsolait/init.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
        <script type="text/javascript" src="include/jsolait/lib/urllib.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
        <script type="text/javascript" src="include/javascript/jsclass_base.js"></script>
        <script type="text/javascript" src="include/javascript/jsclass_async.js"></script>
        <script type="text/javascript" src="include/JSON.js?s={$SUGAR_VERSION}"></script>
        <script type="text/javascript" src="modules/EcmFkVatRegisters/EcmFkVatRegisters.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
        <script type="text/javascript" src="modules/EcmFkVatRegisters/EcmFkVatRegistersEditView.js?s={$SUGAR_VERSION}&c={$JS_CUSTOM_VERSION}"></script>
        ',
        */
        'includes' => array(
            array(
                'file' => 'include/JSON.js',
            ),
            /*
            array(
                'file' => 'include/javascript/quicksearch.js',
            ),
            array(
                'file' => 'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js',
            ),
            array(
                'file' => 'modules/EcmFkVatRegisters/AjaxSearch/AjaxSearch.js',
            ),
            array(
                'file' => 'modules/EcmFkVatRegisters/formloader.js',
            ),
            */
            array(
                'file' => 'modules/EcmFkVatRegisters/MyTable.js',
            ),
            array(
                'file' => 'modules/EcmFkVatRegisters/EcmFkVatRegisters.js',
            ),
            array(
                'file' => 'modules/EcmFkVatRegisters/EcmFkVatRegistersEditView.js',
            ),
            array(
                'file' => 'modules/EcmProducts/mintajax.js',
            ),
            array(
                'file' => 'modules/EcmProducts/helper.js',
            ),
        ),
    ),
    'panels' => array(
        'LBL_DETAILS' => array(
            array(
                'status',
                '',
            ),
            array(
                'type',
                'ecmfkvatkind_id',
            ),
            array(
                // 'sym_dok',
                // 'sym_dok_symbol',
                array(
                // 'name' => 'sym_dok_symbol',
                'label' => 'LBL_SYM_DOK_SYMBOL',
                'customCode' => '
                    <input type="text" name="sym_dok_symbol" class="sqsEnabled" tabindex="104" id="sym_dok_symbol" size="" value="" title="" autocomplete="off">
                    <input type="hidden" name="sym_dok_id" id="sym_dok_id" value="c332f747-181d-e87d-76c4-51d51b2c56e4">
                    <span class="id-ff multiple">
                            
                        {literal}
                        <button type="button" name="btn_sym_dok_symbol" id="btn_sym_dok_symbol" tabindex="104" title="Wybierz [Alt+T]" accesskey="T" class="button firstChild" value="Wybierz" onclick="open_popup(
                            &quot;EcmSymbols&quot;, 
                            600, 
                            400, 
                            &quot;&quot;, 
                            true, 
                            false, 
                            {
                                &quot;call_back_function&quot;:&quot;set_return&quot;,
                                &quot;form_name&quot;:&quot;EditView&quot;,
                                &quot;field_to_name_array&quot;: 
                                {
                                    &quot;id&quot;:&quot;sym_dok_id&quot;,
                                    &quot;symbol&quot;:&quot;sym_dok_symbol&quot;,
                                    &quot;use_type&quot;:&quot;sym_dok_use_type&quot;
                                }
                            }, 
                            &quot;single&quot;, 
                            true
                        );">
                            <img src="themes/default/images/id-ff-select.png?s=bed8cd35065048ceebdc639ebe305e2c&amp;c=1">
                        </button>
                        {/literal}
                            
                        <button type="button" name="btn_clr_sym_dok_symbol" id="btn_clr_sym_dok_symbol" tabindex="104" title="Wyczyść[Alt+C]" accesskey="C" class="button lastChild" onclick="this.form.sym_dok_symbol.value = \'\'; this.form.sym_dok_id.value = \'\';" value="Wyczyść">
                            <img src="themes/default/images/id-ff-clear.png?s=bed8cd35065048ceebdc639ebe305e2c&amp;c=1">
                        </button>
                        
                    </span>

                    <script type="text/javascript">
                    <!--
                    if(typeof QSProcessedFieldsArray != \'undefined\') 
                    QSProcessedFieldsArray["EditView_sym_dok_symbol"] = false;

                    enableQS(false);
                    -->	
                    </script>
                    ',
                ),
                'nr_dok',
            ),
                    
                    
            array(
                'dat_dok',
                'date_entered',
            ),
            array(
                'ident_k',
                '',
            ),
            array(
                // 'acc',
                'acc_code',
                '',
            ),
            array(
                'description',
                '',
            ),
            // array(
                // Rodzaj transakcji
            // ),
            array(
                // 'sym_par',
                'sym_par_symbol',
                'nr_par',
            ),
            array(
                'dat_zn',
                '',
            ),
            array(
                // 'sp_zap',
                // 'sp_zap_name',
                array(
                'label' => 'LBL_SP_ZAP_NAME',
                'customCode' => '
                    <input type="text" name="sp_zap_name" class="sqsEnabled yui-ac-input" tabindex="118" id="sp_zap_name" size="" value="PRZELEW" title="" autocomplete="off"><div id="EditView_sp_zap_name_results" class="yui-ac-container"><div class="yui-ac-content" style="display: none;"><div class="yui-ac-hd" style="display: none;"></div><div class="yui-ac-bd"><ul><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li><li style="display: none;"></li></ul></div><div class="yui-ac-ft" style="display: none;"></div></div></div>
                    <input type="hidden" name="sp_zap" id="sp_zap" value="3caa3a68-4f75-ca20-18a6-5065b4110d25">
                    
                    <span class="id-ff multiple">
                    
                        {literal}
                        <button type="button" name="btn_sp_zap_name" id="btn_sp_zap_name" tabindex="118" title="Wybierz [Alt+T]" accesskey="T" class="button firstChild" value="Wybierz" onclick="open_popup(
                            &quot;EcmPaymentConditions&quot;, 
                            600, 
                            400, 
                            &quot;&quot;, 
                            true, 
                            false, 
                            {
                                &quot;call_back_function&quot;:&quot;set_return&quot;,
                                &quot;form_name&quot;:&quot;EditView&quot;,
                                &quot;field_to_name_array&quot;:
                                {
                                &quot;id&quot;:&quot;sp_zap&quot;,
                                &quot;name&quot;:&quot;sp_zap_name&quot;,
                                &quot;days&quot;:&quot;il_dni&quot;
                                }
                            }, 
                            &quot;single&quot;, 
                            true
                        );">
                            <img src="themes/default/images/id-ff-select.png?s=bed8cd35065048ceebdc639ebe305e2c&amp;c=1">
                        </button>
                        {/literal}
                        
                        <button type="button" name="btn_clr_sp_zap_name" id="btn_clr_sp_zap_name" tabindex="118" title="Wyczyść[Alt+C]" accesskey="C" class="button lastChild" onclick="this.form.sp_zap_name.value = \'\'; this.form.sp_zap.value = \'\';" value="Wyczyść">
                            <img src="themes/default/images/id-ff-clear.png?s=bed8cd35065048ceebdc639ebe305e2c&amp;c=1">
                        </button>
                    
                    </span>
                    
                    <script type="text/javascript">
                    <!--
                    if(typeof QSProcessedFieldsArray != \'undefined\') 
                        QSProcessedFieldsArray["EditView_sp_zap_name"] = false;
                    
                    enableQS(false);
                    -->	
                    </script>
                ',
                ),
                'il_dni',
            ),
            array(
                'dat_zap',
                '',
            ),
            // array(
                // 'zob_nal',
                // 'year',
                // 'month',
                // 'sym_oper',
                // 'nr_sys',
                // 'poz_dok',
                // 'id_dok',
                // 'spar_tr',
                // 'dat_rej',
                // 'amount',
                // 'acc_wn',
                // 'acc_ma',
                // 'nickname',
                // 'nip',
                // 'reserve',
                // 'kwota_wal',
                // 'symbol_wal',
                // 'kurs_wal',
                // 'dat_zgo',
                // 'kod_czynsz',
                // 'ide_czynsz',
            // ),
        ),
        
        'LBL_ITEMS' => array(
            array(
                array(
                    'name' => 'position_list',
                    'allCols' => true,
                    'hideLabel' => true,
                    'customCode' =>
                    '
                    <link rel="stylesheet" type="text/css" href="modules/EcmFkVatTables/MyTable.css" />
                    <!--<link rel="stylesheet" type="text/css" href="modules/EcmFkVatTables/AjaxSearch/AjaxSearch.css" />-->
                    <input tabindex="100103" title="Przelicz" class="button" onclick="updatePositions();" type="button" name="button" value="Przelicz" />
                    <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>{$MOD.LBL_EDITABLE_ID}</td>-->
                                    <!--<td>{$MOD.LBL_EDITABLE_DATE_ENTERED}</td>-->
                                    <!--<td>{$MOD.LBL_EDITABLE_DATE_MODIFIED}</td>-->
                                    <!--<td>{$MOD.LBL_EDITABLE_MODIFIED_USER_ID}</td>-->
                                    <!--<td>{$MOD.LBL_EDITABLE_CREATED_BY}</td>-->
                                    <!--<td>{$MOD.LBL_EDITABLE_DELETED}</td>-->
                                    <!--<td>{$MOD.LBL_EDITABLE_ECMFKVATREGISTER_ID}</td>-->
                                    <!--<td>{$MOD.LBL_EDITABLE_NR_SYS}</td>-->
                                    <td>{$MOD.LBL_EDITABLE_CODE}</td>
                                    <td>{$MOD.LBL_EDITABLE_NAME}</td>
                                    <td>{$MOD.LBL_EDITABLE_DAT_DOK}</td>
                                    <td>{$MOD.LBL_EDITABLE_ACC_WN}</td>
                                    <td>{$MOD.LBL_EDITABLE_ACC_MA}</td>
                                    <td>{$MOD.LBL_EDITABLE_AMOUNT}</td>
                                    <td>{$MOD.LBL_EDITABLE_SP_ZAP}<br/>{$MOD.LBL_EDITABLE_IL_DNI}</td>
                                    <!--<td>{$MOD.LBL_EDITABLE_IL_DNI}</td>-->
                                    <!--<td>{$MOD.LBL_EDITABLE_DAT_ZAP}</td>-->
                                    <!--<td>{$MOD.LBL_EDITABLE_KWOTA_WA}</td>-->
                                    <td>{$MOD.LBL_EDITABLE_SYMB_WA}<br/>{$MOD.LBL_EDITABLE_KURS_WAL}</td>
                                    <!--<td>{$MOD.LBL_EDITABLE_KURS_WAL}</td>-->
                                    
                                    <td width="5%">{$MOD.LBL_EDITABLE_OPTIONS}</td>
                                    
                                </tr>
                            </thead>
                            <tbody id="tbody">                                
                            </tbody>
                        </table>
                    </div>
                    ',
                ),
            ),
        ),
        
    ),
);

// id
// date_entered
// date_modified
// created_by
// modified_user_id
// deleted
// description
// type
// year
// month
// sym_oper
// nr_sys
// ident_k
// sym_dok
// nr_dok
// poz_dok
// dat_dok
// id_dok
// spar_tr
// zob_nal
// dat_zn
// sym_par
// nr_par
// sp_zap
// il_dni
// dat_zap
// acc
// dat_rej
// amount
// acc_wn
// acc_ma
// nickname
// nip
// reserve
// kwota_wal
// symbol_wal
// kurs_wal
// dat_zgo
// kod_czynsz
// ide_czynsz

// id
// deleted
// date_entered
// date_modified
// created_by
// modified_user_id
// ecmfkvatregister_id
// ecmfkvatreg_id
// acc_wn
// acc_ma
// account_acc_wn
// account_acc_ma
// zal_wn
// zal_ma