<?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" src="/ibase/scheduler/js/date-picker.js"></SCRIPT> 
					<SCRIPT language="Javascript" type="text/javascript" src="/ibase/webitm/js/ValidateDate.js"></SCRIPT> 
					<SCRIPT language="Javascript" type="text/javascript" src="/ibase/qms/js/DateValidator.js"></SCRIPT>
					<SCRIPT language="Javascript" type="text/javascript" src="/ibase/webitm/js/StatelessItemChange.js"></SCRIPT> 
				<script language="JavaScript" type="text/javascript">
					var objCur = "";
					var oldVal = "";
					var obj1 = "";
					var preObj;
					
					function gotFocus(column)
						{
							if(preObj != undefined)
							{
								if(document.getElementById(preObj.name+"__img") != undefined)
								{
									if(document.getElementById(preObj.name+"__img").style.visibility=="visible")
										document.getElementById(preObj.name+"__img").style.visibility="hidden";
								}
							}
							if(column.SRVCALLONCHANGE=="true")
							{
								document.getElementById(column.name+"__img").style.visibility="visible";
							}
							objCur=column.name;
							oldVal=column.value;
							dotNotaion = undefined;
						}
					function gotBlur(obj)
						{
							preObj = 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("remarks__ra1") != -1)
						   {
								alert("Please Specifiy remarks");
								document.getElementById(obj.name).focus();
								return false;
					 	   }
					 	   else if(obj.name.indexOf("months_extend") != -1)
						   {
								alert("Please Specifiy months extend");
								document.getElementById(obj.name).focus();
								return false;
					 	   }
					 	   else if(obj.name.indexOf("spec_rating__1") != -1)
					 	   {
								alert("Please Specifiy Ratings against parameters");
								document.getElementById(obj.name+"__cmb").focus();
								return false;
						   }
							obj.focus();
							return false;
					}
					function setDropDownValue(dropDownObj)
					{
					  var selectedValue =dropDownObj.options[dropDownObj.selectedIndex].text;
					  if("YES"== selectedValue )
						{
						   selectedValue="Y";
						}
						else if ("NO"== selectedValue)
						{
						   selectedValue="N";
						}
						else if ("CONFIRM"== selectedValue)
						{
						   selectedValue="C";
						}
						else if ("NFFE"== selectedValue)
						{
							var dropDownObjName = dropDownObj.name;
							var fieldName = dropDownObjName.replace("__cmb","");
							var fieldName = dropDownObjName.replace("recommendation__cmb","remarks__ra1");
							document.getElementById(fieldName).setAttribute("isReq","true");
							selectedValue="N";
						}
						else if ("PUT ON PROBATION"== selectedValue)
						{
						   selectedValue="P";
						}
						else if ("EXTEND PROBATION"== selectedValue)
						{
						   selectedValue="XP";
						}
						else if ("EXTEND CONFIRMATION"== selectedValue)
						{
						   selectedValue="XC";
						}
						else if ("Score"== selectedValue)
						{
						   selectedValue="";
						}
						var dropDownObjName = dropDownObj.name;
						var fieldName = dropDownObjName.replace("__cmb","");
						document.getElementById(fieldName).value=selectedValue;
						document.getElementById(fieldName).onblur();
					}
					function updateSum(column)
					{
						var val = document.getElementById(column).value;
						var n=val.split(","); 
						var sum = 0;
						for (cnt=0; cnt&lt; n.length-1; cnt++ )
						{
						   value = n[cnt];
						   if(!isNaN(value))
						   {
							sum = sum + Number(value);
						   }
						}
						document.getElementById(column+"__1").value = sum;
					}
					function maxChar(obj,len)
					{
						if(obj.value.length > len)
						{
							obj.focus();
							alert("Enter up to "+len+" Characters only");
							return false;
						}
					}
				
					function	focusLost(obj)
				  {
					var objId=obj.id;
					objId=objId.replace("remarks__ra1","recommendation");
					object=document.getElementById(objId);
					var value =object.value;
					if (value=="N")
					{
						document.getElementById(obj.id).setAttribute("isReq","true");
					}
					else 
					{		
					   document.getElementById(obj.id).setAttribute("isReq","false");
					}
				 }
						
				</script>
				<LINK type="text/css" rel="stylesheet" href="/ibase/css/display_budget.css" />
				<LINK type="text/css" rel="stylesheet" href="/ibase/css/workflowsign.css" />
			</head>
			<body bgcolor='#EEEEEE'>
				<span  class="allDisplayDiv">
					<TABLE BORDER="0" WIDTH="100%">	
							<TR><TD class ="tTitle" > <center>MISCELLANEOUS VOUCHER </center></TD></TR>
					</TABLE >
					<DIV>
							<TABLE align="center" border ="0" width="100%" cols="5">
								<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="sundry_type"><xsl:value-of select="sundry_type" /></xsl:variable>	
							<xsl:variable name="sundry_code"><xsl:value-of select="sundry_code" /></xsl:variable>	
							<xsl:variable name="acct_code__ap"><xsl:value-of select="acct_code__ap" /></xsl:variable>	
							<xsl:variable name="cctr_code__ap"><xsl:value-of select="cctr_code__ap" /></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 class="lefttd" > <span class="tLabel">Voucher No :</span>
										</TD>
										<TD class="lefttdh">
										<span STYLE="FLOAT:RIGHT">
											<span class="tLabel"> </span>
											<!-- 	<span class="viewDates"><xsl:value-of select="tran_date" /></span>  -->
											</span>
											<span class="viewData">
												<xsl:value-of select="$tran_id" />
											</span>
										</TD>
										<TD class="lefttdr" align="right"  ><span class="tLabel"> 
										     Transaction Date :</span></TD>
										 
										<TD class="lefttdh">
											<span class="viewData">
												<xsl:value-of select="$tran_date" />
											</span>
											
										</TD>
										
									</TR>
									<TR>
										<TD class="lefttd"> <span class="tLabel">Voucher Type : </span></TD>
										
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$vouch_type" />
											</span>
											
										</TD> 
										
									
										<TD class="lefttd"><span class="tLabel">Effective Date :</span></TD>
										 
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$eff_date" />
											</span>
											
										</TD>
										
									</TR>
									
									
									<TR>
										<TD class="lefttd"> <span class="tLabel">Sundry Code :</span>
										</TD>
										 
										<TD class="righttd">
										<span STYLE="FLOAT:RIGHT">
											<span class="tLabel"> </span>
											<!-- 	<span class="viewDates"><xsl:value-of select="tran_date" /></span>  -->
											</span>
											<span class="viewData">
												<xsl:value-of select="$sundry_code" />
											</span>
										</TD>
										
									
										<TD class="lefttd"><span class="tLabel">Sundry Type :</span></TD>
										 
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$sundry_type" />
											</span>
											
											
										</TD>
										
									</TR>
									<TR>
										<TD class="lefttd"> <span class="tLabel">Account code AP : </span></TD>
										
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$acct_code__ap" />
											</span>
											
										</TD> 
										
									
										<TD class="lefttd"><span class="tLabel">Cost centre code AP :</span></TD>
										 
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$cctr_code__ap" />
											</span>
											
										</TD>
										
									</TR>
									      
									<TR>
										<TD class="lefttd"> <span class="tLabel">Site code :</span>
										</TD>
										 
										<TD class="righttd">
										<span STYLE="FLOAT:RIGHT">
											<span class="tLabel"> </span>
											<!-- 	<span class="viewDates"><xsl:value-of select="tran_date" /></span>  -->
											</span>
											<span class="viewData">
												<xsl:value-of select="$site_code" />
											</span>
										</TD>
										
									
										<TD class="lefttd"><span class="tLabel">Fin entity :</span></TD>
										 
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$fin_entity" />
											</span>
										
										</TD>
										
									</TR>
									<TR>
										<TD class="lefttd"> <span class="tLabel">Due date : </span></TD>
										
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$due_date" />
											</span>
											
										</TD> 
										
									
										<TD class="lefttd"><span class="tLabel">Bill amount :</span></TD>
										 
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$bill_amt" />
											</span>
											
										</TD>
										
									</TR>
									
									<TR>
										<TD class="lefttd"> <span class="tLabel">Exchange rate :</span>
										</TD>
										 
										<TD class="righttd">
										<span STYLE="FLOAT:RIGHT">
											<span class="tLabel"> </span>
											<!-- 	<span class="viewDates"><xsl:value-of select="tran_date" /></span>  -->
											</span>
											<span class="viewData">
												<xsl:value-of select="$exch_rate" />
											</span>
										</TD>
										
									
										<TD class="lefttd"><span class="tLabel">Bank code :</span></TD>
										 
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$bank_code" />
											</span>
											
										</TD>
										
									</TR>
									<TR>
										<TD class="lefttd"> <span class="tLabel">Tax amount : </span></TD>
										
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$tax_amt" />
											</span>
											
										</TD> 
										
									
										<TD class="lefttd"><span class="tLabel">Total amount :</span></TD>
										 
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$tot_amt" />
											</span>
											
										</TD>
										
									</TR>      
									      
									      
									 <TR>
										<TD class="lefttd"><span class="tLabel">Advanced amount :</span></TD>
										 
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$adv_amt" />
											</span>
											
											
										</TD>
										
									
										<TD class="lefttd"> <span class="tLabel">Net amount : </span></TD>
										
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$net_amt" />
											</span>
											
										</TD> 
										
									</TR>
									<TR>
										<TD class="lefttd"><span class="tLabel">Confirmed :</span></TD>
										 
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$confirmed" />
											</span>
											
										</TD>
										
									</TR>           
									                                      
                                </xsl:for-each>
							</TABLE>
					</DIV>
					<DIV >
					 
				
					<TABLE align="center" border ="0" width="100%"  height="100%">
										
													
								<TR>
									<TD class ="tTitleD" >
									 <center> Detail : </center>
									
									</TD>
								</TR>	
							<xsl:for-each select="//Detail3"> 
								  <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="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="amount"> <xsl:value-of select="amount" /></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 class="lefttdc"><span class="tLabel">Voucher no:</span></TD>
										<TD class="lefttdc" width='5px'>
											<span class="viewData">
												<xsl:value-of select="$tran_id" />
											</span>
										</TD>
										-->
										<TD class="lefttdc"><span class="tLabel">line no:</span></TD>
										<TD class="lefttdc" width='5px'>
											<span class="viewData">
												<xsl:value-of select="$line_no" />
											</span>
										</TD>
								
										<TD class="lefttdc"><span class="tLabel">Budget amount analysis:</span></TD>
										<TD class="lefttdc" width='5px'>
											<span class="viewData"  >
												<xsl:value-of  select="$budget_amt_anal" />
											</span>
										</TD>
								
										<TD class="lefttdc" ><span class="tLabel">Consumed amount analysis:</span></TD>
										<TD class="lefttdc" width='5px'>
											<span class="viewData">
												<xsl:value-of select="$consumed_amt_anal" />
											</span>
										</TD>
										
										<TD class="lefttdc" ><span class="tLabel">Amount:</span></TD>
										<TD class="lefttdc" width='5px'>
											<span class="viewData">
												<xsl:value-of select="$amount" />
											</span>
										</TD>
										
										<TD class="lefttdc" ><span class="tLabel">Account code:</span></TD>
										<TD class="lefttdc" width='5px'>
											<span class="viewData">
												<xsl:value-of select="$acct_code" />
											</span>
										</TD>
										<TD class="lefttdc" ><span class="tLabel">Cost centre code:</span></TD>
										<TD class="lefttdc" width='5px'>
											<span class="viewData">
												<xsl:value-of select="$cctr_code" />
											</span>
										</TD>
								</TR>
								
								
							</xsl:for-each>
						 	
						
						
					</TABLE>
					</DIV>			
				</span>
			</body>
		</html>
	</xsl:template>
	
	

</xsl:stylesheet>

