<%@ page contentType="text/html; charset=UTF-8"%><%@ include file="/WEB-INF/jspf/include/taglibs.jsp"%>

<div class="bgToolBarButtons">
	<div><img src="${pageContext.request.contextPath}/img/left.png" height="32" onclick="showBlock( 'balanceRoot', 'balanceInfo', balanceQuery );"></div>
	<div class="bgMenu">
		<img src="${pageContext.request.contextPath}/img/filter.png" height="32">
		<ul style="left: -25px;">
			<li onclick="showBlock( 'balanceRoot', 'reserves', { ...balanceQuery, periodMonth: 6 } ); return false;">за последние 6 месяцев</li>
			<li onclick="showBlock( 'balanceRoot', 'reserves', { ...balanceQuery, periodMonth: 12 } ); return false;">за последние 12 месяцев</li>
			<li onclick="showBlock( 'balanceRoot', 'reserves', { ...balanceQuery, periodMonth: 36 } ); return false;">за последние 36 месяцев</li>
			<li onclick="showBlock( 'balanceRoot', 'reserves', { ...balanceQuery, periodMonth: 0 } ); return false;">за весь период действия договора</li>
		</ul>
	</div>
</div>
<div class="tile">
	<div class="flexRow titleBottomLine" style="align-items: center; margin-bottom: 2rem;"><span class="titleFont3">Резервы</span> <span class="paramColor">[<fmt:formatDate value="${balancePeriod.dateFrom}" dateStyle="SHORT"/> - <fmt:formatDate value="${balancePeriod.dateTo}" dateStyle="SHORT"/>]</span></div>
	<c:forEach var="item" varStatus="status" items="${balanceReserves}">
		<div class="flexRow" style="margin: 10px 5px 5px 10px; color: #555;">
			<div>
				<div><span style="font-weight: bold;">${balanceReserveTypes[item.typeId].guiTitle}</span></div>
				<div style="margin-top: 5px;" class="paramColor">Период: <span>${item.period}</span></div>
				<c:if test="${not empty item.dateClose}"><div style="margin-top: 5px;" class="paramColor">Дата закрытия: <span><fmt:formatDate value="${item.dateClose}" dateStyle="SHORT" /></span></div></c:if>
				<c:if test="${not empty item.comment}"><div style="margin-top: 5px;" class="paramColor">${item.comment}</div></c:if>
			</div>
			<div class="sum3"><fmt:formatNumber value="${item.sum}" groupingUsed="true" maxFractionDigits="2" minFractionDigits="2" currencyCode="" /><span class="CUR"/></div>
		</div>
		<c:if test="${not status.last}"><div class="line"></div></c:if>
	</c:forEach>
</div>