Commit 10dbcad9 authored by spawar's avatar spawar

D15HKAT002 added changed for show order date instead of delivery date


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@99195 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1e277630
...@@ -21,11 +21,10 @@ ...@@ -21,11 +21,10 @@
$( "#accordion" ).accordion({ collapsible:true, active:false }); $( "#accordion" ).accordion({ collapsible:true, active:false });
$("#accordion").accordion('option', 'active' , 0); $("#accordion").accordion('option', 'active' , 0);
$( "#dlv_date1").datepicker({ minDate: 0, changeMonth: true, changeYear: true, dateFormat : "d/m/y"});
pageLoad(); pageLoad();
}); });
]]> ]]>
<!-- Removed by Samadhan 19/11/2015 for delevary date calculation$( "#dlv_date1").datepicker({ minDate: 0, changeMonth: true, changeYear: true, dateFormat : "d/m/y"});-->
<!-- in above function pageLoad() function added by samadhan on 14/07/2015 --> <!-- in above function pageLoad() function added by samadhan on 14/07/2015 -->
</script> </script>
...@@ -138,7 +137,12 @@ ...@@ -138,7 +137,12 @@
</div> </div>
<xsl:for-each select="//Detail2"> <xsl:for-each select="//Detail2">
<xsl:variable name="dlv_date"><xsl:value-of select="dlv_date"/></xsl:variable> <xsl:variable name="dlv_date"><xsl:value-of select="dlv_date"/></xsl:variable>
<!--Change by samadhan on 19/11/2015 -->
<xsl:variable name="ord_date_m"><xsl:value-of select="ord_date"/></xsl:variable>
<div style="float: left; width:100%; border: 0px solid; padding: 0px;"> <div style="float: left; width:100%; border: 0px solid; padding: 0px;">
<!--Change by samadhan on 19/11/2015 -->
<input type="hidden" value="{$ord_date_m}" name="ord_date_m" id="ord_date_m" />
<div id="accordion" style="float: left; margin-left: 5px; width:95%;"> <div id="accordion" style="float: left; margin-left: 5px; width:95%;">
<h3 onclick='run(1)' style="font-family: Arial Unicode MS, Arial, sans-serif;">Product Set <h3 onclick='run(1)' style="font-family: Arial Unicode MS, Arial, sans-serif;">Product Set
<label id='main1' style='background-color: transparent;'></label> <label id='main1' style='background-color: transparent;'></label>
...@@ -167,9 +171,12 @@ ...@@ -167,9 +171,12 @@
<td colspan="2"> <td colspan="2">
<input type="text" id="itmdescription1" value="{item_code}" class="editDisplayClass" maxlength="0" ISCHANGED="false" readOnly = "1" style="margin-left: -9px;width: 400px" /> <input type="text" id="itmdescription1" value="{item_code}" class="editDisplayClass" maxlength="0" ISCHANGED="false" readOnly = "1" style="margin-left: -9px;width: 400px" />
</td> </td>
<td colspan="2" style="font-size:15px"> <td colspan="2" style="font-size:12px">
<!--Changed by Samadhan on 19/11/2015
<strong>Delivery Date:</strong><input type="text" name="dlv_date1" onchange="dateChange(1)" <strong>Delivery Date:</strong><input type="text" name="dlv_date1" onchange="dateChange(1)"
id="dlv_date1" value="{dlv_date}" style="width:28%;font-size:12px" /> id="dlv_date1" value="{$dlv_date}" style="width:28%;font-size:12px" /> -->
<strong>Order Date: <span id="dlv_date_span1"> <xsl:value-of select="ord_date"/> </span></strong>
<input type="hidden" name="dlv_date1" readOnly = "1" id="dlv_date1" value="{$ord_date_m}" style="width:28%;font-size:12px" />
</td> </td>
</tr> </tr>
</table> </table>
......
...@@ -20,10 +20,39 @@ ...@@ -20,10 +20,39 @@
<![CDATA[ <![CDATA[
$(function() $(function()
{ {
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth()+1;
var yyyy = today.getYear() % 100;
if(dd<10){dd='0'+dd}
if(mm<10){mm='0'+mm}
var today = dd+'/'+mm+'/'+yyyy;
var sum = $('#Details tbody tr').length; var sum = $('#Details tbody tr').length;
for(var i=0;i<=sum;i++) for(var i=0;i<=sum;i++)
{ {
$( "#dlv_date"+i+"" ).datepicker({ minDate: 0, changeMonth: true, changeYear: true, dateFormat : "dd/mm/y"}); var days = 0;
if(i > 0)
{
var odt = $("#ord_datem"+i+"").value;
odt= document.getElementById("ord_datem"+i+"").value;
var orddt = odt.split("/");
var toddt = today.split("/");
var orderdt = new Date("20"+orddt[2],orddt[1]-1,orddt[0]);
var todaydt = new Date("20"+toddt[2],toddt[1]-1,toddt[0]);
var timeDiff = Math.abs(todaydt.getTime() - orderdt.getTime());
var days = Math.ceil(timeDiff / (1000 * 3600 * 24));
if( orderdt < todaydt)
{
days = "-"+days;
}
}
$( "#dlv_date"+i+"" ).datepicker({ minDate: days, changeMonth: true, changeYear: true, dateFormat : "dd/mm/y"});
} }
}); });
document.getElementById("save").style.display = ""; // to undisplay document.getElementById("save").style.display = ""; // to undisplay
...@@ -222,6 +251,7 @@ ...@@ -222,6 +251,7 @@
<xsl:variable name="curr_code"><xsl:value-of select="curr_code"/></xsl:variable> <xsl:variable name="curr_code"><xsl:value-of select="curr_code"/></xsl:variable>
<!--Changed by wasim on 07-07-2015 to add currency in form3 [END]--> <!--Changed by wasim on 07-07-2015 to add currency in form3 [END]-->
<!-- Changed by samadhan on 13/07/2015 for previous button working --> <!-- Changed by samadhan on 13/07/2015 for previous button working -->
<xsl:if test="$dbID != '0'"> <xsl:if test="$dbID != '0'">
...@@ -276,6 +306,8 @@ ...@@ -276,6 +306,8 @@
<td style="width:75px"> <td style="width:75px">
<xsl:value-of select="ord_date"/> <xsl:value-of select="ord_date"/>
<input type="hidden" value="{$ord_date}" id="ord_datem{normalize-space($dbID)}" />
</td> </td>
<td> <td>
<input type="hidden" class="editDisplayClass" value="{dlv_date}" name="Detail3.{normalize-space($dbID)}.dlv_date" <input type="hidden" class="editDisplayClass" value="{dlv_date}" name="Detail3.{normalize-space($dbID)}.dlv_date"
......
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