<?xml version='1.0' encoding='utf-8'?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:NonHtml="http://www.progress.com/StylusStudio/NonHtml"
	exclude-result-prefixes="NonHtml">
	<xsl:output method="html" />
	<xsl:template match="/">
		<html>
			<head>
			<script language="JavaScript" type="text/javascript">
					var objCur = "";
					var oldVal
					= "";
					var obj1 = "";
					function gotFocus(column)
					{
					objCur=column.name;
					oldVal=column.value;
					dotNotaion = undefined;
					if(objCur.id == undefined )
					{
					obj1 = column;
					}
					}
					function gotBlur(obj)
					{
					if((oldVal != obj.value) || (obj.ISCHANGED == "true"))
					{

					obj.ISCHANGED = "true";
					var isSRVCALLONCHANGE = obj.SRVCALLONCHANGE;
					if( isSRVCALLONCHANGE == "true" )
					{
					itemChange(obj);
					}
					}

					}
					function assignValue(value1)
					{
					if(obj1.name.indexOf("date")!=-1 || obj1.name.indexOf("DATE")!=-1 ||
					obj1.name.indexOf("valid_upto")!=-1)
					{

					if(dateFormat.substring(0,2) == 'dd')
					value1 =
					value1.substring(0,2)+"/"+value1.substring(3,5)+"/"+value1.substring(8,value1.length);
					else
					value1 =
					value1.substring(3,5)+"/"+value1.substring(0,2)+"/"+value1.substring(8,value1.length);
					obj1.value=value1;
					obj1.ISCHANGED = "true";

					}
					else
					{
					obj1.value=value1;
					gotBlur(obj1);
					}

					}
					function handleMandatory(obj)
					{
					if(obj.name.indexOf("spec_rating") != -1)
					{
					alert("Please Specifiy Ratings against parameters.");
					document.getElementById(obj.name+"__cmb").focus();
					return false;
					}
					else if(obj.name.indexOf("justification") != -1)
					{
					alert("Please Specifiy Justification for status change.");
					document.getElementById(obj.name).focus();
					return false;
					}
					obj.focus();
					return false;
					}
					function maxChar(obj,len)
					{
					if(obj.value.length > len)
					{
					obj.focus();
					alert("Enter up to "+len+" Characters only");
					return false;
					}
					}
					
				</script>			
				<link rel="stylesheet" href="/ibase/webitm/css/Standard/style.css" type="text/css" />				
			</head>
			<body bgcolor='#EEEEEE'>
				<span class="allDisplayDiv">
					<TABLE style="position:relative;left=30">
						<TR>
							<TD colspan="10">
								<H2>
									<CENTER>
										<i>Purchase Voucher Approval</i>
									</CENTER>
								</H2>
							</TD>
						</TR>
						
						<xsl:for-each select="//Detail1">
							<xsl:variable name="dbID">
								<xsl:value-of select="@dbID" />
							</xsl:variable>
							
							<xsl:variable name="tran_id">
								<xsl:value-of select="tran_id" />
							</xsl:variable>
							<xsl:variable name="tran_date">
								<xsl:value-of select="tran_date" />
							</xsl:variable>
							<xsl:variable name="vouch_type">
								<xsl:value-of select="vouch_type" />
							</xsl:variable>	

							<xsl:variable name="eff_date">
								<xsl:value-of select="eff_date" />
							</xsl:variable>	
							<xsl:variable name="site_code">
								<xsl:value-of select="site_code" />
							</xsl:variable>
							<xsl:variable name="fin_entity">
								<xsl:value-of select="fin_entity" />
							</xsl:variable>	
							<xsl:variable name="due_date">
								<xsl:value-of select="due_date" />
							</xsl:variable>	
							<xsl:variable name="bill_amt">
								<xsl:value-of select="bill_amt" />
							</xsl:variable>	
							<xsl:variable name="exch_rate">
								<xsl:value-of select="exch_rate" />
							</xsl:variable>	
							<xsl:variable name="bank_code">
								<xsl:value-of select="bank_code" />
							</xsl:variable>	
							<xsl:variable name="tax_amt">
								<xsl:value-of select="tax_amt" />
							</xsl:variable>	
							<xsl:variable name="tot_amt">
								<xsl:value-of select="tot_amt" />
							</xsl:variable>	
							<xsl:variable name="adv_amt">
								<xsl:value-of select="adv_amt" />
							</xsl:variable>	

							<xsl:variable name="net_amt">
								<xsl:value-of select="net_amt" />
							</xsl:variable>	

							<xsl:variable name="confirmed">
								<xsl:value-of select="confirmed" />
							</xsl:variable>	

						
							<TR >
								<TD align="right"> VOUCHER NO : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.tran_id" name="Detail1.{normalize-space($dbID)}.tran_id"
											value="{$tran_id}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							
								<TD align="right"> TRAN DATE : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.tran_date" name="Detail1.{normalize-space($dbID)}.tran_date"
											value="{$tran_date}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							</TR>

                                                        <TR>
								<TD align="right"> VOUCHER TYPE : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.vouch_type" name="Detail1.{normalize-space($dbID)}.vouch_type"
											value="{$vouch_type}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							
							<TD align="right"> EFFECTIVE DATE : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.eff_date" name="Detail1.{normalize-space($dbID)}.eff_date"
											value="{$eff_date}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							</TR>
								
							
					
							<TR>
								<TD align="right"> SITE CODE : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.site_code" name="Detail1.{normalize-space($dbID)}.site_code"
											value="{$site_code}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							
								<TD align="right"> FIN ENTITY : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.fin_entity" name="Detail1.{normalize-space($dbID)}.fin_entity"
											value="{$fin_entity}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							</TR>


							<TR>
								<TD align="right"> BILL AMOUNT : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.bill_amt" name="Detail1.{normalize-space($dbID)}.bill_amt"
											value="{$bill_amt}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							
								<TD align="right"> DUE DATE : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.due_date" name="Detail1.{normalize-space($dbID)}.due_date"
											value="{$due_date}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							</TR>


								
							<TR>
								<TD align="right"> EXCHANGE RATE : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.exch_rate" name="Detail1.{normalize-space($dbID)}.exch_rate"
											value="{$exch_rate}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							
								<TD align="right"> BANK CODE : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.bank_code" name="Detail1.{normalize-space($dbID)}.bank_code"
											value="{$bank_code}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							</TR>

								
							<TR>
								<TD align="right"> TAX AMOUNT : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.tax_amt" name="Detail1.{normalize-space($dbID)}.tax_amt"
											value="{$tax_amt}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							
								<TD align="right"> TOTAL AMOUNT : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.tot_amt" name="Detail1.{normalize-space($dbID)}.tot_amt"
											value="{$tot_amt}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							</TR>

								
							<TR>
								<TD align="right"> ADVANCE AMOUNT : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.adv_amt" name="Detail1.{normalize-space($dbID)}.adv_amt"
											value="{$adv_amt}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							
								<TD align="right"> NET AMOUNT : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.net_amt" name="Detail1.{normalize-space($dbID)}.net_amt"
											value="{$net_amt}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							</TR>

								
							<TR>
								<TD align="right"> CONFIRMED : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=120px"
											id="Detail1.{normalize-space($dbID)}.confirmed" name="Detail1.{normalize-space($dbID)}.confirmed"
											value="{$confirmed}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
							</TR>

						</xsl:for-each>
		


						<xsl:for-each select="//Detail3">
							<xsl:variable name="dbID">
								<xsl:value-of select="@domID" />
							</xsl:variable>
							
							<xsl:variable name="line_no">
								<xsl:value-of select="line_no" />
							</xsl:variable>
							<xsl:variable name="budget_amt_anal">
								<xsl:value-of select="budget_amt_anal" />
							</xsl:variable>
							<xsl:variable name="consumed_amt_anal">
								<xsl:value-of select="consumed_amt_anal" />
							</xsl:variable>
							<xsl:variable name="vouch_amt">
								<xsl:value-of select="vouch_amt" />
							</xsl:variable>
							<xsl:variable name="acct_code">
								<xsl:value-of select="acct_code" />
							</xsl:variable>
							<xsl:variable name="cctr_code">
								<xsl:value-of select="cctr_code" />
							</xsl:variable>

							<TR >
								
								<TD align="right"> LINE NO: </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=50px"
											id="Detail1.{normalize-space($dbID)}.line_no" name="Detail1.{normalize-space($dbID)}.line_no"
											value="{$line_no}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>

								<TD align="right"> BUDGET AMOUNT ANAL: </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=80px"
											id="Detail1.{normalize-space($dbID)}.budget_amt_anal" name="Detail1.{normalize-space($dbID)}.budget_amt_anal"
											value="{$budget_amt_anal}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
								<TD align="right"> CONSUMED AMOUNT ANAL: </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=80px"
											id="Detail1.{normalize-space($dbID)}.consumed_amt_anal" name="Detail1.{normalize-space($dbID)}.consumed_amt_anal"
											value="{$consumed_amt_anal}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>

								<TD align="right"> VOUCHER AMOUNT: </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=80px"
											id="Detail1.{normalize-space($dbID)}.vouch_amt" name="Detail1.{normalize-space($dbID)}.vouch_amt"
											value="{$vouch_amt}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>

								<TD align="right"> ACCT CODE: </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=80px"
											id="Detail1.{normalize-space($dbID)}.acct_code" name="Detail1.{normalize-space($dbID)}.acct_code"
											value="{$acct_code}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>
								<TD align="right"> CCTR CODE : </TD>
								<TD class="righttd">
									<span class="viewData">
										<input style="width=80px"
											id="Detail1.{normalize-space($dbID)}.cctr_code" name="Detail1.{normalize-space($dbID)}.cctr_code"
											value="{$cctr_code}" onfocus="gotFocus(this)"
											SRVCALLONCHANGE="false" READONLY="true" TABORDER="0"
											ISCHANGED="true" isReq="false" maxlength="5" class="description1" />
									</span>
								</TD>

							</TR>
  </xsl:for-each>


					
				   </TABLE>
				</span>
			</body>
		</html>
	</xsl:template>
</xsl:stylesheet>

