<?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:variable name="top">0</xsl:variable>
<xsl:variable name="left">0</xsl:variable>
<xsl:variable name="width">450</xsl:variable>
<xsl:variable name="lwidth">170</xsl:variable>
<xsl:variable name="height">20</xsl:variable>
<xsl:variable name="stylecss">
<![CDATA[
	border-color:yellow;
	background:#D7E5F9;
	color:#102132;
	text-align:left;
	font-family:verdana;
	font-size:9pt;
  	border:1px solid #FFFFFF;
  	position:absolute;
  	border-bottom-style:none;
]]>
</xsl:variable>
<xsl:variable name="hstylecss">
<![CDATA[
	border-color:yellow;
	background:#D7E5F9;
	color:#102132;
	text-align:center;
	font-family:verdana;
	font-size:9pt;
  	border:1px solid #FFFFFF;
  	position:absolute;
  	border-bottom-style:none;
]]>
</xsl:variable>
	
<xsl:template match="/">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script language="JavaScript" type="text/javascript">
<![CDATA[
    function setActionVal( value )
	{  

		document.getElementById("action").value = value;
	}
]]>

</script>
</head>
<body>

<style type="text/css">

.tableClass
{margin-left:10px;margin-top:10px;}

.tableClass_rep
{margin-left:0px;}

.header_td
{border:inset 0;background:#FFCCCC;font-family:verdana;font-size:9pt;}

.reset
{border:inset 1;font-family:verdana;font-size:9pt; font-weight:bold;}

.input_editable
{border:inset 2;color:#102132;background:#D7E5F9;text-align:left;font-family:verdana;font-size:9pt;}

.input_num_editable
{border:inset 2;color:#102132;background:#D7E5F9;text-align:right;font-family:verdana;font-size:9pt;}

.td_leftAlign
{background:#D7E5F9;text-align:left;font-family:verdana;font-size:9pt;}

#main1
{margin-left: 10px;margin-top: 10px;width: 1051px;position: absolute;border: 1px solid black;}

#left_menu
{width: 600px;float: left;border: 0px solid green;}

#content
{width: 449px;float: left;border: 0px solid black;}

.headerdiv
{width: 145px;height: 13px;}

.headerNamediv
{width: 145px;height: 30px;}

.detaildiv
{width: 440px;height: 13px;}

.detailNamediv
{width: 440px;height: 30px;}

</style>

<form name = "Wizard_Travel" METHOD="post" ACTION="/ibase/ITMWizardHandlerServlet" onSubmit="javascript:return validatePlace('2');">
<!-- <xmp><xsl:copy-of select="*"/></xmp> -->
<xsl:variable name="from_tran_date"><xsl:value-of select="/Root/Detail1/from_tran_date"/></xsl:variable>
<xsl:variable name="to_tran_date"><xsl:value-of select="/Root/Detail1/to_tran_date"/></xsl:variable>
<xsl:variable name="site_code_fr"><xsl:value-of select="/Root/Detail1/site_code_fr"/></xsl:variable>
<xsl:variable name="site_code_to"><xsl:value-of select="/Root/Detail1/site_code_to"/></xsl:variable>
<xsl:variable name="CHG_USER"><xsl:value-of select="/Root/Detail1/CHG_USER"/></xsl:variable>
<xsl:variable name="CHG_TERM"><xsl:value-of select="/Root/Detail1/CHG_TERM"/></xsl:variable>

<input type="submit" style="cursor:hand" value="Reconcile" name = "finish" id = "finish" title='' onclick="return finishAction('finish')"/>
<div id ="main1">
	<xsl:if test="count(/Root/Detail2/Detail) &gt; 0">
		<xsl:for-each select="Root/Detail2/Detail">
			<xsl:if test="position() mod 2 = 0">
				<div id ="content">
				<table border="0" style="width: 449px;" cellspacing="1" cellpadding="1">
				<xsl:if test="position() = 2">
					<tr>
						<td class="header_td" nowrap="true" align="center"><div class="detaildiv"><b><xsl:value-of select="/Root/Detail1/site_code_to"/></b></div></td>
					</tr>
				</xsl:if>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="TRAN_DATE"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="REF_SER"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="REF_ID"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="ACCT_CODE"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="CCTR_CODE"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="DR_AMT"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="CR_AMT"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="SITE_CODE"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="FIN_ENTITY"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="CURR_CODE"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="EXCH_RATE"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="ACCT_PRD"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="PRD_CODE"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="REMARKS"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="PROJ_CODE"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="CHG_DATE"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="SUNDRYTYPE"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="SUNDRYCODE"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="COMP_REF"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="SH_NAME"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="SUNDRY_NAME"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detailNamediv"><xsl:value-of select="SUNDRY_DETAILS"/></div></td>
					</tr>
					<tr>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="ORG_LOCN"/></div></td>
					</tr>
				</table>
				</div>
			</xsl:if>
			<xsl:if test="position() mod 2 != 0">
				<div id ="left_menu">
				<table border="0" style="width: 600px;" cellspacing="1" cellpadding="1">
				<xsl:if test="position() = 1">
					<tr>
						<td class="header_td" nowrap="true" align="center"><div class="headerdiv"><b> </b></div></td>
						<td class="header_td" nowrap="true" align="center"><div class="detaildiv"><b><xsl:value-of select="/Root/Detail1/site_code_fr"/></b></div></td>
					</tr>
				</xsl:if>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">TRAN DATE</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="TRAN_DATE"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">REF SER</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="REF_SER"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">REF ID</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="REF_ID"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">ACCT CODE</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="ACCT_CODE"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">CCTR CODE</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="CCTR_CODE"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">DR AMT</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="DR_AMT"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">CR AMT</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="CR_AMT"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">SITE CODE</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="SITE_CODE"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">FIN ENTITY</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="FIN_ENTITY"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">CURR CODE</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="CURR_CODE"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">EXCH RATE</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="EXCH_RATE"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">ACCT PRD</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="ACCT_PRD"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">PRD CODE</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="PRD_CODE"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">REMARKS</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="REMARKS"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">PROJ CODE</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="PROJ_CODE"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">CHG DATE</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="CHG_DATE"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">SUNDRYTYPE</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="SUNDRYTYPE"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">SUNDRYCODE</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="SUNDRYCODE"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">COMP REF</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="COMP_REF"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">SH NAME</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="SH_NAME"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">SUNDRY NAME</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="SUNDRY_NAME"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerNamediv">SUNDRY DETAILS</div></td>
						<td class="td_leftAlign" align="left"><div class="detailNamediv"><xsl:value-of select="SUNDRY_DETAILS"/></div></td>
					</tr>
					<tr>
						<td class="header_td" nowrap="true" valign="bottom"><div class="headerdiv">ORG LOCN</div></td>
						<td class="td_leftAlign" align="left"><div class="detaildiv"><xsl:value-of select="ORG_LOCN"/></div></td>
					</tr>
				</table>
				</div>
			</xsl:if>
		</xsl:for-each>
		</xsl:if>
	<div id="repeatPlacesDiv" style="margin-left:10px"></div>
	<div id="left_menu">
		<table>
			<tr>
			    <td>
				<input type="hidden" value="2" name="FORM_NO" ID="FORM_NO" />
				<input type="hidden" value="intercomp_reconcile" name="OBJ_NAME" />
				<input type="hidden" value="" name="action" id="action" />
				<input type="hidden" value="{$from_tran_date}" name="from_tran_date" id="from_tran_date" />
				<input type="hidden" value="{$to_tran_date}" name="to_tran_date" id="to_tran_date" />
				<input type="hidden" value="{$site_code_fr}" name="site_code_fr" id="site_code_fr" />
				<input type="hidden" value="{$site_code_to}" name="site_code_to" id="site_code_to" />
				<input type="hidden" value="{$CHG_USER}" name="CHG_USER" id="CHG_USER" />
				<input type="hidden" value="{$CHG_TERM}" name="CHG_TERM" id="CHG_TERM" />
				
				<input type="submit" style="cursor:hand" value="Back" id="Cancel" name="Cancel" title='' onclick="javascript:setActionVal('previous')"/>
				<!-- input type="submit" style="cursor:hand" value="Next" id="Next" name="Next" title='' onclick="javascript:setActionVal('next')"/-->
				
			    </td>
	                </tr>
		</table>
		<table id="errorTravelTable" width="85%" class="tableClass" border="0" cellspacing="1" cellpadding="1">
		<xsl:for-each select="//error">
				<xsl:variable name="message"><xsl:value-of select="message"/></xsl:variable>
				<xsl:variable name="description"><xsl:value-of select="description"/></xsl:variable>
				<xsl:variable name="type"><xsl:value-of select="type"/></xsl:variable>
				<xsl:variable name="dbID"><xsl:value-of select="@domId"/></xsl:variable>  
				<xsl:variable name="column_name"><xsl:value-of select="@column_name"/></xsl:variable> 
				<xsl:if test="position() = 1">
						<tr>	
							<td class="td_leftAlign" nowrap="true" valign="bottom">
								Message :
							</td>
							<td class="td_leftAlign" nowrap="true" valign="bottom">
								Description :
							</td>
						</tr>
				</xsl:if>
				<tr>
					<td class="td_leftAlign" nowrap="true">
						<xsl:value-of select="message"/>
					</td>
					<td class="td_leftAlign" nowrap="true">
						<xsl:value-of select="description"/>
					</td>
				</tr>
		</xsl:for-each>
		<xsl:for-each select="//error">
				<xsl:variable name="type"><xsl:value-of select="type"/></xsl:variable>
				<xsl:if test="position() = 1">
					<xsl:if test="$type = 'W'">
					<tr>
						<td class="td_leftAlign" nowrap="true" valign="bottom">
							Override Warnings :
						</td>
						<td class="td_leftAlign" nowrap="true" valign="bottom">
							<input  type="checkbox"  name="forceSave"  value="false" onClick="javascript:setChecked(this)"/>
						</td>
					</tr>
					</xsl:if>
				</xsl:if>	
		</xsl:for-each>
		</table>
	</div>
</div>
</form>
</body>
</html>
</xsl:template>
</xsl:stylesheet>