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

<%
'<!--
'################################################
'	 名称	:寄託一覧表示の親ウィンドウ
'	 作成日:2002/12/20 2006/12/21
'	 作成者:重松        鈴木
'	 目的 :寄託一覧表示のための親ウィンドウ
'	 概要	:
'
'	修正日:
'	修正者:
'################################################

'-->

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

	Dim NRflg 
	Dim ErrMSG 
	Dim Action
	
	Dim SakuseiKaisyaCD                   '作成会社CD
	Dim KitakuIraiKaisyaCD                '寄託依頼会社CD
	Dim KitakuNo                          '寄託受付番号
	Dim KitakuNoSEQ                       '寄託受付番号SEQ
	Dim KitakuFrom								        '寄託期間始
	Dim KitakuTo								          '寄託期間終
	Dim NyukoNengappi								      '入庫年月日
	Dim Basyo									            '倉庫場所
	Dim SokoBetsu								          '倉庫種別
	Dim Syoribi                           '処理日
	Dim DelFlag                           '削除フラグ
	Dim YukoFlag                          '有効フラグ
	Dim GakuseiNo                         '学生番号
	
	Dim SyohinCD												  '商品コード
	Dim KitakuSuryo                       '数量
	Dim Tanka                             '仕入単価
	Dim UnsoTanka                         '運送単価
	Dim TotalSyukosu                      '総出庫数
	Dim Tekiyo                            '摘要
	
	Dim KasaiHokenKin                     '火災保険料金
	Dim Ryoritsu                          '火災保険料率
	Dim Niekiryokin                       '荷役料金
	Dim Niyakuritsu                       '荷役料率
	Dim Jyoryoritsu                       '従量率
	Dim Jyokaritsu                        '従価率
	Dim Hokanryokin                       '保管料金
	Dim SyokenNum                         '倉荷証券番号
	Dim SyokenTesuryo                     '倉荷証券発行手数料
	Dim SyokenHakkoFlag                   '倉荷証券発行フラグ
	Dim SyokenSeikyuFlag                  '倉荷証券請求フラグ
	Dim SyokenKaisyuFlag                  '倉荷証券回収フラグ
	Dim SyokenKaisyubi                    '倉荷証券回収日
	

	Dim GokeiKingaku
	Dim Syohizeigaku
	Dim ZeikomiKingaku
	Dim SyukoZandaka

	Dim SyohinJyuryo
	Dim SyohinYoseki

	Dim Query
	Dim Content
	Dim CContent
	
	Dim fmurl

	NRflg = Request("nr")
	Action = Request("Action")
	
	SakuseiKaisyaCD = Request("SakuseiKaisyaCD")
	KitakuIraiKaisyaCD = Request("KitakuIraiKaisyaCD")
	KitakuNo = Request("KitakuNo")
	KitakuNoSEQ = Request("KitakuNoSEQ")

	ErrMSG = Request("ErrMSG")


	If NRflg = "r" then
		SyukkoNo = Request("SyukkoNo")
		'KitakuNo = Request("KitakuNo")
		ErrMsg = Request("ErrMsg")
	End If

	If Action = 2 Or Action = 3 Then '2:確認モード 3:修正モード

		Query = "exec SPD寄託商品明細取得 '" & GB_SystemCD & "','" & EnshuCD & "','" & KaisyaCD & "','" & SakuseiKaisyaCD & "','" & KitakuIraiKaisyaCD & "'," & KitakuNo & ", "& KitakuNoSEQ &""

'Response.Write("Query:" & Query)

'Exit Sub

		Set Content = OpenQuery(Query)
		
		If Not(Content.BOF Or Content.EOF) Then
		
			SyohinCD = Content.Fields("商品CD")
			KitakuFrom = Content.Fields("寄託開始年月日")
			KitakuTo = Content.Fields("寄託保管期日")
			KitakuSuryo = Content.Fields("数量")
			Basyo = Content.Fields("倉庫場所")
			TotalSyukosu = Content.Fields("総出庫数")

			NyukoNengappi = Content.Fields("入庫年月日")
			SokoBetsu = Content.Fields("倉庫種別")
			Tekiyo = Content.Fields("摘要")
			Jyokaritsu = Content.Fields("従価率")
			Jyoryoritsu = Content.Fields("従量率")
			Niyakuritsu = Content.Fields("荷役料率")
			SyokenNum = Content.Fields("倉荷証券番号")
			SyokenTesuryo = Content.Fields("倉荷証券発行手数料")

			SyohinJyuryo = Content.Fields("商品重量")						 '商品重量
			SyohinYoseki = Content.Fields("商品容積")						'商品容積
			KasaiHokenKin = Content.Fields("火災保険料金")
			Ryoritsu = Content.Fields("火災保険料率")

		End If
	End If


	Dim Kitakuriyou
	Query = "exec SPM演習取得 '" & GB_SystemCD & "','" & EnshuCD & "'"
	Set Content = OpenQuery(Query)
	If Not(Content.BOF Or Content.EOF) Then
		Kitakuriyou = "" & Content.Fields("寄託倉庫利用") '060909追加 テーブルにもフィールドを追加
	End If
	'寄託利用状態を整数化(070207小野)
	If Kitakuriyou = "1" Then
		Kitakuriyou = 1
	Else
		Kitakuriyou = 0
	End If

'Response.write(Query & "<br>")
'exit sub

%>

<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" rel="stylesheet" type="text/css">
<title><% = AppTitle %></title>
<script language="JScript" src="../../../../include.js"></script>
<script language="JScript" src="../../../../includesj.js"></script>
<script language="JScript.Encode" src="../../../../include_enc.js"></script>
<script language="JScript.Encode" src="../../../../includesj_enc.js"></script>
<% Response.Write("<script type=""text/javascript"" src=""../../../../javascript.js?" & TimeUniq() & """></script>" & vbCrLf) %>
</head>
<SCRIPT LANGUAGE="JavaScript">
<!--
<% If Action = 2 Then %>
	ExitFlg = 1;
<% Else %>
	ExitFlg = 2;
<% End If %>
-->
</SCRIPT>
<body onkeydown="if(ExitFlg==2)ExitFlg=3;" onBeforeUnload="window.event.returnValue = ExitMsg(ExitFlg)" bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<%
	Response.Write(HtmlDesign(1))

	Response.Write(HttpL1(1))

	Response.Write(HttpL2("会社選択" ,"tblbtn( '/" & HomeAlias & "/user/bk/')", "運輸・倉庫・保険" ,"tblbtn( '/" & HomeAlias & "/user/bk/menu_u.asp')", "運輸倉庫保険業務" , "tblbtn( '/" & HomeAlias & "/user/bk/menu_u2.asp')", "寄託受付一覧", "tblbtn( '/" & HomeAlias & "/user/bk/unso/kitaku/fu_kitaku_ichiran.asp')", "寄託照会", "", "", ""))

	Response.Write(HttpL3("", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""))

	If Action = 3 Then
	Response.Write(HttpL3_1("保存", "SubmitCheck()", "", "", "", "", "", "", "", ""))
	Else
	Response.Write(HttpL3_1("修正", "SubmitCheck2()", "", "", "", "", "", "", "", ""))
	End If

	Response.Write(HttpL3_2( "一覧表示", "tblbtn( 'fu_kitaku_ichiran.asp')", "", "", "", "", "", "", "", ""))


	If Action =1 then
		Response.Write(HttpL4("寄託", "入力"))
	ElseIf Action =2 then
		Response.Write(HttpL4("寄託", "照会"))
	Else
		Response.Write(HttpL4("寄託", "修正"))
	End If
	
	If Action = 2 Then
		fmurl = "fu_kitaku.asp"
	ElseIf Action = 3 Then
		fmurl = "fu_kitaku_bin.asp"
	End If

%>
<div id="L0" style="position: absolute; visibility: hidden; left: 0px; top: -2000px;">
<form OnKeyDown="FormKeyDown(this)"	method="POST" action="<% =fmurl %>" name="form1" autocomplete="off">

<input type="hidden" name="Action" value="">
<input type="hidden" name="SakuseiKaisyaCD" value="<% = SakuseiKaisyaCD %>">




	<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td align="center">
				<table width="574" border="0" cellspacing="5" cellpadding="5" bgcolor="#ffffff" style="border: 1px solid #000000">
					<tr>
						<td align="center" background="/<% = HomeAlias %>/images/window_bk.gif?<% = GB_STU %>"><!--薄青のチェックの背景-->
							<TABLE BORDER="0" CELLSPACING="5" CELLPADDING="5" WIDTH="100%" HEIGHT="100%">
								<tr>
									<td>
										<table border="0" width="100%" cellspacing="0" cellpadding="0">
											<tr>
												<td valign="bottom">

													<table border="0" width="100%">
														<tr>
															<td height="75" valign="top">

																<TABLE border=0 class="tx1416">
																	<TR>
																		<TD>受付番号</TD>
																		<TD>
																		<input type="text" name="KitakuNo" size="5" value="<% = KitakuNo %>"	readonly class="tbox4_ro">
																		</TD>
																	</TR>
																	<TR>
																		<TD>詳細番号</TD>
																		<TD>
																		<input type="text" name="KitakuNoSEQ" size="5" value="<% = KitakuNoSEQ %>"	readonly class="tbox4_ro">
																		</TD>
																	</TR>
																	<TR>
																		<TD>寄託者</TD>
																		<TD>
																			<input type="text" name="KitakusyaMei" size="35" value="<% = ConvKaisyaMeisyo(KitakuIraiKaisyaCD) %>"	readonly class="tbox4_ro">
																			<input type="hidden" name="KitakuIraiKaisyaCD" value="<% = KitakuIraiKaisyaCD %>"	readonly class="tbox4_ro">
																		</TD>
																	</TR>
																	<TR>
																		<TD >商品名</TD>
																		<TD>

																			<input type="text" name="SyohinMei" size="" value="<% = ConvSyohinMeisyo(SyohinCD) %>" class="tbox4_ro"	readonly>
																			<input type="hidden" name="SyohinCD" size="" value="<% = SyohinCD %>"	readonly class="tbox4_ro">
																		</TD>
																	</TR>
																</TABLE>

															</td>
														</tr>
														<tr>
															<td>


																<TABLE	BORDER="1" BORDERCOLOR="#000000" STYLE="border-collapse: collapse" cellspacing="0" cellpadding="1" width="100%" class="tx1618">
																	<TR bgcolor="#DDDDDD">
																		<TD align="center">寄託情報</TD>
																	</TR>
																	<TR>
																		<TD>
																		
																			<TABLE border="0" cellpadding="0" cellpadding="0" class="tx1416" width="100%">
																				<TR>
																					<TD nowrap>貯蔵倉庫場所</TD>
																					<TD width="1" colspan="3">
																					<% If Action = 2 Then %>
																					<INPUT size="30" type="text" name="Basyo" value="<% = Basyo %>" MAXLENGTH="100"	class="tbox4_ro" onBlur="SetString(this, 200, true)" readonly>
																					<% Else %>
																					<INPUT size="30" type="text" name="Basyo" value="<% = Basyo %>" MAXLENGTH="100"	class="tbox4_ime" onBlur="SetString(this, 200, true)">
																					<% End If %>
																					</TD>
																				</TR>
																				<TR height="20">
																					<TD nowrap>寄託期間</TD>
																					<TD width="70">
																					<% If Action = 2 Then %>
																					<INPUT size="12" type="text" name="KitakuFrom" value="<% = KitakuFrom %>" onBlur="SetDate(this, 1, true)" onBlur="KitakuFromCheck();"	class="tbox4_ro" readonly>
																					<% Else %>
																					<INPUT size="12" type="text" name="KitakuFrom" value="<% = KitakuFrom %>" onBlur="SetDate(this, 1, true)" onBlur="KitakuFromCheck();"	class="tbox4">
																					<% End If %>
																					</TD>
																					<TD width="15">~</TD>
																					<TD>
																					<% If Action = 2 Then %>
																					<INPUT size="12" type="text" name="KitakuTo" value="<% = KitakuTo %>" onBlur="SetDate(this, 1, true)" onBlur="KitakuToCheck();" class="tbox4_ro" readonly>
																					<% Else %>
																					<INPUT size="12" type="text" name="KitakuTo" value="<% = KitakuTo %>" onBlur="SetDate(this, 1, true)" onBlur="KitakuToCheck();" class="tbox4" >
																					<% End If %>
																					</TD>
																				</TR>

																				<TR height="20">
																					<TD nowrap>寄託数量</TD>
																					<TD>
																					<% 'If Action = 2 Then %>
																					<% If Action = 2 Or Kitakuriyou > 0 Then %>
																						 <input type="text" name="KitakuSuryo" size="8" value="<% = KitakuSuryo %>"	readonly class="tbox5_ro">
																					<% Else %>
																						 <input type="text" name="KitakuSuryo" size="8" onkeyup="ChangeMoney(this);" value="<% = SetNumber(KitakuSuryo, false) %>" onBlur="SetNumber(this, false, 10);" class="tbox5">
																					<% End If %>
																					
																					</TD>
																					<TD><br></TD>
																					<TD><br></TD>
																				</TR>
																			</TABLE>
																			
																		</TD>
																	</TR>
																</TABLE>


															</td>
														</tr>
														<tr>
															<td>


																<TABLE BORDER="1" BORDERCOLOR="#000000" STYLE="border-collapse: collapse" cellspacing="0" cellpadding="1" width="100%" class="tx1618">
																	<TR bgcolor="#DDDDDD">
																		<TD align="center">入庫情報</TD>
																	</TR>
																	<TR>
																		<TD>
																			<TABLE BORDER="0" class="tx1416" width="100%" cellpadding="0">
																				<TR height="20">
																					<TD nowrap align="left">入庫年月日</TD>
																					<TD>
																					<% If Action = 2 Then %>
																					<INPUT size="12" type="text" name="NyukoNengappi" value="<% = NyukoNengappi %>" onBlur="SetDate(this, 1, true)" onBlur="KitakuFromCheck();"	class="tbox4_ro" readonly>
																					<% Else %>
																					<INPUT size="12" type="text" name="NyukoNengappi" value="<% = NyukoNengappi %>" onBlur="SetDate(this, 1, true)" onBlur="KitakuFromCheck();"	class="tbox4">
																					<% End If %>
																					</TD>
																				</TR>

																				<TR height="20">
																					<TD nowrap align="left">倉庫種別</TD>
																					<TD>
																					<% 
																						Dim DataSibetsu
																						Dim KubunCD
																						DataSibetsu="倉庫種別"
																						
																						If Action = 2 Then 
																						
																						Query = "exec SPV区分情報一覧 '" & GB_SystemCD & "','" & DataSibetsu & "'"
																						Set Content = OpenQuery(Query)

																						Do While Not(Content.BOF Or Content.EOF)
																							
																							KubunCD = Content.Fields("区分CD")
																							If Content.Fields("区分CD") = SokoBetsu Then
																					%>
																								
																								<INPUT size="15" type="text" name="SokoBetsuMei" value="<% = Content.Fields("区分名称") %>"	class="tbox4_ro" readonly>
																								
																					<%
																							End If
																										
																							Content.MoveNext
																						Loop
																					%>
																					<INPUT size="15" type="hidden" name="SokoBetsu" value="<% = SokoBetsu %>">
																					
																					<% Else %>
																					
																						<SELECT name="SokoBetsu"	class="tbox4">
																							<option value="">    </option>
																							<%

																								Query = "exec SPV区分情報一覧 '" & GB_SystemCD & "','" & DataSibetsu & "'"
																								Set Content = OpenQuery(Query)

																									Do While Not(Content.BOF Or Content.EOF)

																										KubunCD = Content.Fields("区分CD")
																												Response.Write("<option value=""" & Content.Fields("区分CD") & """")
																												If Content.Fields("区分CD") = SokoBetsu Then
																												Response.Write(" selected")
																												End If
																												Response.Write(">" & Content.Fields("区分名称") & "</option>" & vbCrLf)
																										Content.MoveNext
																									Loop
																								%>
																						</SELECT>
																						
																					<% End If %>
																					
																					</TD>
																				</TR>
																				<TR height="20">
																					<TD nowrap>摘  要</TD>
																					<TD width="1" colspan="3">
																					<% If Action = 2 Then %>
																					<INPUT size="32" type="text" name="Tekiyo" value="<% = Tekiyo %>"	MAXLENGTH="100" class="tbox4_ro" onBlur="SetString(this, 200, true)" readonly>
																					<% Else %>
																					<INPUT size="32" type="text" name="Tekiyo" value="<% = Tekiyo %>"	MAXLENGTH="100" class="tbox4_ime" onBlur="SetString(this, 200, true)" >
																					<% End If %>
																					</TD>
																				</TR>
																			</TABLE>
																		</TD>
																	</TR>
																</TABLE>



															</td>
														</tr>
														<tr>
															<td>

																<TABLE border="1" BORDERCOLOR="#000000" STYLE="border-collapse: collapse" cellspacing="0" cellpadding="1" width="100%" class="tx1618">
																	<TR bgcolor="#DDDDDD">
																		<TD align="center">料率情報</TD>
																	</TR>
																	<TR>
																		<TD>
																			<TABLE cellpadding="0" class="tx1416" width="100%">
																				<TR>
																					<TD nowrap>従価率(1000円につき)</TD>
																					<TD width="1">
																					<% If Action = 2 Then %>
																					<INPUT type="text" name="Jyokaritsu" size="15" value="<% = SetNumber(Jyokaritsu, false) %>" onBlur="SetNumber(this, false, 9, 2);" class="tbox5_ro" readonly>
																					<% Else %>
																					<INPUT type="text" name="Jyokaritsu" size="15" value="<% = SetNumber(Jyokaritsu, false) %>" onBlur="SetNumber(this, false, 9, 2);" class="tbox5">
																					<% End If %>
																					</TD>
																					<TD nowrap width="1">円</TD>
																				</TR>
																				<TR>
																					<TD nowrap>従量率(1トンにつき)</TD>
																					<TD>
																					<% If Action = 2 Then %>
																					<INPUT type="text" name="Jyoryoritsu" size="15" value="<% = SetNumber(Jyoryoritsu, false) %>" onBlur="SetNumber(this, false, 9, 2);" class="tbox5_ro" readonly>
																					<% Else %>
																					<INPUT type="text" name="Jyoryoritsu" size="15" value="<% = SetNumber(Jyoryoritsu, false) %>" onBlur="SetNumber(this, false, 9, 2);" class="tbox5">
																					<% End If %>
																					</TD>
																					<TD nowrap>円</TD>
																				</TR>
																				<TR>
																					<TD nowrap>荷役料率(1トンにつき)</TD>
																					<TD>
																					<% If Action = 2 Then %>
																					<INPUT type="text" name="Niyakuritsu" size="15" value="<% = SetNumber(Niyakuritsu, false) %>" onBlur="SetNumber(this, false, 9, 2);" class="tbox5_ro" readonly>
																					<% Else %>
																					<INPUT type="text" name="Niyakuritsu" size="15" value="<% = SetNumber(Niyakuritsu, false) %>" onBlur="SetNumber(this, false, 9, 2);" class="tbox5">
																					<% End If %>
																					</TD>
																					<TD nowrap>円</TD>
																				</TR>
																			</TABLE>
																		</TD>
																	</TR>
																</TABLE>
															</td>
														</tr>
													</table>
												</td>
												<td valign="bottom">


													<table border="0" width="100%">
														<tr>
															<td height="75">
															</td>
														</tr>
														<tr>
															<td>

																<TABLE border="1" BORDERCOLOR="#000000" STYLE="border-collapse: collapse" cellspacing="0" cellpadding="1" width="100%" class="tx1618">
																	<TR bgcolor="#DDDDDD">
																		<TD align="center">商品情報</TD>
																	</TR>
																	<TR>
																		<TD>
																			<TABLE class="tx1416" cellpadding="0" width="100%">
																				<TR>
																					<TD nowrap>標準販売単価</TD>
																					<TD width="1"><INPUT type="text" name="HanbaiTanka" size="15" value="<% = SetMoney(ConvSyohinHanbaiTanka(SyohinCD), false, true) %>" readonly class="tbox5_ro"></TD>
																					<TD nowrap>円</TD>
																				</TR>
																				<TR>
																					<TD nowrap>商品重量</TD>
																					<TD>
																					 <INPUT type="text" name="SyohinJyuryo" size="15" value="<% = SetNumber(SyohinJyuryo, false) %>" readonly class="tbox5_ro"></TD>
																					<TD nowrap align="left">Kg</TD>
																				</TR>
																				<TR>
																					<TD nowrap>商品容積</TD>
																					<TD>
																					 <INPUT type="text" name="SyohinYoseki" size="15" value="<% = SetNumber(SyohinYoseki , false) %>" readonly class="tbox5_ro"></TD>
																					<TD nowrap></TD>
																				</TR>
																			</TABLE>
																		</TD>
																	</TR>
																</TABLE>

															</td>
														</tr>
														<tr>
															<td>


																<TABLE border="1" BORDERCOLOR="#000000" STYLE="border-collapse: collapse" cellspacing="0" cellpadding="1" width="100%" class="tx1618">
																	<TR bgcolor="#DDDDDD">
																		<TD align="center">倉荷証券情報</TD>
																	</TR>
																	<TR>
																		<TD>
																			<TABLE class="tx1416" cellpadding="0" width="100%">
																				<TR>
																					<TD nowrap>倉荷証券番号</TD>
																					 <TD width="1">
																					 <% If Action = 2 Then %>
																					 <INPUT type="text" name="SyokenNum" size="15" value="<% = SyokenNum %>" MAXLENGTH="20" class="tbox4_ro" onBlur="SetString(this, 30, true)" readonly>
																					 <% Else %>
																					 <INPUT type="text" name="SyokenNum" size="15" value="<% = SyokenNum %>" MAXLENGTH="20" class="tbox4" onBlur="SetString(this, 30, true)">
																					 <% End If %>
																					 </TD>
																					 <TD></TD>
																				</TR>
																				<TR>
																					<TD nowrap>証券手数料</TD>
																					 <TD>
																					 <% If Action = 2 Then %>
																					 <INPUT type="text" name="SyokenTesuryo" size="15" value="<% = SetMoney(SyokenTesuryo, false, true) %>" onkeyup="ChangeMoney(this);" onBlur="SetMoney2(this, false, true);" class="tbox5_ro" readonly>
																					 <% Else %>
																					 <INPUT type="text" name="SyokenTesuryo" size="15" value="<% = SetMoney(SyokenTesuryo, false, true) %>" onkeyup="ChangeMoney(this);" onBlur="SetMoney2(this, false, true);" class="tbox5">
																					 <% End If %>
																					 </TD>
																					 <TD nowrap>円</TD>
																				</TR>
																			</TABLE>
																		</TD>
																	</TR>
																</TABLE>

															</td>
														</tr>
														<tr>
															<td>
																<TABLE border="1" BORDERCOLOR="#000000" STYLE="border-collapse: collapse" cellspacing="0" cellpadding="1" width="100%" class="tx1618">
																	<TR bgcolor="#DDDDDD">
																		<TD align="center">保険情報</TD>
																	</TR>
																	<TR>
																		<TD>
																			<TABLE class="tx1416" cellpadding="0" width="100%">
																				<TR>
																					<TD nowrap>料率</TD>
																					<TD colspan="2">
																						<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" class="tx1416">
																							<tr>
																								<td>
																								<% If Action = 2 Then %>
																									<INPUT type="text" name="Ryoritsu" size="3" value="<% = SetMoney(Ryoritsu, false, true) %>" onBlur="SetNumber(this, false, 9, 3);" class="tbox5_ro" readonly>
																								<% Else %>
																									<INPUT type="text" name="Ryoritsu" size="3" value="<% = SetMoney(Ryoritsu, false, true) %>" onBlur="SetNumber(this, false, 9, 3);" class="tbox5">
																								<% End If %>
																								</td>
																								<td nowrap>
																									<% If Action <> 2 Then %>
																									<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="30" onClick="SetHokenRyokin();" class="tx1416">
																										<TR>
																											<TD WIDTH="10" BACKGROUND="/<% = HomeAlias %>/images/dlogbtn_b2l.gif?<% = GB_STU %>"> </TD>
																											<TD nowrap CLASS="tbtn1" ALIGN="CENTER" VALIGN="MIDDLE" BACKGROUND="/<% = HomeAlias %>/images/dlogbtn_b2c.gif?<% = GB_STU %>">自動計算</TD>
																											<TD WIDTH="10" BACKGROUND="/<% = HomeAlias %>/images/dlogbtn_b2r.gif?<% = GB_STU %>"> </TD>
																										</TR>
																									</TABLE>
																									<% End If %>
																									
																								</td>
																							</tr>
																						</table>
																					</TD>
																					<TD></TD>
																				</TR>

																				<TR>
																					<TD nowrap>火災保険料金</TD>
																					<TD>
																					<% If Action = 2 Then %>
																					<INPUT type="text" name="KasaiHokenKin" size="15" value="<% = SetMoney(KasaiHokenKin, false, true) %>" onBlur="SetNumber(this, false, 9, 2);" class="tbox5_ro" readonly>
																					<% Else %>
																					<INPUT type="text" name="KasaiHokenKin" size="15" value="<% = SetMoney(KasaiHokenKin, false, true) %>" onBlur="SetNumber(this, false, 9, 2);" class="tbox5">
																					<% End If %>
																					</TD>
																					<TD>円</TD>
																				</TR>
																			</TABLE>
																		</TD>
																	</TR>
																</TABLE>

															</td>
														</tr>
													</table>

												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>

			</td>
		</tr>
	</table>
</form>
</div>
</body>



<SCRIPT LANGUAGE="JavaScript">
	function SetHokenRyokin()
	{
		var HokenRyokin;
		var Tanka, Suryo;
		var Kingaku, Ryoritsu;
		Tanka = ConvMoneyToInt(form1.HanbaiTanka.value, false, false);
		Suryo = ConvMoneyToInt(form1.KitakuSuryo.value, false, false);
		Ryoritsu = ConvMoneyToFloat(form1.Ryoritsu.value, false, false);

		if (Tanka	== "" || Suryo == "" )Kingaku = 0;
		else Kingaku = Tanka * Suryo;

		if (Ryoritsu	== "")Ryoritsu = 0;

		form1.KasaiHokenKin.value = ConvIntToMoney(Math.floor(Kingaku * Ryoritsu / 1000, false, false));
	}

//################################################
//	名称:SetSyohinKakaku
//	目的:商品標準価格をセットする。
// 作成:2002/9/12 山崎
//################################################
	function SetSyohinData()
	{
	//alert ("00000000");
	//alert(document.form1["SyohinCD"].value);
	//alert(ConvSyohinHanbaiTanka(document.form1["SyohinCD"].value));

	form1["HanbaiTanka"].value = ConvIntToMoney(ConvSyohinHanbaiTanka(document.form1["SyohinCD"].value));
	form1["SyohinJyuryo"].value = ConvIntToMoney(ConvSyohinJyuryo(document.form1["SyohinCD"].value));
	form1["SyohinYoseki"].value = ConvIntToMoney(ConvSyohinYoseki(document.form1["SyohinCD"].value));
	}


//################################################
//	名称:ConvSyohinHanbaiTanka
//	目的:商品リストの表示
// 作成:2002/8/26 川崎
// 概要:TS商品Mの標準販売単価を返す。
//################################################
	function ConvSyohinHanbaiTanka(SyohinCD)
	{
<%
	Query = "exec SPM商品一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & GB_GakuseiNo & "'"
	Set Content = OpenQuery(Query)

	Do While Not(Content.BOF Or Content.EOF)
		Response.Write("if(SyohinCD == """ & Content.Fields("商品CD") & """)return """ & Content.Fields("標準販売単価") & """;" & vbCrLf)
		Content.MoveNext
	Loop
%>
		return "";
	}

//################################################
//	名称:ConvSyohinHanbaiTanka
//	目的:商品リストの表示
// 作成:2002/12/25 重松
// 概要:TS商品Mの商品重量を返す。
//################################################
	function ConvSyohinJyuryo(SyohinCD)
	{
<%
	Query = "exec SPM商品一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & GB_GakuseiNo & "'"
	Set Content = OpenQuery(Query)

	Do While Not(Content.BOF Or Content.EOF)
		Response.Write("if(SyohinCD == """ & Content.Fields("商品CD") & """)return """ & Content.Fields("商品重量") & """;" & vbCrLf)
		Content.MoveNext
	Loop
%>
		return "";
	}

//################################################
//	名称:ConvSyohinHanbaiTanka
//	目的:商品リストの表示
// 作成:2002/12/25 重松
// 概要:TS商品Mの商品重量を返す。
//################################################
	function ConvSyohinYoseki(SyohinCD)
	{
<%
	Query = "exec SPM商品一覧 '" & GB_SystemCD & "','" & EnshuCD & "', '" & GB_GakuseiNo & "'"
	Set Content = OpenQuery(Query)

	Do While Not(Content.BOF Or Content.EOF)
		Response.Write("if(SyohinCD == """ & Content.Fields("商品CD") & """)return """ & Content.Fields("商品容積") & """;" & vbCrLf)
		Content.MoveNext
	Loop
%>
		return "";
	}





	function SubmitCheck()
	{
			var KitakuFrom;
			var KitakuTo;
			var NyukoNengappi;

		if (form1.SyohinCD.value == "")
		{
			alert("商品名を入力してください ");
			form1.SyohinCD.focus();
			return false;
		}

		if (form1.KitakuFrom.value == "")
		{
			alert("寄託期間の開始年月日を入力してください ");
			form1.KitakuFrom.focus();
			return false;
		}

		if (form1.KitakuTo.value == "")
		{
			alert("寄託期間の保管期日を入力してください ");
			form1.KitakuTo.focus();
			return false;
		}

		if (form1.KitakuSuryo.value == "")
		{
			alert("寄託数量を入力してください ");
			form1.KitakuSuryo.focus();
			return false;
		}

		if (form1.NyukoNengappi.value == "")
		{
			alert("入庫年月日を入力してください ");
			form1.NyukoNengappi.focus();
			return false;
		}


		if (form1.SokoBetsu.value == "")
		{
			alert("倉庫種別を入力してください ");
			form1.SokoBetsu.focus();
			return false;
		}

		if (form1.Jyokaritsu.value == "")
		{
			alert("従価率を入力してください ");
			form1.Jyokaritsu.focus();
			return false;
		}

		if (form1.Jyoryoritsu.value == "")
		{
			alert("従量率を入力してください ");
			form1.Jyoryoritsu.focus();
			return false;
		}

		if (form1.Niyakuritsu.value == "")
		{
			alert("荷役率を入力してください ");
			form1.Niyakuritsu.focus();
			return false;
		}

		if (form1.KasaiHokenKin.value == "")
		{
			alert("火災保険料金を入力してください ");
			form1.KasaiHokenKin.focus();
			return false;
		}

		if(form1.SyokenNum.value == "")
		{
			alert("倉荷証券番号を入力してください ");
			form1.SyokenNum.focus();
			return false;
		}

//		if(form1.SyokenNum.value != "" && ConvMoneyToInt(form1.SyokenNum.value, false, false) > 32767)
//		{
//			alert("倉荷証券番号を入力する場合は、32,767以下の数字を入力してください ");
//			form1.SyokenNum.focus();
//			return false;
//		}

		if(Date.parse(form1.KitakuTo.value) < Date.parse(form1.KitakuFrom.value))
		{
			alert("寄託期日を正しく入力してください ");
			form1.KitakuFrom.focus();
			return false;
		}

		document.form1.Action.value=2;
		SubmitReal(form1);
		return true;
	}


	function SubmitCheck2()
	{
		document.form1.Action.value=3;
		SubmitReal(form1);
		return true;
	}
	
</script>
<SCRIPT FOR="window" EVENT="onload" LANGUAGE="JavaScript">
	form1.Basyo.select;
	form1.Basyo.focus();
	event.returnValue = false;
	return;
</SCRIPT>



<% = HtmlFooter %>
</html>

<%
End Sub
%>