<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>

<script src="IDC/js/setToken.js"></script>
<script type="text/javascript">
$(function()
{
	$("#deposit_amount").bind("input",function()
	{
		if(parseInt($(this).val())<0)
		{
			alert("입금액은 0이하로 갈 수 없습니다.");
			$(this).val(0);
		}				
	});
	
	$("form[name='form1']").submit(function(){
		var deposit_date = $("#deposit_date").val();
		var deposit_amount = $("#deposit_amount").val();
		var deposit_bank = $("#deposit_bank").val();
		var deposit_name = $("#deposit_name").val();
		
		if(deposit_date == "" || deposit_date == null || deposit_date == undefined){
			alert("입금일을 입력해주세요.");
			return false;
		}
		
		if(deposit_amount == "" || deposit_amount == null || deposit_amount == undefined){
			alert("입금액을 입력해주세요.");
			return false;
		}
		
		if(deposit_bank == "" || deposit_bank == null || deposit_bank == undefined){
			alert("입금 은행을 입력해주세요.");
			return false;
		}
		
		if(deposit_name == "" || deposit_name == null || deposit_name == undefined){
			alert("입금자를 입력해주세요.");
			return false;
		}
	});
});
</script>
<style type="text/css">
.inp{
	width:100%;
}
</style>



<style>

.table-responsive input[type="date"],
.table-responsive input[type="time"],
.table-responsive input[type="datetime-local"],
.table-responsive input[type="month"] {
  line-height: 12px;
  line-height: 1.42857143 \0;
}
.table-responsive input[type="date"].input-sm,
.table-responsive input[type="time"].input-sm,
.table-responsive input[type="datetime-local"].input-sm,
.table-responsive input[type="month"].input-sm {
  line-height: 12px;
  line-height: 1.5 \0;
}
.table-responsive input[type="date"].input-lg,
.table-responsive input[type="time"].input-lg,
.table-responsive input[type="datetime-local"].input-lg,
.table-responsive input[type="month"].input-lg {
  line-height: 12px;
  line-height: 1.33 \0;
}
_:-ms-fullscreen,
:root input[type="date"],
_:-ms-fullscreen,
:root input[type="time"],
_:-ms-fullscreen,
:root input[type="datetime-local"],
_:-ms-fullscreen,
:root input[type="month"] {
  line-height: 1.42857143;
}
_:-ms-fullscreen.input-sm,
:root input[type="date"].input-sm,
_:-ms-fullscreen.input-sm,
:root input[type="time"].input-sm,
_:-ms-fullscreen.input-sm,
:root input[type="datetime-local"].input-sm,
_:-ms-fullscreen.input-sm,
:root input[type="month"].input-sm {
  line-height: 1.5;
}
_:-ms-fullscreen.input-lg,
:root input[type="date"].input-lg,
_:-ms-fullscreen.input-lg,
:root input[type="time"].input-lg,
_:-ms-fullscreen.input-lg,
:root input[type="datetime-local"].input-lg,
_:-ms-fullscreen.input-lg,
:root input[type="month"].input-lg {
  line-height: 1.33;
}
</style>

<!-- 여기가 본 페이지이다 -->
<div class="row">
	<div class="col-lg-7">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h4><i class="fa fa-desktop fa-fw"></i> 입금 등록</h4>
			</div>
			<div class="panel-body">
   				<form name="form1" action="IdcDepositWrite.dep?curPage=1" method="POST">
   					<input type="hidden" id="token" name="token">
		   			<div class="table-responsive">		   			
						<table class="table table-bordered table-hover table-striped">
							<thead>
							</thead>
							<tbody>
								<tr>
									<td>고객코드</td>
									<td>
										<input type="text" readonly="readonly" name="client_code" value="${IdcClientDBTarget.client_code }">
									</td>
								</tr>
								<tr>
									<td>고객명</td>
									<td>
										<input type="text" readonly="readonly" name="client_name" value="${IdcClientDBTarget.client_name }">
									 </td>
								</tr>
								<tr>
									<td>날짜</td>
									<td>
										<input type="date" name="deposit_date" id="deposit_date" value="${IdcClientDBTarget.today}"> ( * 통장에 표시된 날짜 입력 )
									</td>
								</tr>
								<tr>
									<td>금액</td>
									<td><input type="number" id="deposit_amount" name="deposit_amount" ></td>
								</tr>
								<tr>
									<td>입금은행</td>
									<td id="SiteBank"></td>
								</tr>
								<tr>
									<td>입금자</td>
									<td><input type="text" name="deposit_name" id="deposit_name"> ( * 작업용 입금의 경우 개인 이름만 입력 / 예제 : 홍길동 )</td>
								</tr>
								<tr>
									<td>비고</td>
									<td><input type="text" name="deposit_note" class="inp"></td>
								</tr>
							</tbody>
							<tfoot>
							</tfoot>
						</table>
					</div>
					<!-- table-responsive -->
					<div class="btn-group">
						<input id="depositSub" class="btn btn-outline btn-primary" type="submit" value="입금 등록">
						<a href="IdcClientDBList.cli" class="btn btn-outline btn-default">돌아가기</a>
					</div>
				</form>
			</div>
			<!-- panel-body -->
		</div>
		<!-- panel panel-default -->
	</div>
	<!-- col-lg-12 -->
</div>
<!-- row -->
<!-- /#page-wrapper -->

