426 lines
12 KiB
PHP
Executable File
426 lines
12 KiB
PHP
Executable File
<?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;"> <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> <span>{$fields.parent_address_postalcode.value}</span> <span>{$fields.parent_address_city.value}</span> <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} {$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">
|
|
|
|
|
|
|
|
</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;"> </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>'
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
|
|
|
|
?>
|
|
|