<!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;
			text-indent: 0px;
		}
	</style>
	
	<script>

	function goSearch(pageNo){
		var form = document.searchVO;
		
		form.action = "/stat/reportmonth";
		form.submit();
	}
	</script>
</th:block>
<th:block layout:fragment="content">

	<div class="container-fluid">
		<div class="page-name">
			<h1>1월간 통계</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 class="mr10">
			                      <div class="input-group">
			                        <div>
			                          <label class="input-group-text">기간</label>
			                        </div>
			                        <i class="fa fa-caret-left" aria-hidden="true"></i>
			                        <select name="year" >
			                        	<option th:selected="${searchVO.year eq '2022'}" value="2022">2022</option>                     
			                        	<option th:selected="${searchVO.year eq '2023'}" value="2023">2023</option>
			                        	<option th:selected="${searchVO.year eq '2024'}" value="2023">2023</option>
			                        </select>
			                        <select name="month">
			                        	<option  th:selected="${searchVO.month eq '01'}" value="01">1</option>
			                        	<option  th:selected="${searchVO.month eq '02'}" value="02">2</option>
			                        	<option  th:selected="${searchVO.month eq '03'}" value="03">3</option>
			                        	<option  th:selected="${searchVO.month eq '04'}" value="04">4</option>
			                        	<option  th:selected="${searchVO.month eq '05'}" value="05">5</option>
			                        	<option  th:selected="${searchVO.month eq '06'}" value="06">6</option>
			                        	<option  th:selected="${searchVO.month eq '07'}" value="07">7</option>
			                        	<option  th:selected="${searchVO.month eq '08'}" value="08">8</option>
			                        	<option  th:selected="${searchVO.month eq '09'}" value="09">9</option>
			                        	<option  th:selected="${searchVO.month eq '10'}" value="10">10</option>
			                        	<option  th:selected="${searchVO.month eq '11'}" value="11">11</option>
			                        	<option  th:selected="${searchVO.month eq '12'}" value="12">12</option>
			                        </select>
			                        <i class="fa fa-caret-right" aria-hidden="true"></i>
			                      </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="5%">
							<col width="20%">
							<col width="15%">
							<col width="15%">
							<col width="15%">
							<col width="15%">
							<col width="15%">
						</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>