<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:decimal-format NaN="0"/>
<xsl:template match="/">

<html>
	
<script type="text/javascript" src="/ibase/webitm/js/jquery-1.10.2.js"></script>
<script type="text/javascript" src="/ibase/webitm/js/prodWiz_Common.js"></script>
<script type="text/javascript" src="/ibase/webitm/js/prodWiz_Popup.js"></script>
<script type="text/javascript" src="/ibase/webitm/js/porderWiz_Popup.js"></script>
<link rel="stylesheet" href="/ibase/webitm/css/DD/default.css" type="text/css" />
<link id="userThemeLink" type="text/css" rel="stylesheet" href=""/>
<link href="/ibase/webitm/css/DD/ProductWizard.css" rel="stylesheet"/>

<link href="/ibase/webitm/css/DD/jquery-ui-1.10.4.custom.min.css" rel="stylesheet"/>
<script type="text/javascript" src="/ibase/webitm/js/jquery-ui-1.10.4.custom.min.js"></script>

<script>
<![CDATA[
	$(function() 
	{	
		for(var i=0;i<=100;i++)
		{
			$( "#dlv_date"+i+"" ).datepicker({ minDate: 0, changeMonth: true, changeYear: true, dateFormat : "dd/mm/y"});
		}   
	});
]]>
</script>

<body>
	<form name="porderWizFormIII" id="porderFormIII" METHOD="post" ACTION="/ibase/ITMWizardHandlerServlet">
		<div class="mainPage-Container" style="overflow: auto;">
				<div id="header">
					<div id="headingText">Purchase Wizard Details</div>
	  			</div>
					<table class="tableClass" id="Details" border="0" cellspacing="1" cellpadding="1" style="width:90%">
							<thead class="table-head" style="text-align:center;">
								<tr>
									<th class="thClass" nowrap="true" width="5%">
										
									</th>
									<th class="thClass" nowrap="true" valign="bottom" width="8%">
										<strong>Code</strong>
									</th>
									<th class="thClass" nowrap="true" valign="bottom" width="8%">
										<strong>Quantity</strong>
									</th>
									<th class="thClass" nowrap="true" valign="bottom" width="8%">
										<strong>Rate</strong>
									</th>
									<th class="thClass" nowrap="true" valign="bottom" width="8%">
										<strong>Amount</strong>
									</th>
									<th class="thClass" nowrap="true" valign="bottom" width="20%">
										<strong>Description</strong>
									</th>
									<th class="thClass" nowrap="true" valign="bottom" width="8%">
										<strong>Supplier Code</strong>
									</th>
									<th class="thClass" nowrap="true" valign="bottom" width="8%">
										<strong>Order Date</strong>
									</th>
									<th class="thClass" nowrap="true" valign="bottom" width="8%">
										<strong>Delivery Date</strong>
									</th>
									<th class="thClass" nowrap="true" valign="bottom" width="3%">
										<strong>Department Code</strong>
									</th>
									<th class="thClass" nowrap="true" valign="bottom" width="3%">
										<strong>Item Series</strong>
									</th>
										
								</tr>
							</thead>	
							<tbody class='table-body fadeInDown'>
							<xsl:for-each select="//Detail3">
									<xsl:variable name="dbID"><xsl:value-of select="@domID"/></xsl:variable>
									<xsl:variable name="quantity"><xsl:value-of select="quantity"/></xsl:variable>
									<xsl:variable name="item_code"><xsl:value-of select="item_code"/></xsl:variable>
									<xsl:variable name="descr"><xsl:value-of select="descr"/></xsl:variable>
									<xsl:variable name="supp_code"><xsl:value-of select="supp_code"/></xsl:variable>
									<xsl:variable name="ord_date"><xsl:value-of select="ord_date"/></xsl:variable>
									<xsl:variable name="dept_code"><xsl:value-of select="dept_code"/></xsl:variable>
									<xsl:variable name="rate"><xsl:value-of select="rate"/></xsl:variable>
									<xsl:variable name="item_ser"><xsl:value-of select="item_ser"/></xsl:variable>
									<xsl:variable name="unit"><xsl:value-of select="unit"/></xsl:variable>
									<xsl:variable name="rate"><xsl:value-of select="rate"/></xsl:variable>
									<xsl:variable name="dlv_date"><xsl:value-of select="dlv_date"/></xsl:variable>
									<xsl:variable name="unit__std"><xsl:value-of select="unit__std"/></xsl:variable>
									<xsl:variable name="unit__rate"><xsl:value-of select="unit__rate"/></xsl:variable>
									<xsl:variable name="discount"><xsl:value-of select="discount"/></xsl:variable>
									<xsl:variable name="tax_amt"><xsl:value-of select="tax_amt"/></xsl:variable>
									<xsl:variable name="dlv_qty"><xsl:value-of select="dlv_qty"/></xsl:variable>
									<xsl:variable name="dlv_date"><xsl:value-of select="dlv_date"/></xsl:variable>
									<xsl:variable name="pack_code"><xsl:value-of select="pack_code"/></xsl:variable>
									<xsl:variable name="rate__clg"><xsl:value-of select="rate__clg"/></xsl:variable>
									<xsl:variable name="std_rate"><xsl:value-of select="std_rate"/></xsl:variable>
									<xsl:variable name="conv__qty_stduom"><xsl:value-of select="conv__qty_stduom"/></xsl:variable>
									<xsl:variable name="req_date"><xsl:value-of select="req_date"/></xsl:variable>
									<xsl:variable name="loc_code"><xsl:value-of select="loc_code"/></xsl:variable>
									<xsl:variable name="acct_code__dr"><xsl:value-of select="acct_code__dr"/></xsl:variable>
									<xsl:variable name="cctr_code__dr"><xsl:value-of select="cctr_code__dr"/></xsl:variable>
									<xsl:variable name="acct_code__cr"><xsl:value-of select="acct_code__cr"/></xsl:variable>
									<xsl:variable name="cctr_code__cr"><xsl:value-of select="cctr_code__cr"/></xsl:variable>
									<xsl:variable name="operation"><xsl:value-of select="operation"/></xsl:variable>
									<xsl:variable name="git_qty"><xsl:value-of select="git_qty"/></xsl:variable>
									<xsl:variable name="adj_qty"><xsl:value-of select="adj_qty"/></xsl:variable>
									<xsl:variable name="quantity__fc"><xsl:value-of select="quantity__fc"/></xsl:variable>
									<xsl:variable name="tot_amt"><xsl:value-of select="tot_amt"/></xsl:variable>
									
									<tr style="text-align:center;">
										<td>
											<input  type="checkbox" name="Detail3.{normalize-space($dbID)}.selectbox" id="Detail3.{normalize-space($dbID)}.selectbox" checked='true' value="true" onClick="setChecked(this)"/>
										</td>
										<td>
											<xsl:value-of select="item_code"/>
										</td>
										<td>
										<input type="text" class="editInputClass" value="{$quantity}" name="Detail3.{normalize-space($dbID)}.quantity" 
										onkeypress='return isNumberKey(event)' id="Detail3.{normalize-space($dbID)}.quantity" maxlength="8" style="width:70px;" onchange="changeAmount({$dbID})"/>
										</td>
										<td>
											<xsl:value-of select="rate"/>
										</td>
										<td>
											<input type="text" ISCHANGED="false" readOnly = "1"  value="{$tot_amt}" id="Detail3.{normalize-space($dbID)}.tot_amt" style="width: 75px;" />
										</td>
										<td>
											<xsl:value-of select="descr"/>
										</td>
										<td>
											<xsl:value-of select="supp_code"/>
										</td>
										<td>
											<xsl:value-of select="ord_date"/>
										</td>
										<td>
											<input type="hidden" class="editDisplayClass" value="{dlv_date}" name="Detail3.{normalize-space($dbID)}.dlv_date" 
											id="Detail3.{normalize-space($dbID)}.dlv_date" style="width: 100px;"/>
											<!-- <xsl:value-of select="dlv_date"/>-->
											<input type="text" id="dlv_date{normalize-space($dbID)}" value="{dlv_date}" 
											class="editDisplayClass" maxlength="0" ISCHANGED="false" readOnly = "1" style="width: 100px;" onchange="dlvChange({$dbID})" />
										</td>
										<td>
											<xsl:value-of select="dept_code"/>
										</td>
										<td>
											<xsl:value-of select="item_ser"/>
										</td>
										<input type="hidden" class="editInputClass" value="{$item_code}" name="Detail3.{normalize-space($dbID)}.item_code" 
												id="Detail3.{normalize-space($dbID)}.item_code" maxlength="10"/>
										
										<input type="hidden" class="editInputClass" value="{$rate}" name="Detail3.{normalize-space($dbID)}.rate" 
												id="Detail3.{normalize-space($dbID)}.rate" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$descr}" name="Detail3.1.descr" 
												id="Detail3.{normalize-space($dbID)}.descr" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$supp_code}" name="Detail3.1.supp_code" 
												id="Detail3.{normalize-space($dbID)}.supp_code" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$ord_date}" name="Detail3.{normalize-space($dbID)}.ord_date" 
												id="Detail3.{normalize-space($dbID)}.ord_date" maxlength="10"/>		
										<input type="hidden" class="editInputClass" value="{$unit}" name="Detail3.{normalize-space($dbID)}.unit" 
												id="Detail3.{normalize-space($dbID)}.unit" maxlength="10"/>
										
										
										<input type="hidden" class="editInputClass" value="{$unit__std}" name="Detail3.{normalize-space($dbID)}.unit__std" 
												id="Detail3.{normalize-space($dbID)}.unit__std" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$unit__rate}" name="Detail3.{normalize-space($dbID)}.unit__rate" 
												id="Detail3.{normalize-space($dbID)}.unit__rate" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$discount}" name="Detail3.{normalize-space($dbID)}.discount" 
												id="Detail3.{normalize-space($dbID)}.discount" maxlength="10"/>	
										<input type="hidden" class="editInputClass" value="{$tax_amt}" name="Detail3.{normalize-space($dbID)}.tax_amt" 
												id="Detail3.{normalize-space($dbID)}.tax_amt" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$tot_amt}" name="Detail3.{normalize-space($dbID)}.tot_amt" 
												id="Detail3.{normalize-space($dbID)}.tot_amt" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$dlv_qty}" name="Detail3.{normalize-space($dbID)}.dlv_qty" 
												id="Detail3.{normalize-space($dbID)}.dlv_qty" maxlength="10"/>
										
										<input type="hidden" class="editInputClass" value="{$pack_code}" name="Detail3.{normalize-space($dbID)}.pack_code" 
												id="Detail3.{normalize-space($dbID)}.pack_code" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$rate__clg}" name="Detail3.{normalize-space($dbID)}.rate__clg" 
												id="Detail3.{normalize-space($dbID)}.rate__clg" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$std_rate}" name="Detail3.{normalize-space($dbID)}.std_rate" 
												id="Detail3.{normalize-space($dbID)}.std_rate" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$conv__qty_stduom}" name="Detail3.{normalize-space($dbID)}.conv__qty_stduom" 
												id="Detail3.{normalize-space($dbID)}.conv__qty_stduom" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$req_date}" name="Detail3.{normalize-space($dbID)}.req_date" 
												id="Detail3.{normalize-space($dbID)}.req_date" maxlength="10"/>	
										<input type="hidden" class="editInputClass" value="{$loc_code}" name="Detail3.{normalize-space($dbID)}.loc_code" 
												id="Detail3.{normalize-space($dbID)}.loc_code" maxlength="10"/>	
										<input type="hidden" class="editInputClass" value="{$acct_code__dr}" name="Detail3.{normalize-space($dbID)}.acct_code__dr" 
												id="Detail3.{normalize-space($dbID)}.acct_code__dr" maxlength="10"/>	
										<input type="hidden" class="editInputClass" value="{$cctr_code__dr}" name="Detail3.{normalize-space($dbID)}.cctr_code__dr" 
												id="Detail3.{normalize-space($dbID)}.cctr_code__dr" maxlength="10"/>	
										<input type="hidden" class="editInputClass" value="{$acct_code__cr}" name="Detail3.{normalize-space($dbID)}.acct_code__cr" 
												id="Detail3.{normalize-space($dbID)}.acct_code__cr" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$cctr_code__cr}" name="Detail3.{normalize-space($dbID)}.cctr_code__cr" 
												id="Detail3.{normalize-space($dbID)}.cctr_code__cr" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$operation}" name="Detail3.{normalize-space($dbID)}.operation" 
												id="Detail3.{normalize-space($dbID)}.operation" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="git_qty" name="Detail3.{normalize-space($dbID)}.git_qty" 
												id="Detail3.{normalize-space($dbID)}.git_qty" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$adj_qty}" name="Detail3.{normalize-space($dbID)}.adj_qty" 
												id="Detail3.{normalize-space($dbID)}.adj_qty" maxlength="10"/>
										<input type="hidden" class="editInputClass" value="{$quantity__fc}" name="Detail3.{normalize-space($dbID)}.quantity__fc" 
												id="Detail3.{normalize-space($dbID)}.quantity__fc" maxlength="10"/>											
																
																																																																																				
									</tr>
								</xsl:for-each>
							</tbody>
					</table>	
				
					<table>
						<tr>
							<td colspan="2">
								<input type="hidden" value="3" name="FORM_NO" ID="FORM_NO" />
								<input type="hidden"  value="porderWiz" name="OBJ_NAME" />
								<input type="hidden"  value="" name="action" id="action" />
								<input type="hidden" value="2:MP" name="formType" id="formType" />
								<!-- <textarea name="PRE_FORM_VAL" ID="PRE_FORM_VAL" style="display:none;"></textarea> -->
								<input type="submit" style="cursor:hand" class="button" value="Previous" title='Previous' onclick="javascript:setActionVal('previous')"/>
								
								<input type="submit" style="cursor:hand" class="button" value="Finish" title='Finish' 
								onclick="javascript:setActionVal('finish');javascript:return checkRate()"/>
							</td>
				        </tr>
				    </table>
					
		</div>		 
	</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

