<!DOCTYPE html> 
<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:th="http://www.thymeleaf.org"
	  xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	  layout:decorate="~{/web/layout/homeLayout}">
	<th:block layout:fragment="layout_css">
		<link rel="stylesheet" href="/css/web/stock_sub.css?v1.1">
		<link rel="stylesheet" href="/css/web/grid.css?v1.1">
	</th:block>

<th:block layout:fragment="layout_top_script">
<script src="/js/web/common_option.js"></script>
<script src="/js/web/jquery.twbsPagination.js" type="text/javascript"></script>
<script>
let menuClass     = "[[${param.menuClass}]]"==""?"":"[[${param.menuClass}]]";

let selectUseYn   = "[[${selectUseYn}]]"==""?"N":"[[${selectUseYn}]]";
let insertUseYn   = "[[${insertUseYn}]]"==""?"N":"[[${insertUseYn}]]";
let updateUseYn   = "[[${updateUseYn}]]"==""?"N":"[[${updateUseYn}]]";
let deleteUseYn   = "[[${deleteUseYn}]]"==""?"N":"[[${deleteUseYn}]]";
let downloadUseYn = "[[${downloadUseYn}]]"==""?"N":"[[${downloadUseYn}]]";

/* 검색 관련 변수 */
let stockSumSearchKeywordParam = "[[${param.stockSumSearchKeywordParam}]]";
let stockSumSort               = "[[${param.stockSumSort}]]";
let stockSumDir                = "[[${param.stockSumDir}]]";
let stockSumStart              = "[[${param.stockSumStart}]]"==""?0:"[[${param.stockSumStart}]]";
let stockSumLimit              = "[[${param.stockSumLimit}]]"==""?100:"[[${param.stockSumLimit}]]";

let stockSumTreatmentId        = "[[${param.stockSumTreatmentId}]]";
let stockSumCompanyId          = "[[${param.stockSumCompanyId}]]";

/* 검색 관련 변수 */
let stockSumHistorySearchKeywordParam = "[[${param.stockSumHistorySearchKeywordParam}]]";
let stockSumHistorySort               = "[[${param.stockSumHistorySort}]]";
let stockSumHistoryDir                = "[[${param.stockSumHistoryDir}]]";
// let stockSumHistoryStart              = "[[${param.stockSumHistoryStart}]]"==""?0:"[[${param.stockSumHistoryStart}]]";
// let stockSumHistoryLimit              = "[[${param.stockSumHistoryLimit}]]"==""?100:"[[${param.stockSumHistoryLimit}]]";

let muTreatmentId        = "[[${param.muTreatmentId}]]";
let muCompanyId          = "[[${param.muCompanyId}]]";
let muProductId          = "[[${param.muProductId}]]";

</script>
</th:block>
<th:block layout:fragment="layout_content">
<!-- 센터쪽 -->
<div class="center_box">
	<p class="page_title">현 재고 내역</p>

	<div class="total_list_box">
		<ul class="total_list">
			<li>
				<label>제품명<span>(단위)</span></label>
				<p class="number" id="productName"></p>
			</li>
			<li>
				<label>거래처</label>
				<p class="number" id="companyName"></p>
			</li>
			<li>
				<label>평균 입고단가</label>
				<p class="number alignRight" id="totalAvgPrice"></p>
			</li>
			<li>
				<label>재고 수량</label>
				<p class="number alignRight" id="totalQuantity"></p>
			</li>
			<li>
				<label>재고 총액(원)</label>
				<p class="number alignRight" id="totalAmount"></p>
			</li>
		</ul>
	</div>

	<div id="stockSumHistoryGrid" class="table_box ag-theme-balham"></div>


	<!-- 페이지게이션 -->
	<div class="page_box">
		<nav ria-label="Page navigation" class="navigation">
			<ul class="pagination" id="stockSumHistoryPagination"></ul>
		</nav>
	</div>
</div>
<form id="stockSumHistorySelectListForm" onsubmit="return false;"></form>
</th:block>
<th:block layout:fragment="layout_popup">
</th:block>
<th:block layout:fragment="layout_script">
<script src="/js/web/ag-grid-community-29.3.5.min.js"></script>
<script src="/js/web/stocksumhistory/stockSumHistorySelectList.js"></script>

</th:block>
</html>
