268 lines
13 KiB
HTML
Executable File
268 lines
13 KiB
HTML
Executable File
<!--
|
|
/*****************************************************************************
|
|
* 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.
|
|
********************************************************************************/
|
|
|
|
-->
|
|
<!-- BEGIN: main -->
|
|
<script language="javascript" src="modules/EcmProducts/mintajax.js"></script>
|
|
<script language="javascript" src="modules/EcmProducts/helper.js"></script>
|
|
|
|
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<form action="index.php" method="post" name="DetailView" id="form">
|
|
<input type="hidden" name="module" value="EcmPriceBooks">
|
|
<input type="hidden" name="record" value="{ID}">
|
|
<input type="hidden" name="isDuplicate" value=false>
|
|
<input type="hidden" name="action">
|
|
<input type="hidden" name="return_module">
|
|
<input type="hidden" name="return_action">
|
|
<input type="hidden" name="return_id" >
|
|
|
|
|
|
<tr>
|
|
<td style="padding-bottom: 2px;">
|
|
<input {NAME_style} title="{APP.LBL_EDIT_BUTTON_TITLE}"
|
|
accessKey="{APP.LBL_EDIT_BUTTON_KEY}"
|
|
class="button"
|
|
onclick="this.form.return_module.value='EcmPriceBooks'; this.form.return_action.value='DetailView'; this.form.return_id.value='{ID}'; this.form.action.value='EditView'"
|
|
type="submit"
|
|
name="Edit"
|
|
value=" {APP.LBL_EDIT_BUTTON_LABEL} "> </td><td>
|
|
<input {NAME_style} title="{APP.LBL_DUPLICATE_BUTTON_TITLE}"
|
|
accessKey="{APP.LBL_DUPLICATE_BUTTON_KEY}"
|
|
class="button"
|
|
onclick="this.form.return_module.value='EcmPriceBooks'; this.form.return_action.value='index'; this.form.isDuplicate.value=true; this.form.action.value='EditView'"
|
|
type="submit"
|
|
name="Duplicate"
|
|
value=" {APP.LBL_DUPLICATE_BUTTON_LABEL} "> </td><td>
|
|
<input {NAME_style} title="{APP.LBL_DELETE_BUTTON_TITLE}"
|
|
accessKey="{APP.LBL_DELETE_BUTTON_KEY}"
|
|
class="button"
|
|
onclick="this.form.return_module.value='EcmPriceBooks'; 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} "></td><td>
|
|
{SHOWPDF}</td><td>
|
|
{LEOBITE}</td><td>
|
|
{LEOBITEEN}</td><td>
|
|
{CATALOGUE}</td><td>
|
|
{PDFGEN}</td><td>
|
|
{GENXLS}</td><td>
|
|
{FIND_DUPES_MERGE_BUTTON}</td><td>
|
|
{SORT_ORDER}</td>
|
|
<td align='right'>{ADMIN_EDIT}</td>
|
|
</tr>
|
|
</table>
|
|
</form>
|
|
<script language="javascript" src="include/ECM/EcmPreviewPDF/EcmPreviewPDF.js"></script>
|
|
<script>
|
|
function showBlock(id)
|
|
{
|
|
var tabs=new Array();
|
|
tabs[0]="details";
|
|
tabs[1]="items";
|
|
document.getElementById('images_block').style.display='none';
|
|
for(var i=0;i<=1;i++)
|
|
{
|
|
document.getElementById(tabs[i]+'_menu').className="";
|
|
document.getElementById(tabs[i]+'_link').className="";
|
|
document.getElementById(tabs[i]+'_block').style.display="none";
|
|
}
|
|
if(id=="previewpdf")document.getElementById('images_block').style.display='block';
|
|
document.getElementById(id+'_menu').className="active";
|
|
document.getElementById(id+'_link').className="current";
|
|
document.getElementById(id+'_block').style.display="block";
|
|
|
|
}
|
|
</script>
|
|
<ul class="subpanelTablist" style="margin-top:10px;" id="groupTabs">
|
|
<li class="active" id="details_menu"><a id="details_link" class="current" href="javascript:showBlock('details');">{MOD.LBL_DETAILS}</a></li>
|
|
<li class="" id="items_menu"><a id="items_link" class="" href="javascript:showBlock('items');">{MOD.LBL_ITEMS}</a></li>
|
|
|
|
<!--<li class="" id="previewxls_menu"><a id="previewxls_link" class="" href="javascript:showBlock('previewxls');mintajaxget('index.php?to_pdf=1&module=EcmPriceBooks&action=showXLS','previewxls_block');">{MOD.LBL_PREVIEWXLS}</a></li>-->
|
|
|
|
</ul>
|
|
<br />
|
|
<div id="details_block" style="display:block;">
|
|
|
|
<table width="100%" border="0" cellspacing="{GRIDLINE}" cellpadding="0">
|
|
{PAGINATION1}
|
|
<th class="dataLabel" align="left" colspan="8">
|
|
<h4>{MOD.LBL_PRICE_DETAIL_NAME}</h4></th>
|
|
<tr>
|
|
<td width="15%" class="tabDetailViewDL"><span sugar='slot1'>{MOD.LBL_NAME}</span sugar='slot'></td>
|
|
<td width="35%" class="tabDetailViewDF"><span sugar='slot1b'>{NAME} </span sugar='slot'></td>
|
|
<td width="15%" valign="top" class="tabDetailViewDL"><span sugar='slot2'>{APP.LBL_ASSIGNED_TO}</span sugar='slot'></td>
|
|
<td width="35%" valign="top" class="tabDetailViewDF"><span sugar='slot2b'>{ASSIGNED_TO}</span sugar='slot'></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top" class="tabDetailViewDL"><span sugar='slot3'>{MOD.LBL_ACTIVE}</span sugar='slot'></td>
|
|
<td valign="top" class="tabDetailViewDF"><span sugar='slot3b'>{ACTIVE}</span sugar='slot'></td>
|
|
|
|
<td valign="top" class="tabDetailViewDL"><span sugar='slot5'>{MOD.LBL_EXCHANGE_RATE_NAME}</span sugar='slot'></td>
|
|
<td valign="top" class="tabDetailViewDF"><span sugar='slot5b'>{CURRENCY}</span sugar='slot'></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top" class="tabDetailViewDL"><span sugar='slot7'>{MOD.LBL_ACCOUNT_NAME}</span sugar='slot'></td>
|
|
<td valign="top" class="tabDetailViewDF"><span sugar='slot7b'>{ACCOUNT_NAME}</span sugar='slot'></td>
|
|
<td valign="top" class="tabDetailViewDL"><span sugar='slot9'>{MOD.LBL_LEAD_NAME}</span sugar='slot'></td>
|
|
<td valign="top" class="tabDetailViewDF"><span sugar='slot9b'>{LEAD_NAME}</span sugar='slot'></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" class="tabDetailViewDL"><span sugar='slot4'>{MOD.LBL_DESCRIPTION}</span sugar='slot'></td>
|
|
<td valign="top" class="tabDetailViewDF"><span sugar='slot4b'>{DESCRIPTION} </span sugar='slot'></td>
|
|
<td valign="top" class="tabDetailViewDL">{MOD.LBL_CURRENCY_VALUE}</td>
|
|
<td valign="top" class="tabDetailViewDF">{CURRENCY_VALUE}</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" class="tabDetailViewDL"> </td>
|
|
<td valign="top" class="tabDetailViewDF"> </td>
|
|
<td valign="top" class="tabDetailViewDL"> </td>
|
|
<td valign="top" class="tabDetailViewDF"> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="items_block" style="display:none;">
|
|
<table width="100%" border="0" cellspacing="{GRIDLINE}" cellpadding="0">
|
|
<th class="dataLabel" align="left" colspan="8">
|
|
<h4>{MOD.LBL_PRICE_PRODUCT_NAME}</h4>
|
|
</th>
|
|
<tr>
|
|
<td colspan="4" valign="top" class="tabDetailViewDL">
|
|
<div id="price-block" style="display:none;position:absolute;">
|
|
<table cellpadding="0" cellspacing="0" border="0" class="ListView">
|
|
<tr>
|
|
<td width="90%" bgcolor="#FFFFFF" class="listViewThS1">{MOD.LBL_EDIT_PRICE} </td><td width="10%" align="right" bgcolor="#FFFFFF" class="listViewThS1"> </td><td width="10%" align="right" bgcolor="#FFFFFF" class="listViewThS1"> </td><td width="1%" align="right" bgcolor="#FFFFFF" class="listViewThS1"><a href="javascript:hidediv('price-block');" title="Click to Close" class="olCloseFontClass"><img src="themes/Sugar/images/close_inline.gif" border="0"></a></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1">{MOD.LBL_UNIT_PRICE}:</td>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1">{MOD.LBL_MARGIN}:</td>
|
|
<td colspan="2" valign="top" bgcolor="#FFFFFF" class="oddListRowS1">{MOD.LBL_LIST_PRICE_PRICEBOOK}:</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1">
|
|
<input size="8" id="purchase_price" name="purchase_price" readonly type="text" onchange="getPricePricebook();" onclick="getPricePricebook();" onblur="getPricePricebook();" />
|
|
</td>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1">
|
|
<input size="4" id="margin" name="margin" type="text" onchange="getPricePricebook();" onclick="getPricePricebook();" onblur="getPricePricebook();" />
|
|
</td>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1" colspan="2">
|
|
<input size="8" id="price" name="price" type="text" onchange="getPricePricebook();" onclick="getPricePricebook();" onblur="getPricePricebook();" />
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1">{MOD.LBL_RECIPIENT_CODE}:</td>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1"> </td>
|
|
<td colspan="2" valign="top" bgcolor="#FFFFFF" class="oddListRowS1"> </td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1">
|
|
<input size="8" id="recipient_code" name="recipient_code" type="text" />
|
|
</td>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1"></td>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1" colspan="2"></td>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1">{MOD.LBL_REMARKS_PL}:</td>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1">{MOD.LBL_REMARKS_EN}:</td>
|
|
<td colspan="2" valign="top" bgcolor="#FFFFFF" class="oddListRowS1">{MOD.LBL_REMARKS_DE}:</td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1">
|
|
<input size="8" id="remarks_pl" name="remarks_pl" type="text" />
|
|
</td>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1">
|
|
<input size="8" id="remarks_en" name="remarks_en" type="text" />
|
|
</td>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1" colspan="2">
|
|
<input size="8" id="remarks_de" name="remarks_de" type="text" />
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top" bgcolor="#FFFFFF" class="oddListRowS1" colspan="4">
|
|
<input id="product_id" name="product_id" type="hidden" />
|
|
<input id="order_by" name="order_by" type="hidden" />
|
|
<input id="sorder" name="sorder" type="hidden" />
|
|
<input class="button" type="submit" name="saveprice" value="Save" onclick="mintajaxget('index.php?to_pdf=1&module=EcmPriceBooks&action=SavePrice&pricebook_id={ID}&record='+document.getElementById('product_id').value+'&recipient_code='+document.getElementById('recipient_code').value+'&remarks_pl='+document.getElementById('remarks_pl').value+'&remarks_en='+document.getElementById('remarks_en').value+'&remarks_de='+document.getElementById('remarks_de').value+'&order_by='+document.getElementById('order_by').value+'&sorder='+document.getElementById('sorder').value+'&price='+document.getElementById('price').value,'products');document.getElementById('price-block').style.display='none';"/>
|
|
</td>
|
|
</tr>
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
</table></div></td>
|
|
</tr>
|
|
<tr>
|
|
<td valign="top" class="tabDetailViewDL"><input type="button" class="button" name="productslist" value="{MOD.LBL_ADD_PRODUCTS_TO_PRICEBOOK}" onclick="location.href='index.php?module=EcmProducts&action=ListViewAddToPriceBook&pricebook_id={ID}';" /></td>
|
|
<td valign="top" class="tabDetailViewDF"> </td>
|
|
<td colspan="2" align="right" valign="top" class="tabDetailViewDL">{CUSTOMVIEW_SELECT}</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="4" valign="top" class="tabDetailViewDL"><div id='products'></div></td>
|
|
</tr>
|
|
</table>
|
|
</div><div id="images_block" style="display:none;">
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
<tr><td class="dataLabel" align="left" width="15%">
|
|
<h4>{MOD.LBL_PREVIEWPDF}</h4>
|
|
</td><td width="85%"></td></tr></table></div>
|
|
<div id="previewpdf_block" style="display:none;"></div>
|
|
<div id="previewxls_block" style="display:none;"></div>
|
|
|
|
{LOAD_TAB}
|
|
<!-- END: main -->
|
|
<!-- BEGIN: subpanel -->
|
|
<span sugar='slot23'>{SUBPANEL}</span sugar='slot'>
|
|
<!-- END: subpanel -->
|