Commit 8967a4db authored by asant's avatar asant

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@194295 ce508802-f39f-4f6c-b175-0d175dae99d5
parent dfbd711c
......@@ -85,7 +85,6 @@
PROPOSAL
</td>
</tr>
</tbody>
</table>
......@@ -102,14 +101,19 @@
<td style="text-align: left;border: 0px;width:20%;padding-left: 3px; border-bottom: 1px solid #d9d9d9; ">
Proposal Id :
<xsl:value-of select="quot_no" />
<INPUT type="hidden" ID="quot_no"
NAME="quot_no" ISCHANGED="false"
value="{quot_no}" isReq="false" size="8"
class="tInputStyleRight" />
</td>
</tr>
<tr>
<td style="text-align: left;border: 0px;width:20%;padding-left: 3px;">
Proposal Date :
<xsl:value-of select="chg_date" />
</td>
</tr>
<tr>
</tr>
</tbody>
</table>
<br></br>
......@@ -118,19 +122,34 @@
<xsl:variable name="dbID">
<xsl:value-of select="@domID" />
</xsl:variable>
<div>Customer Details</div>
<div>Customer Details - <xsl:value-of select="cust_name" /> - (<xsl:value-of select="cust_code" />)</div>
<INPUT type="hidden" ID="cust_code"
NAME="cust_code" ISCHANGED="false"
value="{cust_code}" isReq="false" size="8"
class="tInputStyleRight" />
<INPUT type="hidden" ID="from_date"
NAME="from_date" ISCHANGED="false"
value="{from_date}" isReq="false" size="8"
class="tInputStyleRight" />
<INPUT type="hidden" ID="to_date"
NAME="to_date" ISCHANGED="false"
value="{to_date}" isReq="false" size="8"
class="tInputStyleRight" />
<table class="tableClass tbletopbrd" cellSpacing="0"
cellPadding="0" width="100%" border="0"
style="border-top: 0px solid #5fdeb2">
<tbody>
<tr>
<td style="text-align: left;border: 0px;width:20%;padding-left: 3px;">
<xsl:value-of select="cust_name" /> - (<xsl:value-of select="cust_code" />)
</td>
</tr>
</tbody>
</table>
<br></br>
</xsl:for-each>
<div>Proposal Details</div>
......@@ -142,30 +161,22 @@
<xsl:for-each select="//Detail1">
<tr border="1">
<td class="editDisplayheaderClass" style="font-weight:bold;">Sr No</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Product Code</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Product Name</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Qty/Month</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Current Basic Customer Price in Rs/kg</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Discount Type</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Discount</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Proposed Basic Distributor Price</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Commission %</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Commision in Rs/KG</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Basic Distributor Price in Rs/Kg</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Actual Cost</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Available Stock in KG</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Profit in Rs/KG</td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Value of Goods on Profit in Rs % </td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Total value of goods on final price in Rs % </td>
<td class="editDisplayheaderClass" style="font-weight:bold;">Profit % </td>
<td class="editDisplayheaderClass" style="display:none;"></td>
</tr>
</xsl:for-each>
<xsl:for-each select="//Detail3">
<xsl:variable name="domID">
<xsl:value-of select="@domID" />
</xsl:variable>
<xsl:variable name="item_code">
<xsl:value-of select="item_code" />
</xsl:variable>
<xsl:variable name="item_descr">
<xsl:value-of select="item_descr" />
</xsl:variable>
......@@ -187,6 +198,9 @@
<xsl:variable name="profit_on_goods">
<xsl:value-of select="profit_on_goods" />
</xsl:variable>
<xsl:variable name="item_code">
<xsl:value-of select="item_code" />
</xsl:variable>
<xsl:variable name="final_price">
<xsl:value-of select="final_price" />
</xsl:variable>
......@@ -200,62 +214,38 @@
<xsl:variable name="quot_no">
<xsl:value-of select="quot_no" />
</xsl:variable>
<xsl:variable name="selected">
<!-- <xsl:variable name="selected">
<xsl:value-of select="selected" />
</xsl:variable>
</xsl:variable> -->
<xsl:variable name="sr_no">
<xsl:value-of select="sr_no" />
</xsl:variable>
<xsl:variable name="line_no">
<xsl:value-of select="line_no" />
</xsl:variable>
<xsl:variable name="comm_per_unit">
<xsl:value-of select="comm_per_unit" />
</xsl:variable>
<xsl:variable name="basic_dist_price">
<xsl:value-of select="profit_on_goods" />
<xsl:value-of select="basic_dist_price" />
</xsl:variable>
<xsl:variable name="cost_rate">
<xsl:value-of select="cost_rate" />
</xsl:variable>
<xsl:variable name="discount_type">
<xsl:value-of select="discount_type" />
</xsl:variable>
<xsl:variable name="comm_per_unit">
<xsl:value-of select="comm_per_unit" />
</xsl:variable>
<xsl:variable name="available_stock">
<xsl:value-of select="available_stock" />
</xsl:variable>
<xsl:variable name="profit">
<xsl:value-of select="profit" />
</xsl:variable>
<tr>
<td class="editDisplayColumnClass">
<INPUT type="hidden" ID="Detail3.{normalize-space($domID)}.sr_no"
<!--<INPUT type="text" ID="Detail3.{normalize-space($domID)}.sr_no"
NAME="Detail3.{normalize-space($domID)}.sr_no" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{sr_no}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
class="tInputStyleRight" />-->
<xsl:value-of select="sr_no" />
</td>
<td class="editDisplayColumnClass">
<INPUT type="hidden" ID="Detail3.{normalize-space($domID)}.item_code"
NAME="Detail3.{normalize-space($domID)}.item_code" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{item_code}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
<xsl:value-of select="item_code" />
</td>
<td class="editDisplayColumnClass">
<INPUT type="hidden" ID="Detail3.{normalize-space($domID)}.item_descr"
<!--<INPUT type="text" ID="Detail3.{normalize-space($domID)}.item_descr"
NAME="Detail3.{normalize-space($domID)}.item_descr" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{item_descr}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
class="tInputStyleRight" />-->
<xsl:value-of select="item_descr" />
</td>
<td class="editDisplayColumnClass">
......@@ -264,25 +254,17 @@
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$qty_per_month}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass">
<INPUT type="hidden" ID="Detail3.{normalize-space($domID)}.rate"
<!--<INPUT type="text" ID="Detail3.{normalize-space($domID)}.rate"
NAME="Detail3.{normalize-space($domID)}.rate" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{rate}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
class="tInputStyleRight" />-->
<xsl:value-of select="rate" />
</td>
<td class="editDisplayColumnClass">
<INPUT type="text" ID="Detail3.{normalize-space($domID)}.discount_type"
NAME="Detail3.{normalize-space($domID)}.discount_type" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$discount_type}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass" style="text-align:right;">
<INPUT type="text" ID="Detail3.{normalize-space($domID)}.discount"
NAME="Detail3.{normalize-space($domID)}.discount"
......@@ -296,7 +278,6 @@
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$rate__new}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass" style="text-align:right;">
<INPUT type="text" ID="Detail3.{normalize-space($domID)}.comm_perc"
......@@ -305,14 +286,6 @@
maxChar(this,120)" value="{$comm_perc}" isReq="false" size="8"
SRVCALLONCHANGE="true" class="tInputStyleRight"/>
</td>
<td class="editDisplayColumnClass">
<INPUT type="text" disabled="true" ID="Detail3.{normalize-space($domID)}.comm_per_unit"
NAME="Detail3.{normalize-space($domID)}.comm_per_unit" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$comm_per_unit}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass">
<INPUT type="text" disabled="true" ID="Detail3.{normalize-space($domID)}.basic_dist_price"
NAME="Detail3.{normalize-space($domID)}.basic_dist_price" ISCHANGED="false"
......@@ -329,70 +302,20 @@
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass">
<INPUT type="text" disabled="true" ID="Detail3.{normalize-space($domID)}.available_stock"
NAME="Detail3.{normalize-space($domID)}.available_stock" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$available_stock}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass" style = "display:none;">
<INPUT type="text" disabled="true" ID="Detail3.{normalize-space($domID)}.profit"
NAME="Detail3.{normalize-space($domID)}.profit" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$quot_no}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass">
<INPUT type="text" disabled="true" ID="Detail3.{normalize-space($domID)}.profit_on_goods"
NAME="Detail3.{normalize-space($domID)}.profit_on_goods" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$profit_on_goods}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass">
<INPUT type="text" disabled="true" ID="Detail3.{normalize-space($domID)}.final_price"
NAME="Detail3.{normalize-space($domID)}.final_price" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$final_price}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass">
<INPUT type="text" disabled="true" ID="Detail3.{normalize-space($domID)}.perc_profit"
NAME="Detail3.{normalize-space($domID)}.perc_profit" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$perc_profit}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass" style = "display:none;">
<INPUT type="hidden" ID="Detail3.{normalize-space($domID)}.quot_no"
NAME="Detail3.{normalize-space($domID)}.quot_no" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$quot_no}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass" style = "display:none;">
<INPUT type="hidden" ID="Detail3.{normalize-space($domID)}.selected"
NAME="Detail3.{normalize-space($domID)}.selected" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$selected}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight" />
</td>
<td class="editDisplayColumnClass" style = "display:none;">
<INPUT type="hidden" ID="Detail3.{normalize-space($domID)}.line_no"
NAME="Detail3.{normalize-space($domID)}.line_no" ISCHANGED="false"
onfocus="gotFocus(this)" onblur="gotBlur(this);maxChar(this,120)"
value="{$line_no}" isReq="false" size="8" SRVCALLONCHANGE="true"
class="tInputStyleRight"/>
<td class="editDisplayColumnClass" style="display:none;">
<div id="__item_info__">
<INPUT type="hidden" value="{$item_code}" id="__item_code__"/>
<INPUT type="hidden" value="{$profit_on_goods}" id="__profit_on_goods__"/>
<INPUT type="hidden" value="{$final_price}" id="__final_price__"/>
</div>
</td>
</tr>
</xsl:for-each>
......@@ -401,21 +324,81 @@
</div>
<br></br>
</xsl:if>
<!-- <a href = "/ibase/jsp/TotalSummary.jsp?quot_no=$quot_no">Summary</a> -->
<a href="#" class="leftlinks" onclick="openTotalSummary()" id="2" value="2">CLICK HERE</a>
</form>
<form method="POST" action="/ibase/jsp/TotalSummary.jsp" id="__total_summary__" style="display:none;">
<input type='text' name='custCode'/>
<input type='text' name='fromDate'/>
<input type='text' name='toDate'/>
<input type='text' name='POG_data'/>
<input type='text' name='FP_data'/>
<input type='submit'/>
</form>
</body>
<!-- <script src="/ibase/E12BROWSER/js/jquery-1.11.1.min.js"></script>
<script src="/ibase/E12BROWSER/js/expandy.min.js"></script> -->
<!-- <script>
$('[id^="container"').makeExpander({
toggleElement : 'h2',
jqAnim : true,
showFirst : false,
accordion : true,
speed : 400
/*indicator: 'triangle'*/
});
</script> -->
<script>
<![CDATA[
function openTotalSummary() {
var form = document.querySelector('form[id=__total_summary__]');
var custCode = document.getElementById("cust_code").value;
var fromDate = document.getElementById("from_date").value;
var toDate = document.getElementById("to_date").value;
setValue(form, 'input[name=custCode]', custCode);
setValue(form, 'input[name=fromDate]', fromDate);
setValue(form, 'input[name=toDate]', toDate);
var POGs_FPs_Map = getPOGs_FPs_Map();
POGs_map = POGs_FPs_Map[0] || {};
FPs_map = POGs_FPs_Map[1] || {};
setValue(form, 'input[name=POG_data]', JSON.stringify(POGs_map));
setValue(form, 'input[name=FP_data]', JSON.stringify(FPs_map));
form.submit();
}
function setValue(parent, selector, value) {
var element = parent.querySelector(selector);
if (element) {
element.value = value;
}
}
function getPOGs_FPs_Map() {
var itemInfoDivs = document.querySelectorAll('div[id=__item_info__]');
var POGs_map = {};
var FPs_map = {};
for (var i = 0, len = itemInfoDivs.length; i < len; i++) {
var itemInfoDiv = itemInfoDivs[i];
itemCode = getValue(itemInfoDiv, 'input[id=__item_code__]');
pog = getValue(itemInfoDiv, 'input[id=__profit_on_goods__]');
fp = getValue(itemInfoDiv, 'input[id=__final_price__]');
POGs_map[itemCode] = window.parseFloat((pog || "0").replace(/,/g, ''));
FPs_map[itemCode] = window.parseFloat((fp || "0").replace(/,/g, ''));
}
return [POGs_map, FPs_map];
}
function getValue(parent, selector) {
var element = parent.querySelector(selector);
if (element) {
return element.value;
}
}
]]>
</script>
</html>
</xsl:template>
</xsl:stylesheet>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment