<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
	layout:decorate="~{admin/layout/layout}" th:with="title='',active='home'">
<th:block layout:fragment="html_head">
	<style>
		.tableserachwrap {
			justify-content: flex-start;
			margin: 20px;
		}
		.table input {
			width: auto;
		}
	</style>
	
	<script>
	
	
	
	function goSearch(pageNo){
		var form = document.searchVO;
		
		form.action = "/stat/reportday";
		form.submit();
	}
	</script>
</th:block>
<th:block layout:fragment="content">

	<div class="container-fluid">
		<div class="page-name">
			<h1>일간 통계</h1>
		</div>

		<div class="table">
			<!--<div class="head"><h6 class="bold">게임 회사별 수익 리스트</h6><span class="text">매일 새벽 5시에 통계내용이 갱신 됩니다.</span></div>-->
			<div class="body">
				<div class="tableserachwrap">
					<div></div>
					<div>
						<form class="searchWrap-form" name="searchVO">
							<ul class="tableserach">
								<li>
									<div class="input-group">
										<div>
											<label class="input-group-text">기간</label>
										</div>

										  <input type="date" name="startDate" th:value="${searchVO.startDate}"/>
                          				 <input type="date" name="endDate" th:value="${searchVO.endDate}"/>
									</div>
								</li>
								<li>
									<a class="btn" href="javascript:goSearch()">
										<i class="fas fa-search fa-sm text-white-50"></i>
									</a>
								</li>
							</ul>
						</form>
					</div>
				</div>
				<div class="table-responsive">
					<table class="center">
						<colgroup>
							<col width="20%">
							<col width="16%">
							<col width="16%">
							<col width="16%">
							<col width="16%">
							<col width="16%">
						</colgroup>
						<thead>
							<tr>
								<th>일자</th>
								<th>게임</th>
								<th>베팅</th>
								<th>승</th>
								<th>무</th>
								<th>취소</th>
								<th>수익금</th>
							</tr>
						</thead>
						<tbody>
						
								 <th:block th:each="list,seq : ${list}">
									<tr>
										<td th:text ="${list.dt}">에볼류션 카지노</td>
										<td th:text="${list.vendorName}">에볼류션 카지노</td>
										<td  th:text="|${#numbers.formatInteger(list.depositAmt, 0, 'COMMA')} |">123,456,789</td>
										<td th:text="|${#numbers.formatInteger(list.creditAmt, 0, 'COMMA')} |">123,456,789</td>
										<td>0</td>
										<td th:text="|${#numbers.formatInteger(list.cancelAmt, 0, 'COMMA')} |">0</td>
										<td th:text="|${#numbers.formatInteger(list.depositAmt - list.creditAmt  - list.cancelAmt, 0, 'COMMA')} |">0</td>
									</tr>
								
									</th:block>
								 <th:block th:each="list,seq : ${listSUM}">
									<tr class="repSum">
									<td th:text ="|${list.dt} 합계|">에볼류션 카지노</td>
										<td th:text ="|${list.category} 합계|">에볼류션 카지노</td>
										<td  th:text="|${#numbers.formatInteger(list.depositAmt, 0, 'COMMA')} |">123,456,789</td>
										<td th:text="|${#numbers.formatInteger(list.creditAmt, 0, 'COMMA')} |">123,456,789</td>
										<td>0</td>
										<td th:text="|${#numbers.formatInteger(list.cancelAmt, 0, 'COMMA')} |">0</td>
										<td th:text="|${#numbers.formatInteger(list.depositAmt - list.creditAmt  - list.cancelAmt, 0, 'COMMA')} |">0</td>
									</tr>
									
								</th:block>
							<th:block th:if="${list.size() ==0}">
								<tr>
									<td colspan="6">데이터가 없습니다</td>
								</tr>
							</th:block>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div><!-- container-fluid -->

</th:block>