Commit 142cae10 authored by psawant's avatar psawant

-Sales Forecast UI related Changes

-Sales Forecast Wizard Implementation related changes.

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@198820 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 5046c5cc
......@@ -428,6 +428,7 @@ public class SalesForecastWizEJB extends ValidatorEJB
valueXmlString.append( "<prd_code__for><![CDATA[" ).append( rs.getString(7) ).append( "]]></prd_code__for>\r\n" );
valueXmlString.append( "<unit><![CDATA[" ).append( rs.getString(8) ).append( "]]></unit>\r\n" );
valueXmlString.append( "<quantity><![CDATA[" ).append( rs.getString(6) ).append( "]]></quantity>\r\n" );
valueXmlString.append( "<old_quantity><![CDATA[" ).append( rs.getString(6) ).append( "]]></old_quantity>\r\n" );
valueXmlString.append( "<quantity_org><![CDATA[" ).append( rs.getString(9) ).append( "]]></quantity_org>\r\n" );
valueXmlString.append( "</Detail2>\r\n");
count++;
......
......@@ -17,6 +17,7 @@
style="font-family: 'MuseoLight-300', sans-serif; border-color: lightgrey;color : #COCOCO; background-color: #f7f8fa; text-align : left; font-size: 14px;">
<LINK HREF="/ibase/webitm/css/theme/galaxy-theme.css" TYPE="text/css" REL="stylesheet"></LINK>
<LINK HREF="/ibase/webitm/css/Standard/default.css" TYPE="text/css" REL="stylesheet"></LINK>
<style type="text/css">
......@@ -152,7 +153,7 @@
</style>
<link type="text/css" rel="stylesheet" href="/ibase/webitm/xsl/Standard/WIZARD/css/htmlWizard.css" />
<form name="Wizard_activity" METHOD="POST" ACTION="/ibase/ITMWizardHandlerServlet" style="background-color: #f7f8fa;" onSubmit="javascript:disableButtons(1);">
<form name="Wizard_activity" METHOD="POST" ACTION="/ibase/ITMWizardHandlerServlet" style="background-color: #f7f8fa;" onSubmit="disableButtons()">
<TABLE border="0" width="99%" height="2%" class="header_td"
cellpadding="0" cellspacing="0" style="background-color: #f7f8fa;">
......@@ -361,6 +362,8 @@
<xsl:for-each select="//Detail2">
<xsl:sort select="site_code"/>
<xsl:sort select="tran_id" />
<xsl:sort select="item_code" />
<xsl:sort select="prd_code__for" />
<xsl:variable name="dbID">
......@@ -384,6 +387,9 @@
<xsl:variable name="item_descr">
<xsl:value-of select="item_descr" />
</xsl:variable>
<xsl:variable name="old_quantity">
<xsl:value-of select="old_quantity" />
</xsl:variable>
<xsl:if test="$parent_item_descr = $item_descr ">
......@@ -391,10 +397,13 @@
<td class="td_leftAlign" style="width: 70px;">
<input type="checkbox"
name="Detail2.{normalize-space($dbID)}.selectbox" id="Detail2.{normalize-space($dbID)}.selectbox"
checked='Y' value="true" style="display:none;" />
value="true" style="display:none;" />
<input type="number" value="{$quantity}" class="input_editable"
name="Detail2.{normalize-space($dbID)}.quantity" id="Detail2.{normalize-space($dbID)}.quantity"
ISCHANGED="false" style="text-align: right;" onfocus="setOldQuantity(this )" onchange="quantitySet ( this )" />
name="Detail2.{normalize-space($dbID)}.quantity" id="Detail2.{normalize-space($dbID)}.quantity"
ISCHANGED="false" style="text-align: right;" onchange="setQuantity ( this,'{normalize-space($dbID)}' ,{old_quantity} )" />
<input type="hidden" value="{$old_quantity}" class="input_editable"
name="Detail2.{normalize-space($dbID)}.old_quantity" id="Detail2.{normalize-space($dbID)}.old_quantity"
ISCHANGED="false" style="text-align: right;"/>
<input type="hidden" value="{$item_code}" class="input_editable"
name="Detail2.{normalize-space($dbID)}.item_code" id="Detail2.{normalize-space($dbID)}.item_code"
ISCHANGED="false" style="text-align: right;" />
......@@ -410,8 +419,6 @@
<input type="hidden" value="{$item_descr}" class="input_editable"
name="Detail2.{normalize-space($dbID)}.item_descr" id="Detail2.{normalize-space($dbID)}.item_descr"
ISCHANGED="false" style="text-align: right;" />
</td>
</xsl:if>
......@@ -430,9 +437,9 @@
<input type="hidden" value="salesforecast_wiz" name="OBJ_NAME" />
<input type="hidden" value="" name="action" id="action" />
<input type="Cancel" style="cursor:hand; width: 22%;"
<input type="button" style="cursor:hand;"
CLASS="button" value="Cancel" name="ActCancel" id="ActCancel"
title=''
title=''
onclick="window.location.href='/ibase/webitm/jsp/E12WizardPage.jsp?OBJ_NAME=salesforecast_wiz&amp;FORM_NO=1'" />
<input type="submit" style="cursor:hand" CLASS="button"
......
......@@ -32,30 +32,23 @@ function checkActionVal( value )
return true;
}
function setOldQuantity ( element )
{
oldQuantity = element.value ;
console.log(" Quantity "+oldQuantity);
}
function quantitySet ( element )
function setQuantity ( element,dbId,oldQuantity )
{
var quantityVal = element.value ;
console.log(" quantityVal 111 "+quantityVal);
console.log(" Quantity 111 "+oldQuantity);
document.getElementById("Detail2."+dbId+".selectbox").checked = false;
if( quantityVal == "" || quantityVal < 0 || quantityVal.length > 14)
{
alert("Quantity cannot be Empty or less than zero or length should be less than 14");
element.value = oldQuantity ;
console.log(" quantityVal 123 "+quantityVal);
element.focus();
}
return quantityVal;
if(oldQuantity != quantityVal)
{
document.getElementById("Detail2."+dbId+".selectbox").checked = true;
}
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
......@@ -95,4 +88,14 @@ function doHideMsg(str)
document.getElementById(str).style.display = 'none';
}
function disableButtons()
{
if(document.getElementById("ActCancel") != null && document.getElementById("ActCancel") != 'undefined')
{
document.getElementById("ActCancel").disabled = true;
}
if(document.getElementById("ActFinish") != null && document.getElementById("ActFinish") != 'undefined')
{
document.getElementById("ActFinish").disabled = true;
}
}
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