<?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>BUDGET GROUP ALLOCATION AMENDMENT </center></TD></TR>
					</TABLE>
					<DIV>
							<TABLE align="center" border ="0" width="100%">
								<xsl:for-each select="//Detail1">
									<xsl:variable name="dbID">	 <xsl:value-of select="@dbID" />	</xsl:variable>
									<xsl:variable name="amd_no"> <xsl:value-of select="amd_no" />	</xsl:variable>
									<xsl:variable name="budget_id"> <xsl:value-of select="budget_id" />	</xsl:variable>
									<xsl:variable name="emp_code"> <xsl:value-of select="emp_code" />	</xsl:variable>
									<xsl:variable name="confirmed"> <xsl:value-of select="confirmed" /></xsl:variable>
																
									<TR>
										<TD class="lefttd"> <span class="tLabel">Amendment No :</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="$amd_no" />
											</span>
										</TD>
										
									</TR>
									<TR>
										<TD class="lefttd"><span class="tLabel">Budget Id :</span></TD>
										 
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$budget_id" />
											</span>
											
											
										</TD>
										
									</TR>
									<TR>
										<TD class="lefttd"> <span class="tLabel">Employee Code : </span></TD>
										
										<TD class="righttd">
											<span class="viewData">
												<xsl:value-of select="$emp_code" />
											</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%">
								
						
								<TR>
									<TD class ="tTitleD" >
									 <center> Detail : </center>
									
									</TD>
								</TR>
						
					
							 	
							<xsl:for-each select="//Detail2"> 
								<xsl:variable name="dbID"> <xsl:value-of select="@dbID" /></xsl:variable>
								<xsl:variable name="amd_no"> <xsl:value-of select="amd_no" /></xsl:variable>
								<xsl:variable name="line_no"> <xsl:value-of select="line_no" /></xsl:variable>
								<xsl:variable name="bud_group_code"> <xsl:value-of select="bud_group_code" /></xsl:variable>
								<xsl:variable name="budget_amt"> <xsl:value-of select="budget_amt" /></xsl:variable>
								<xsl:variable name="budget_amt_old"> <xsl:value-of select="budget_amt_old" /></xsl:variable>
								
								<TR>
										<TD class="lefttdc"><span class="tLabel">Amendment no :</span></TD>
										<TD class="lefttdc" width='5px'>
											<span class="viewData">
												<xsl:value-of select="$amd_no" />
											</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 group code :</span></TD>
										<TD class="lefttdc" width='5px'>
											<span class="viewData">
												<xsl:value-of select="$bud_group_code" />
											</span>
										</TD>
										
										<TD class="lefttdc" ><span class="tLabel">Budget amount :</span></TD>
										<TD class="lefttdc" width='5px'>
											<span class="viewData">
												<xsl:value-of select="$budget_amt" />
											</span>
										</TD>
										
										<TD class="lefttdc" ><span class="tLabel">Budget amount old :</span></TD>
										<TD class="lefttdc" width='5px'>
											<span class="viewData">
												<xsl:value-of select="$budget_amt_old" />
											</span>
										</TD>
								</TR>
								
								
								
								
							</xsl:for-each>
						
							
							
							</TABLE>
					</DIV>			
				</span>
			</body>
		</html>
	</xsl:template>
	
	

</xsl:stylesheet>

