<?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['EcmKpkw']['DetailView'] = array(
    'templateMeta' => array(
        'maxColumns' => '2',
        'form' => array(
			'buttons' => array (
						array (
										'customCode' => '{$CREATE_PDF}' 
								),
			),
        ),
        'widths' => array(
            array(
                'label' => '10',
                'field' => '30',
            ),
            array(
                'label' => '10',
                'field' => '30',
            ),
        ),
		'includes' => array(
            array('file' => 'include/JSON.js'),
            //array('file' => 'modules/EcmKpkw/MyTable.js'),
            array('file' => 'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js'),
            array('file' => 'modules/EcmKpkw/EcmKpkw.js'),
        ),
    ),
    'panels' => array(
        'lbl_document_information' => 
		  array (

			array (
			  array (
				'name' => 'ecmkpkw_name',
				'label' => 'LBL_DOC_NAME',
			  ),
			  array (
				'name' => 'document_no',
				'label' => 'LBL_DOCUMENT_NO',
			  ),
			),

		  array (
			  array (
				'name' => 'amount',
				'label' => 'LBL_AMOUNT',
			  ),          
			  array (
				'name' => 'description',
				'label' => 'LBL_DOC_DESCRIPTION',
			  ),
			),
		  array (

			  array (
				'name' => 'modified_user_fullname',
				'label' => 'LBL_MODIFIED_USER',
			  ),
			  array (
				'name' => 'date_modified',
				'label' => 'LBL_DATE_MODIFIED',
			  ),
			),
		  array (
			  array (
				'name' => 'created_by_fullname',
				'label' => 'LBL_CREATED',
			  ),
			  array (
				'name' => 'date_entered',
				'label' => 'LBL_DATE_ENTERED',
			  ),
			
			),
			  array(
			  array('name' => 'currency_id', 'label' => 'LBL_CURRENCY'),
			  			  array('name' => 'currency_value', 'label' => 'LBL_CURRENCY_VALUE'),
	
			   ),
					  array (
			  array (
				'name' => 'register_date',
				'label' => 'LBL_PAYMENT_DATE',
			  ),
			
			),
		  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 (
				'parent_name',
				'dbf_index',
			),
		  array (
				'parent_address_street',
				'parent_address_postalcode',
			),
		  array (
				'parent_address_city',
				'parent_address_country',
			),
        ),
        'LBL_PREVIEW_TAB' => array(
            array(
                array(
                    'name' => 'preview_panel',
                    'allCols' => true,
                    'hideLabel' => true,
                    'customCode' =>
                    '
                    <select id="preview_type" name="preview_type">
                        <option value="">KPKW</option>
                    </select>
                    <input type="button" class="button" onClick="preview_pdf();" value="Generuj"/>
                    <hr/>
                    <span id="previewPDF" width="100%" height="100%"></span>
                    ',
                ),
            ),
        ),
    ),
);

/*
    id
    date_entered
    date_modified
    date_package
    date_document
    modified_user_id
    created_by
    description
    deleted
    package_date
    package_name
    package_number
    package_amount
    package_acc_ma
    package_acc_wn
    package_position
    package_symbol
    package_identifier
*/