<!-- #include file="../../../include.asp" -->

<%
'<!--
'################################################
'	 名称	:銀行受付の一覧表示
'	 作成日:2002/10/18
'	 作成者:山崎 貴史
'	 目的 :銀行受付の一覧画面を表示する。
'	 概要	:
'		<<表示>>
'	・銀行受付の一覧画面
'################################################
'-->
'
%>

<%
main()
Sub main()
	If Not(SessionCheck()) Then
		Exit Sub
	End If

	Dim PageType
' 2006.12.08 APPEND 2LINES
	Dim GenkinNyusyukinCD
	GenkinNyusyukinCD = Request("GenkinNyusyukinCD")

	PageType = Request("PageType")

	Dim GenkinTorihikiKubun
	Dim Label
	If PageType = "Nyukin" Then
		GenkinTorihikiKubun = "GN"
		Label = "入金"
	ElseIf PageType = "Shukkin" Then
		GenkinTorihikiKubun = "GS"
		Label = "出金"
	Else
		PageType = "入出金履歴"
		Label = "入出金履歴"
	End If

%>


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=shift_jis">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Expires" content="-1">
<link href="../../../binx/sj3web.css?<% = TimeUniq() %>" rel="stylesheet" type="text/css">
<title><% = AppTitle %></title>
<script language="JScript" src="../../../include.js?<% = TimeUniq() %>"></script>
<script language="JScript" src="../../../includesj.js?<% = TimeUniq() %>"></script>
<script language="JScript.Encode" src="../../../include_enc.js?<% = TimeUniq() %>"></script>
<script language="JScript.Encode" src="../../../includesj_enc.js?<% = TimeUniq() %>"></script>
<script type=""text/javascript"" src="../../../javascript.js?<% = TimeUniq() %>"></script>
</head>
<SCRIPT LANGUAGE="JavaScript">
<!--
	HomeAlias = "<% = HomeAlias %>";
	HomeAliasSL = "<% = HomeAliasSL %>";
	ExitFlg = 1;
-->
</SCRIPT>

<body onkeydown="if(ExitFlg==2)ExitFlg=3;" onBeforeUnload="window.event.returnValue = ExitMsg(ExitFlg)" bgcolor="#5C70B6" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">


<%
	Response.Write(HtmlDesign(1))

	Response.Write(HttpL1(3))

	If GB_Gyosyu <> "B" Then
		Response.Write(HttpL2("会社選択" ,"tblbtn( '/" & HomeAlias & "/user/bk/')", GB_GyosyuMeisyo, "tblbtn( '/" & HomeAlias & "/user/bk/menu_" & GB_Gyosyu & ".asp')", "経理部", "tblbtn( '/" & HomeAlias & "/user/bk/menu_s1.asp')", Label, "", "", "", "", ""))
	Else
		Response.Write(HttpL2("会社選択" ,"tblbtn( '/" & HomeAlias & "/user/bk/')", GB_GyosyuMeisyo , "tblbtn( '/" & HomeAlias & "/user/bk/menu_" & GB_Gyosyu & ".asp')", "経理業務", "tblbtn( '/" & HomeAlias & "/user/bk/menu_" & GB_Gyosyu & "1.asp')", Label, "", "", "", "", ""))
	End If

	Response.Write(HttpL3("", "", "", "", "","" ,"", "", "", "", "", "", "", "", "", ""))
	If PageType = "Nyukin" Or PageType = "Shukkin" Then
		Response.Write(HttpL3_1("照会", "syokaibtn()", "", "", "", "", "", "", "", ""))
		Response.Write(HttpL3_2("追加", "tblbtn( '/" & HomeAlias & "/user/bk/kinko/fk_nyukin.asp?PageType=" & PageType & "')", "", "", "", "", "", "", "", ""))
	End If

	Response.Write(HttpL4(Label, "一覧表示"))

%>

<div id="L0" style="position: absolute; visibility: hidden; left: 0px; top: -2000px;">

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="5">
<tr>
	<td>
		<table border="0" cellpadding="5" cellspacing="0" width="100%" height="100%">
		<tr>
			<td align="CENTER" valign="MIDDLE">
				<TABLE BORDER="0" CELLSPACING="5" CELLPADDING="16" BGCOLOR="#FFFFFF" STYLE="BORDER:1px solid #000000" HEIGHT="100%">
				<TR>
					<TD ALIGN="CENTER" BACKGROUND="/<% = HomeAlias %>/images/window_bk.gif">
						<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="100%">
						<TR>
							<TD HEIGHT="20" VALIGN="BOTTOM">
								<TABLE WIDTH="560" HEIGHT="20" BORDER="1" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="#000000" BGCOLOR="#FFFFCC" CLASS="tx1416" STYLE="border-collapse: collapse">
								<TR ALIGN="CENTER">
									<TD WIDTH="100" HEIGHT="20">処理日</TD>
									<TD	HEIGHT="20">摘要</TD>
									<TD WIDTH="120" HEIGHT="20">金額</TD>
								</TR>
								</TABLE>
							</TD>
						</TR>
						<TR>
							<TD VALIGN="TOP">
								<DIV ID="Layer1" STYLE="position:relative; left:0px; top:0px; width:580px; height:100%; z-index:1; border: 1px none #000000; overflow: auto; cursor: hand;">
								<TABLE ID="List" WIDTH="560" BORDER="1" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#FFFFFF" STYLE="border-collapse: collapse" BORDERCOLOR="#000000">
<%
									Dim Query
									Dim Content
									Dim ii, jj, iiDef, NyuSyu
									Dim Total
									Total = 0
									ii = 0
									iiDef = -1

									Query = "exec SPK現金入出金一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & KaisyaCD & "'"

									Set Content = OpenQuery(Query)
									Do While Not(Content.BOF Or Content.EOF)

''''''' 型を統一する為、ダミー演算を行う(int → Char)
										Nyusyu = "" & Content.Fields("現金入出金CD")
										If GenkinNyusyukinCD = NyuSyu Then
											iiDef = ii
										End If

										If Content.Fields("現金取引区分") = GenkinTorihikiKubun Or GenkinTorihikiKubun = "" Then
											If Content.Fields("処理時期区分") = 1 Then
												Response.Write("<TR ALIGN=""CENTER"" onClick=""celsel(" & ii & ",'" & Content.Fields("現金入出金CD") & "')"" CLASS=""tx1618"" onDblClick=""syokaibtn()"">" & vbCrLf)
												Response.Write("<TD WIDTH=""100"" HEIGHT=""21"">" & SetTimeYYYYMMDD(Content.Fields("処理日")) & "</TD>" & vbCrLf)
												Response.Write("<TD HEIGHT=""20"" align=""left"" CLASS=""tx1416"">&nbsp;" & Content.Fields("摘要") & "&nbsp;</TD>" & vbCrLf)
												Response.Write("<TD WIDTH=""120"" HEIGHT=""20"" align=""right"">" & ConvIntToMoney(Content.Fields("金額"), false, false) & "&nbsp;</TD>" & vbCrLf)
												Response.Write("</TR>")
										
												Total = Total + Content.Fields("金額")
													
												ii = ii + 1
											End If
										End If
								 		Content.MoveNext
									Loop
									For jj = ii To 20
										Response.Write("<TR ALIGN=""CENTER"">" & vbCrLf)
										Response.Write("<TD WIDTH=""100"" HEIGHT=""21"">&nbsp;</TD>" & vbCrLf)
										Response.Write("<TD HEIGHT=""20"">&nbsp;</TD>" & vbCrLf)
										Response.Write("<TD WIDTH=""120"" HEIGHT=""20"">&nbsp;</TD>" & vbCrLf)
										Response.Write("</TR>")
										ii = ii + 1
									Next
									For jj = ii To 14	'高さ調節
										Response.Write("<TR ALIGN=""CENTER"">" & vbCrLf)
										Response.Write("<TD WIDTH=""100"" HEIGHT=""18"">&nbsp;</TD>" & vbCrLf)
										Response.Write("<TD HEIGHT=""18"">&nbsp;</TD>" & vbCrLf)
										Response.Write("<TD WIDTH=""120"" HEIGHT=""18"">&nbsp;</TD>" & vbCrLf)
										Response.Write("</TR>")
									Next
%>
								</TABLE>
								</DIV>
							</TD>
						</TR>
						<TR>
							<TD HEIGHT="20" VALIGN="BOTTOM">
								<TABLE WIDTH="560" HEIGHT="20" BORDER="1" CELLPADDING="0" CELLSPACING="0" BORDERCOLOR="#000000" BGCOLOR="#FFFFCC" CLASS="tx1618" STYLE="border-collapse: collapse">
								<TR >
									<TD WIDTH="100" HEIGHT="20">&nbsp;</TD>
									<TD ALIGN="CENTER" HEIGHT="20">合    計</TD>
									<TD ALIGN="right" WIDTH="120" HEIGHT="20"><% = ConvIntToMoney(Total, false, false) %>&nbsp;</TD>
								</TR>
								</TABLE>
							</TD>
						</TR>
						</TABLE>
					</TD>
				</TR>
				</TABLE>
			</td>
		</tr>
		</table>
	</td>
</tr>
</table>
</div>
</body>
<SCRIPT LANGUAGE="JavaScript">
<!--

var GenkinNyusyukinCD
GenkinNyusyukinCD = "#"
function syokaibtn()
{
	if(GenkinNyusyukinCD == "#")
	{
		alert("選択されていません");
	}
	else
	{
		tblbtn("fk_nyukin_view.asp?PageType=<% = PageType %>&GenkinNyusyukinCD=" + GenkinNyusyukinCD);
	}
}

//TRselect & URLset
function celsel(rw,lsParam)
{

	for (k = 0; k < document.all['List'].rows.length; k++)
	{
		document.all['List'].rows[k].style.backgroundColor ="";
	}									//セル色クリア
	document.all['List'].rows[rw].style.backgroundColor ="#ffcdde";		//選択行色変更
	GenkinNyusyukinCD = lsParam;
}

//-->
</SCRIPT>
<SCRIPT FOR="window" EVENT="onload" LANGUAGE="JavaScript">
<%
' 2006.12.20 スクロールを初期に戻すことなく、選択の位置にいるようにする(DenpyoNoは、変更の可能性あり)
%>
<% If iiDef <> -1 Then %>
//	celsel(<% = iiDef %>, "fk_nyukin_view.asp?PageType=<% = PageType %>&GenkinNyusyukinCD=" + GenkinNyusyukinCD);
	celsel(<% = iiDef %>, GenkinNyusyukinCD);
	Layer1.scrollTop = <% = (iiDef - 5) * 20 %>;
	GenkinNyusyukinCD = <% = GenkinNyusyukinCD %>;
<% End If %>

</script>

<% = HtmlFooter %>
</html>
<%
End Sub
%>