<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/enrgise-html.tld" prefix="enrgise" %>

<html:html>
<html:base />
<head>
  <TITLE><bean:message  key="hrm.title" /></TITLE>
  <jsp:include page="GenIncludes.jsp" flush="true" />
</head>


<BODY  scroll="auto" onkeydown="hotKeys(event);";>
<html:form name="HrmAdvSettleForm" action="HrmAdvSettleBaseAction" type="wenrgise.hrms.webtier.form.HrmAdvSettleForm">
<bean:define id="ParentForm" name="HrmAdvSettleForm" toScope="request" />
<jsp:include page="GenMenu.jsp" flush="true" />
<bean:define id="left" name="ParentForm" property="positionRequested"/>
<bean:define id="right" name="ParentForm" property="totalCount"/>
<table cellSpacing=0 bgColor=#bdd0ef>
<tr height=27>
  <td colSpan=11></td>
</tr>
  <TR > 
    <TD ><enrgise:img name="ParentForm" property="butQuery" onmouseover='this.src="../includes/images/query_act.jpg"' onmouseout='this.src="../includes/images/query.jpg"' alt="Query (Ctrl+Q)" src="../includes/images/query.jpg" onclick="doBaseQueryMode()" /><img  src="../includes/images/insert_dis.jpg" /></TD>
    <TD width="2%"></TD>
    <TD ><enrgise:img name="ParentForm" property="butExecute" onmouseover='this.src="../includes/images/execute_act.jpg"' onmouseout='this.src="../includes/images/execute.jpg"' alt="Execute (Ctrl+U)" src="../includes/images/execute.jpg" onclick="doBaseExecute()" /><enrgise:img name="ParentForm" property="butSave" onmouseover='this.src="../includes/images/save_act.jpg"' onmouseout='this.src="../includes/images/save.jpg"' alt="Save (Ctrl+S)" src="../includes/images/save.jpg" onclick="doBaseSave()" />
    <img src="../includes/images/delete_dis.jpg" /><enrgise:img name="ParentForm" property="butRefresh" onmouseover='this.src="../includes/images/refresh_act.jpg"' onmouseout='this.src="../includes/images/refresh.jpg"' alt="Refresh (Ctrl+R)"  src="../includes/images/refresh.jpg" onclick="doBaseRefresh()" />
    <enrgise:img name="ParentForm" property="butPrint" onmouseover='this.src="../includes/images/print_act.jpg"' onmouseout='this.src="../includes/images/print.jpg"' alt="Print (Ctrl+P)"  src="../includes/images/print.jpg" /></TD>
    <TD width="2%" bgColor=#bdd0ef></TD>
 <TD><enrgise:img name="ParentForm" property="butExit" onmouseover='this.src="../includes/images/exit_act.jpg"' onmouseout='this.src="../includes/images/exit.jpg"' alt="Exit (Alt+X)"  src="../includes/images/exit.jpg"   onclick="doBaseExit()" />
    <enrgise:img name="ParentForm" property="butHelp" onmouseover='this.src="../includes/images/help_act.jpg"' onmouseout='this.src="../includes/images/help.jpg"' alt="Help (Ctrl+?)" src="../includes/images/help.jpg" onclick="doBaseHelp()" /></TD>    <TD width="50%"></TD>
    <TD ><enrgise:img name="ParentForm" property="butPrevHeader" src='../includes/images/butn_prev.jpg' onmouseover='this.src="../includes/images/butn_prev_act.jpg"' onmouseout='this.src="../includes/images/butn_prev.jpg"' alt="Butn_prev (Ctrl+<)" onclick="doBasePrevHeader()" /></td>
    <td class=dtlNavText><bean:write  name="left" /> of 
    <bean:write name="right" /></td>
    <td align=right><enrgise:img name="ParentForm" property="butNextHeader" src="../includes/images/butn_next.jpg" onmouseover='this.src="../includes/images/butn_next_act.jpg"' onmouseout='this.src="../includes/images/butn_next.jpg"' alt="Butn_next (Ctrl+>)" onclick="doBaseNextHeader()" /></td>
    <td align=right><enrgise:text property="newPositionRequested" size="1" onkeydown="isInteger(event)" title="wenrgise.common.jumpDetail" alt="N" disabledClass="locked" styleClass="optional" /></td>
    <td ><enrgise:img name="ParentForm" property="butJumpHeader" alt="Go (Ctrl+G)" src="../includes/images/go.jpg" onmouseover='this.src="../includes/images/go_act.jpg"' onmouseout='this.src="../includes/images/go.jpg"' onclick="doBaseJumpHeader()" /></td>
    <td > </td>
</TR>
</TABLE>
<table>
<tr>
  <td colspan="11" class="userText"></td>
</tr>
<enrgise:checkSession/>
</TABLE>

<!--Top Most Blue Bar-->
<TABLE cellSpacing=0 bgColor=#bdd0ef>
    <tr>
        <TD  colSpan=12 class=mainHeader height=10><bean:message key="hrm.HrmAdvSettle.mainHeader" /></TD>
    </TR>
</TABLE>
<enrgise:errors/>
<logic:messagesPresent message="true">
<Table>
    <html:messages id="message" message="true">
    <TR><TD>
      <bean:write name="message"/>
    </TD></TR>
    </html:messages>      
</Table>
</logic:messagesPresent>

<TABLE cellSpacing=0 cellPadding=0 border=0 >
    <TR>
        <TD>
        
        <TABLE cellSpacing=0 cellPadding=0 >
        <!-- Header Starts -->
              <TR>
                    <TD class=subHeader colspan=6><bean:message key="hrm.HrmAdvSettle.subHeader1" /></TD>
              </TR>
              <TR>
                    <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
              </TR>
              
              <tr>
                  <td class="labelText"><bean:message key="hrm.HrmEmpAdvance.employeeNumber" /></td>
                  <td><html:text  property="employeeNumber" titleKey="hrm.HrmEmpAdvance.employeeNumber" size="23" styleClass="locked" readonly="true" onchange="doChangeHeader();doOnChangeLov();" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" name="HrmAdvSettleForm"  property="butEmployeeNo" onclick="return ShowEmployeeNo()" /></td>
                  <td class="labelText"><bean:message key="hrm.HrmEmpAdvance.employeeName" /></td>
                  <td colspan="3"><html:text  property="firstName" titleKey="hrm.HrmEmpAdvance.employeeName" size="26" styleClass="locked" readonly="true" /><html:text  property="middleName" titleKey="hrm.HrmEmpAdvance.employeeName" size="28" styleClass="locked" readonly="true" /><html:text  property="lastName" titleKey="hrm.HrmEmpAdvance.employeeName" size="26" styleClass="locked" readonly="true" /></td> 
              </tr>
             
              <tr>
                  <td class="labelText"><bean:message key="hrm.HrmEmpAdvance.grade" /></td>
                  <td><html:text  property="grade" titleKey="hrm.HrmEmpAdvance.grade" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>
                  <td class="labelText"><bean:message key="hrm.HrmEmpAdvance.designation" /></td>
                  <td><html:text  property="designation" titleKey="hrm.HrmEmpAdvance.designation" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>
                  <td class="labelText"><bean:message key="hrm.HrmEmpAdvance.location" /></td>
                  <td><html:text  property="location" titleKey="hrm.HrmEmpAdvance.location" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>
              </tr>
              
              <tr>
                  <td colspan="5"></td>
              </tr>
             
             
             <TR>
                    <TD class=subHeader colspan=6>Advance Application Query</TD>
              </TR>
              <TR>
                    <TD colspan=6 bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif" width=1 border=0></TD>
              </TR>
              <TR>
                    <td class="labelText"><bean:message key="hrm.HrmAdvSettle.fromDate" /></td>
                    <td><html:text  property="fromDate" titleKey="hrm.HrmAdvSettle.fromDate"  size="23" styleClass="locked"  readonly="true"/><enrgise:img src="../includes/images/cal.gif"  width="15" height="19" align="top" styleClass="lov" property="butFromDate"  name="HrmAdvSettleForm" onclick="showCalendar('FromDate',this)" /></td>             
                    <td class="labelText"><bean:message key="hrm.HrmAdvSettle.toDate" /></td>
                    <td><html:text  property="toDate" titleKey="hrm.HrmAdvSettle.toDate"  size="23" styleClass="locked"  readonly="true" /><enrgise:img src="../includes/images/cal.gif"  width="15" height="19" align="top" styleClass="lov" property="butToDate" name="HrmAdvSettleForm" onclick="showCalendar('ToDate',this)" /></td>             
                   <td colspan="2"></td>
              </TR>
              <tr height="10"> 
                   <td colspan="6"></td> 
              </tr> 

              
              </table>
      
      
         <table cellspacing=0 cellpadding=0 border=0>
         <!-- Detail Information Row starts -->
 	 <TR>
       <TD colspan=6>
        <!-- Table Starts -->
         <TABLE cellSpacing=0 cellPadding=0 >
           <tr>
                <TD  bgColor=#4682b4><IMG height=1 src="../includes/images/pixel.gif"  border=0></TD>
                <TD class=actTabText noWrap bgColor=#4682b4>Advance Settlement Details<IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
                <TD><IMG height=19  src="../includes/images/formtab_r.gif" width=10  border=0></TD>
                <TD width="100%" background="../includes/images/line_t.gif">&nbsp;</TD>
                <TD background="../includes/images/line_t.gif"><IMG height=1 src="../includes/images/pixel.gif" width=10 border=0></TD>
              
           
           </tr>                  
          <TR >
 <!-- Detail table Container starts -->
          <TD colspan=5>
            <TABLE cellSpacing=0 cellPadding=0 border=0>
              <TBODY>
               <TR>
                 <TD >
                   <DIV id=divDtlTable style="height:150px">
    <!-- Detail table starts -->
                    <TABLE cellSpacing=0 cellPadding=0>
                     <TBODY>
                      <tr>
                          <td class=tableHeader height="20" colspan="6"></td>
                      </tr>  
                    
                      <tr>
                          <td class="labelText"><bean:message key="hrm.HrmAdvSettle.advanceCode" /></td>
                          <td><html:text  property="advanceCode" titleKey="hrm.HrmAdvSettle.advanceCode" maxlength="20" size="23" styleClass="required" readonly="true" onchange="doChangeHeader();" /><enrgise:img height="16" align="center" src="../includes/images/lov.jpg" property="butAdvanceCode" name="HrmAdvSettleForm" styleClass="icon" onclick=" return ShowAdvanceCode()" /></td>              
                          <td class="labelText"><bean:message key="hrm.HrmAdvSettle.dateApplied" /></td>
                          <td><html:text  property="dateApplied" titleKey="hrm.HrmAdvSettle.dateApplied"  size="23" styleClass="locked" readonly="true" onchange="doChangeHeader();" /><img src="../includes/images/cal_dis.gif"  width="15" height="19" align="top" styleClass="lov" property="butDateApplied" disabled="true" onclick="showCalendar('DateApplied',this)" /></td>   
                           <td class="labelText"><bean:message key="hrm.HrmAdvSettle.amountApplied" /></td>
                           <td><html:text  property="amountApplied" titleKey="hrm.HrmAdvSettle.amountApplied" maxlength="4" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>
                         
                     </tr>
                      
                      <tr> 
                            <td class="labelText"><bean:message key="hrm.HrmAdvSettle.sanctionedAmount" /></td>
                            <td><html:text  property="sanctionedAmount" titleKey="hrm.HrmAdvSettle.sanctionedAmount" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>
                            <td class="labelText"><bean:message key="hrm.HrmAdvSettle.sanctionedDate" /></td>
                            <td><html:text  property="sanctionedDate" titleKey="hrm.HrmAdvSettle.sanctionedDate" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>
                            
                           <td class="labelText"><bean:message key="hrm.HrmAdvSettle.settleAmount" /></td>
                           <td><html:text  property="settleAmount" titleKey="hrm.HrmAdvSettle.settleAmount" maxlength="10" size="14" styleClass="locked" readonly="true" onchange="doChangeHeader();" />&nbsp;<html:link  action="LinkHrmAdvSettleHeads" paramId="settleId"  paramProperty="settleId" paramName="HrmAdvSettleForm" styleClass="labelText" >SELECT</html:link></td>   
                                 
                       </tr> 
                       <tr> 
                          <td class="labelText"><bean:message key="hrm.HrmAdvSettle.paidInstallments" /></td>
                          <td><html:text  property="paidInstallments" titleKey="hrm.HrmAdvSettle.paidInstallments" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>
                          <td class="labelText"><bean:message key="hrm.HrmAdvSettle.recoveredAmount" /></td>
                          <td><html:text  property="recoveredAmount" titleKey="hrm.HrmAdvSettle.recoveredAmount" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>
                          <td class="labelText"><bean:message key="hrm.HrmAdvSettle.balance" /></td>
                          <td><html:text  property="balance" titleKey="hrm.HrmAdvSettle.balance" size="26" styleClass="locked" readonly="true" onchange="doChangeHeader();"  /></td>
                          
                      </tr> 
                     <tr height="10"> 
                          <td colspan="6"></td> 
                     </tr> 
                           
                  </TBODY>
                </TABLE>
              </DIV>
            </TD>
          </TR>                     

              </TBODY>
            </TABLE>
          </td>
        </tr>



        </TABLE>
     </td>
	 </tr>
                <!-- Tab Table Ends -->

<!-- Bottom Blue Bar -->
       <TR>
            <td>
              <TABLE  cellspacing="0" cellpadding="0" border=0>
                     <tr>
                        <td width=40% align=center bgColor=#4682b4></td>
                        <td  bgColor=#4682b4></td>
                        <td  bgColor=#4682b4></td>
                        <td bgColor=#4682b4></td>
                        <td align=right bgColor=#4682b4><img src="../includes/images/man.jpg"></td>
                     </TR>
              </table>
            </td>
          </tr>
 
<!-- Container Table Ending Columns Starts-->
  </TD>
    
</TR>
</TBODY>
</TABLE>

<!-- Container Table Ends -->

<html:hidden property="screenName" name="HrmAdvSettleForm" value="HrmAdvanceSettle" />
<html:hidden name="HrmAdvSettleForm"  property="forwardedPage" />
<html:hidden property="positionRequested" name="HrmAdvSettleForm" />
<html:hidden property="screenMode" name="HrmAdvSettleForm"  />

<html:hidden property="userPageRequested" name="HrmAdvSettleForm" />
<html:hidden property="userPositionRequested" name="HrmAdvSettleForm" />
<html:hidden property="pageRequested" name="HrmAdvSettleForm" />
<html:hidden property="lovKey" name="HrmAdvSettleForm"  />
<html:hidden property="txtSearchFields" name="HrmAdvSettleForm"  />
<html:hidden property="txtDisplayFields" name="HrmAdvSettleForm"  />
<html:hidden property="advanceCodeId" name="HrmAdvSettleForm"  />
<html:hidden property="advanceName" name="HrmAdvSettleForm"  />
<html:hidden property="employeeId" name="HrmAdvSettleForm"  />

<html:hidden property="txtIndex" name="HrmAdvSettleForm"  />
<html:hidden property="headerDataChanged" name="HrmAdvSettleForm"  />
<html:hidden property="settleId" name="HrmAdvSettleForm" />
<html:hidden property="firstLoad" name="HrmAdvSettleForm"  />
<html:hidden property="buttonName" name="HrmAdvSettleForm"  />

<input type="hidden" name="multipleFlag" >
<input type="hidden" name="queryParam" >



</html:form>
</body>
</html:html>

<script language="javascript">

function doChangeHeader()
{

 if(document.forms[0].screenMode.value=="U" || document.forms[0].screenMode.value=="N")

 document.forms[0].headerDataChanged.value="true";
}

function doQueryMode()
{
 
  return "HrmAdvSettleQueryModeAction.do";
}

function doInsertMode()
{

  return "HrmAdvSettleNewModeAction.do";
}


function doExecute()
{

  return "HrmAdvSettleGetHeaderAction.do";
}

function doSave()
{
   return "HrmAdvSettleSaveAction.do";
}

function doDelete()
{

  return "HrmAdvSettleDeleteAction.do";
  
}

function doRefresh()
{

  return "HrmAdvSettleRefreshAction.do";
  
}

function doPrevHeader()
{
  return "HrmAdvSettleGetNextHeaderAction.do"; 
}

function doNextHeader()
{
  return "HrmAdvSettleGetNextHeaderAction.do"; 
}

function doJumpHeader()
{
  return "HrmAdvSettleFirstGetNextHeaderAction.do"; 
}

function doGetDetail()
{

  return "HrmAdvSettleGetDetailAction.do";
}

function doAddRow()
{

  return "HrmAdvSettleAddRowAction.do"; 
}

function doDelRow()
{
 return "HrmAdvSettleDeleteRowAction.do";  
}

function doGetDetailTableName()
{
  return "HrmAdvSettle";
}

function doPrevDetail()
{

  return "HrmAdvSettleGetDetailPageAction.do";  
}

function doNextDetail()
{

  return "HrmAdvSettleGetDetailPageAction.do";
}
function doExit()
{

  return "HrmAdvSettleExitAction.do";
}
function doJumpDetail()
{
  return  "HrmAdvSettleGetDetailPageAction.do"; 
}
function doOnLoad()
{
  if(document.forms[0].firstLoad.value!="false")
  {
    return  "HrmAdvSettleOnLoadAction.do"; 
  }
}
function ShowAdvanceCode()
{
        document.forms[0].lovKey.value = "SettleAdvanceCode" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmAdvSettle.advanceCode";
        document.forms[0].txtDisplayFields.value = "advanceCodeId,advanceCode,dateApplied,amountApplied";
        document.forms[0].multipleFlag.value = "false";
        document.forms[0].queryParam.value="employeeId="+document.forms[0].employeeId.value;
        showLov('<html:rewrite page="/HRMS/JSP/CommonSearchScreen.jsp" />','HrmAdvSettleForm');
        return true;
}

function doGetInsertData()
{
}

function ShowEmployeeNo()
{
        document.forms[0].lovKey.value = "AdvSettleEmpNo" + document.forms[0].screenName.value + document.forms[0].screenMode.value;
        document.forms[0].txtSearchFields.value = "hrm.HrmEmpLoanAppln.employeeNumber,hrm.HrmEmpLoanAppln.employeeName";
        document.forms[0].txtDisplayFields.value = "employeeId,employeeNumber,firstName,middleName,lastName,grade,designation,location";
        document.forms[0].multipleFlag.value = "false";
        showLov('<html:rewrite page="/hrms/jsp/CommonSearchScreen.jsp" />','HrmAdvSettleForm');
        return true;
        
}
</script>    
