503 lines
15 KiB
PHP
503 lines
15 KiB
PHP
<?php
|
|
$viewdefs ['EcmOfferes'] =
|
|
array (
|
|
'QuickCreate' =>
|
|
array (
|
|
'templateMeta' =>
|
|
array (
|
|
'form' =>
|
|
array (
|
|
'enctype' => 'multipart/form-data',
|
|
'buttons' =>
|
|
array (
|
|
0 =>
|
|
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}">',
|
|
),
|
|
1 => 'CANCEL',
|
|
2 =>
|
|
array (
|
|
'customCode' => ' <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=EcmOfferes&action=index\'" type="button" name="button" value="{$MOD.LBL_GO_TO_LIST_BUTTON_LABEL}">',
|
|
),
|
|
),
|
|
'hidden' =>
|
|
array (
|
|
0 => '<input type="hidden" name="position_list" id="position_list" value=\'{$POSITION_LIST}\'>',
|
|
1 => '<input type="hidden" name="email_id" id="email_id" value=\'\'>',
|
|
2 => '<input type="hidden" name="parent_type" id="parent_type" value="Accounts">',
|
|
),
|
|
),
|
|
'maxColumns' => '2',
|
|
'widths' =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'label' => '10',
|
|
'field' => '30',
|
|
),
|
|
1 =>
|
|
array (
|
|
'label' => '10',
|
|
'field' => '30',
|
|
),
|
|
),
|
|
'includes' =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'file' => 'include/JSON.js',
|
|
),
|
|
1 =>
|
|
array (
|
|
'file' => 'include/javascript/quicksearch.js',
|
|
),
|
|
2 =>
|
|
array (
|
|
'file' => 'include/ECM/EcmPreviewPDF/EcmPreviewPDF.js',
|
|
),
|
|
3 =>
|
|
array (
|
|
'file' => 'modules/EcmOfferes/AjaxSearch/AjaxSearch.js',
|
|
),
|
|
4 =>
|
|
array (
|
|
'file' => 'modules/EcmOfferes/formloader.js',
|
|
),
|
|
5 =>
|
|
array (
|
|
'file' => 'modules/EcmOfferes/MyTable.js',
|
|
),
|
|
6 =>
|
|
array (
|
|
'file' => 'modules/EcmOfferes/EcmOfferes.js',
|
|
),
|
|
7 =>
|
|
array (
|
|
'file' => 'modules/EcmOfferes/CreateItem.js',
|
|
),
|
|
8 =>
|
|
array (
|
|
'file' => 'modules/EcmProducts/mintajax.js',
|
|
),
|
|
9 =>
|
|
array (
|
|
'file' => 'modules/EcmProducts/helper.js',
|
|
),
|
|
),
|
|
),
|
|
'panels' =>
|
|
array (
|
|
'LBL_DETAILS_TAB' =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'type' => 'tab',
|
|
'active' => true,
|
|
),
|
|
),
|
|
1 =>
|
|
array (
|
|
0 =>
|
|
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}\'>',
|
|
),
|
|
1 =>
|
|
array (
|
|
'name' => 'assigned_user_name',
|
|
'tabIndex' => '1',
|
|
),
|
|
),
|
|
2 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'name' => 'parent_name',
|
|
'tabIndex' => '1',
|
|
),
|
|
1 => '',
|
|
),
|
|
3 =>
|
|
array (
|
|
0 => 'contact_name',
|
|
1 =>
|
|
array (
|
|
'name' => 'ecmpaymentcondition_name',
|
|
'tabIndex' => '1',
|
|
),
|
|
),
|
|
4 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'name' => 'name',
|
|
'tabIndex' => '1',
|
|
),
|
|
1 =>
|
|
array (
|
|
'name' => 'ecmdeliverycondition_name',
|
|
'tabIndex' => '1',
|
|
),
|
|
),
|
|
5 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'name' => 'status',
|
|
'tabIndex' => '1',
|
|
),
|
|
1 =>
|
|
array (
|
|
'label' => 'LBL_TEMPLATE_NAME',
|
|
'tabIndex' => '1',
|
|
'customCode' => '<select tabindex="1" id="template_id" name="template_id" onChange="document.getElementById(\'template_name\').value=this.options[this.selectedIndex].text;">{$DOCUMENT_TEMPLATES_OPTIONS}</select><input type="hidden" id="template_name" name="template_name" value="{$fields.template_name.value}">',
|
|
),
|
|
),
|
|
6 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'name' => 'register_date',
|
|
'tabIndex' => '1',
|
|
'type' => 'datetime',
|
|
'displayParams' =>
|
|
array (
|
|
'showFormats' => true,
|
|
),
|
|
),
|
|
1 =>
|
|
array (
|
|
'name' => 'discount',
|
|
'tabIndex' => '1',
|
|
'customCode' => '<input tabindex="1" type="text" name="discount" id="discount" value="{$fields.discount.value}" onChange="if(CheckDiscount() != -1) calculateTotal();" onKeyDown="return N.KeyPressed(event,this.parentNode,\'decimalNumber\');" >%',
|
|
),
|
|
),
|
|
7 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'name' => 'validtill_date',
|
|
'tabIndex' => '1',
|
|
'type' => 'datetime',
|
|
'displayParams' =>
|
|
array (
|
|
'showFormats' => true,
|
|
),
|
|
),
|
|
1 => 'order_origin',
|
|
),
|
|
8 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'name' => 'currency_id',
|
|
'label' => 'LBL_CURRENCY',
|
|
),
|
|
1 =>
|
|
array (
|
|
'label' => 'LBL_PRICEBOOK',
|
|
'name' => 'pricebook',
|
|
'customCode' => ' <div id=\'pricebooks\'></div><input type="hidden" id="ecmpricebook_id" name="ecmpricebook_id" value=""/>',
|
|
),
|
|
),
|
|
9 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'allCols' => true,
|
|
'hideLabel' => true,
|
|
'customCode' => '<div class="tabForm" style="border-top:none;width:100%;height:1px;padding:0px;align:center;"></div><h4>{$MOD.LBL_TO_INFORMATIONS}</h4>',
|
|
),
|
|
),
|
|
10 =>
|
|
array (
|
|
0 =>
|
|
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" />',
|
|
),
|
|
1 =>
|
|
array (
|
|
'name' => 'ecmlanguage',
|
|
'tabIndex' => '1',
|
|
),
|
|
),
|
|
11 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'name' => 'parent_contact_name',
|
|
'tabIndex' => '1',
|
|
),
|
|
1 =>
|
|
array (
|
|
'name' => 'to_vatid',
|
|
'tabIndex' => '1',
|
|
),
|
|
),
|
|
12 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'name' => 'parent_contact_title',
|
|
'tabIndex' => '1',
|
|
),
|
|
1 =>
|
|
array (
|
|
'name' => 'to_is_vat_free',
|
|
'tabIndex' => '1',
|
|
'customCode' => '<input tabindex="1" type="checkbox" id="to_is_vat_free" name="to_is_vat_free" value="{$fields.to_is_vat_free.value}" {if $fields.to_is_vat_free.value == 1}checked{/if}>',
|
|
),
|
|
),
|
|
13 =>
|
|
array (
|
|
0 =>
|
|
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>',
|
|
),
|
|
1 =>
|
|
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}>',
|
|
),
|
|
),
|
|
14 =>
|
|
array (
|
|
0 =>
|
|
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;" /> <input type="text" name="parent_address_city" id="parent_address_city" value="{$fields.parent_address_city.value}" style="vertical-align:top;width:150px;" />',
|
|
),
|
|
1 => 'show_recipient_code',
|
|
),
|
|
15 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'name' => 'parent_address_country',
|
|
'tabIndex' => '1',
|
|
),
|
|
1 => 'show_ean',
|
|
),
|
|
16 =>
|
|
array (
|
|
0 => 'image_size',
|
|
1 => 'show_ean2',
|
|
),
|
|
),
|
|
'LBL_ITEMS_TAB' =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'type' => 'tab',
|
|
),
|
|
),
|
|
1 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'allCols' => true,
|
|
'hideLabel' => true,
|
|
'customCode' => '
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="modules/EcmOfferes/MyTable.css" />
|
|
<link rel="stylesheet" type="text/css" href="modules/EcmOfferes/AjaxSearch/AjaxSearch.css" />
|
|
|
|
<div style="width:100%;border: 1px solid rgb(48,192,255);background-color:white;height:{$OPT.position_table_height}px;max-height:{$OPT.position_table_height}px;overflow:auto;" id="itemsTableDIV">
|
|
|
|
<table class="positions" style="width:100%;" id="itemsTable">
|
|
|
|
<thead id="head">
|
|
|
|
<tr id="tr">
|
|
|
|
<td width="4%">{$MOD.LBL_EDITTABLE_NO}</td>
|
|
|
|
<td width="10%">{$MOD.LBL_EDITTABLE_CODE}</td>
|
|
<td width="10%">EAN</td>
|
|
|
|
<td width="39%">{$MOD.LBL_EDITTABLE_NAME}</td>
|
|
|
|
<td width="5%">{$MOD.LBL_EDITTABLE_QUANTITY}</td>
|
|
|
|
<td width="12%">{$MOD.LBL_EDITTABLE_PRICE}</td>
|
|
|
|
<td width="6%">{$MOD.LBL_EDITTABLE_VAT}</td>
|
|
|
|
<td width="6%">{$MOD.LBL_EDITTABLE_DISCOUNT}</td>
|
|
|
|
<td width="12%">{$MOD.LBL_EDITTABLE_RECIPIENT_CODE}</td>
|
|
<td width="12%">{$MOD.LBL_EDITTABLE_TOTAL}</td>
|
|
|
|
<td width="6%">{$MOD.LBL_EDITTABLE_OPTIONS}</td>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody id="tbody">
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<table width="100%"" cellpadding="0" cellspacing="0" border="0">
|
|
|
|
<tr>
|
|
|
|
<td width="55%" class="dataLabel" valign="top">
|
|
|
|
<a href="javascript: N.moveUpRow();" >{$MOD.LBL_MOVE_ROW_UP}</a> - <a href="javascript: N.moveDownRow();" >{$MOD.LBL_MOVE_ROW_DOWN}</a>
|
|
|
|
</td> <!--color:#b3b9cf;-->
|
|
|
|
<td width="40%" class="dataField" style="text-align: left;">
|
|
|
|
<br>
|
|
|
|
<table id="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 (
|
|
0 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'type' => 'tab',
|
|
),
|
|
),
|
|
1 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'label' => 'LBL_HEADER_TEXT',
|
|
'customCode' => '{$MFP.footer}',
|
|
),
|
|
),
|
|
2 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'tabIndex' => 'f',
|
|
'customCode' => '<textarea id="header_text" name="header_text" rows="5" style="width:100%;">{$fields.header_text.value}</textarea>',
|
|
),
|
|
),
|
|
3 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'label' => 'LBL_FOOTER_TEXT',
|
|
'customCode' => '{$MFP.header}',
|
|
),
|
|
),
|
|
4 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'tabIndex' => 'f',
|
|
'customCode' => '<textarea id="footer_text" name="footer_text" rows="5" style="width:100%;">{$fields.footer_text.value}</textarea>',
|
|
),
|
|
),
|
|
5 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'label' => 'LBL_ADS_TEXT',
|
|
'customCode' => '{$MFP.ads}',
|
|
),
|
|
),
|
|
6 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'tabIndex' => 'f',
|
|
'customCode' => '<textarea id="ads_text" name="ads_text" rows="5" style="width:100%;">{$fields.ads_text.value}</textarea>',
|
|
),
|
|
),
|
|
),
|
|
'LBL_PREVIEW_TAB' =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'type' => 'tab',
|
|
),
|
|
),
|
|
1 =>
|
|
array (
|
|
0 =>
|
|
array (
|
|
'allCols' => true,
|
|
'hideLabel' => true,
|
|
'customCode' => '<span id=\'previewPDF\' width="100%" height="100%"></span>',
|
|
),
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
?>
|