<!-- include 'header' -->
<script src="<?= WEB_SITE_GLOBAL ?>js/invoice.js"></script>
<link href="<?= WEB_SITE_GLOBAL ?>css/datepicker.min.css" rel="stylesheet" type="text/css">
<script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.min.js"></script>
<script src="<?= WEB_SITE_GLOBAL ?>js/datepicker.zh.js"></script>
<body>
	<div class="mainLayout">
		<div class="mainMenu">
			<div class="menuItem">
				<a href="#" class="mLogo">CLD</a>
				<ul>
					<!-- include 'menuReceipt' -->
				</ul>
			</div>
			
		</div>
		<div class="warpContent">
			<div class="subMenu fL">
				<div class="menuItem">
					<!-- include 'invoiceMenu' -->
				</div>
			</div>
			<div class="adminContent autoHeight">
				<legend>
					全年开票应收款汇总
				</legend>
				<div class="demandCate">
				<form action="/invoiceAggregateCompanyDetail/1/{{status}}" id="iaa" method="get">
					<ul class="cateList">
						<li>
						<select onchange="javascript:location.href=this.value;">
						<option <!-- if {{status}}=='All' --> selected <!-- endif --> value="/invoiceAggregateCompanyDetail">所有</option>
						<option <!-- if {{status}}=='UNRECORD' --> selected <!-- endif --> value="/invoiceAggregateCompanyDetail/1/UNRECORD">未入账</option>
						<option <!-- if {{status}}=='RECORD' --> selected <!-- endif --> value="/invoiceAggregateCompanyDetail/1/RECORD">已入账</option>
						<option <!-- if {{status}}=='PARTRECORD' --> selected <!-- endif --> value="/invoiceAggregateCompanyDetail/1/PARTRECORD">部分入账</option>
						</select>
						</li>
						<li>
						<select name="cidKey" node-invoicetype >
							<option <!-- if {{cidKey}}=='' --> selected <!-- endif --> value="ALL" >所有</option>
							<!-- loop categoryList -->
							<option <!-- if {{categoryList' value.cidKey}}=={{cidKey}} --> selected <!-- endif --> value="{{categoryList' value.cidKey}}">{{categoryList' value.title}}</option>
							<!-- endloop -->
						</select>&nbsp;
						
						<select name="sidKey" node-invoicetype>
							<option <!-- if {{sid}}=='' --> selected <!-- endif --> value="ALL" >所有</option>
	  						<!-- loop staffList -->
	  							<option <!-- if {{staffList' value.sid}}=={{sid}} --> selected <!-- endif --> value="{{staffList' value.sidKey}}">{{staffList' value.username}}</option>
	  						<!-- endloop -->
	  						</select>
						</li>
						
						<li>
						<select name="year" node-invoicetype >
						<option value="ALL">所有</option>
						<!-- include 'year' -->
						</select>&nbsp;
						<select name="month" node-invoicetype >
						
						<option value="ALL">全年</option>
						{{monthHtml}}
						</select>
						</li>
						
						<li>
					
						<select name="invoiceElement" node-invoicetype >
						<option value="ALL">所有开票内容</option>
						<!-- include 'invoiceElement' -->
						</select>
						</li>
						
						<li>开票数量：<b>{{page.total_data}}</b> 张</li>
						<li>开票总计：￥{{ics.invoicePrice}}</li>
						<li>应收款总计：<span class="colGreen">￥{{ics.diffPrice}}</span></li>
						<li>已入账总计：￥{{ics.receivablesPrice}}</li>
					</ul>
				</form>
				</div>
				<div class="saeaList">
					<div class="entry" style="margin-bottom:0;">
					<script type="text/javascript">$(document).ready(function() {
						// $('#invoiceTable').fixedHeaderTable({ fixedColumns:1 });
					});</script>
					<table class="table table-bordered table-condensed table-hover fancyTable" id="invoiceTable">
						<thead>
							<tr><th class="taC">开票流水号</th><th class="taC">开票金额</th><th class="taC">开票单位（抬头）</th><th class="taC">开票内容</th><th class="taC">发票号</th><th class="taC">收款流水号</th><th class="taC">收款金额</th><th class="taC">应收款金额</th><th class="taC">申请人</th><th class="taC">出票时间</th></tr>
						</thead>
						<tbody>
						
							<!-- loop list -->
						<tr>
						
						<td><a href="#invdetail" node-invoice='INFO' data-isKey="{{list' value.iidKeyK}}" data-toggle="modal">{{list' value.invoiceSerial}}</a></td>
						<td>
								<!-- if !empty({{list' value.invoiceType}}) -->
	                        	<b>￥{{list' value.invoicePrice}}</b><sup>专</sup>
	                          <!-- else -->
	                          <b>￥{{list' value.invoicePrice}}</b>
	                          <!-- endif -->
							</td>
						<td>
								<!-- if !empty({{list' value.invoiceType}}) -->
	                                   	{{list' value.invoiceCompany}}
	                                    <!-- else -->
	                                    {{list' value.invoiceTitle}}
	                                    <!-- endif -->
							</td>
						<td>{{list' value.invoiceElement}}</td>
						<td>{{list' value.invoiceNo}}</td>
						<td>
							<!-- loop list' value.irList -->
							<a href="#billing" node-invoice='INFO' data-type="receivables" data-isKey="{{list' value' value.iridKeyK}}" data-toggle="modal">{{list' value' value.receivablesSerial}}</a>&nbsp;
							<!-- endloop -->
							</td>
						
						<td>
							<!-- if {{list' value.sumPrice}}==0 -->
							<!-- elseif {{list' value.sumPrice}}=={{list' value.invoicePrice}} -->
							<b >￥{{list' value.sumPrice}}</b>
							<!-- elseif {{list' value.sumPrice}}>{{list' value.invoicePrice}} -->
							<b class="colOrange">￥{{list' value.sumPrice}}</b>
							<!-- elseif {{list' value.sumPrice}}<{{list' value.invoicePrice}} -->
							<b class="colRed">￥{{list' value.sumPrice}}</b>
							<!-- endif -->
							</td>
						
						<td>
						<!-- if {{list' value.diffPrice}}!=0 -->
						{{list' value.diffPrice}}
						<!-- endif -->
						</td>
						<td>{{list' value.categoryName}}-{{list' value.userName}}</td>
							
							<td>
							{{list' value.printTime}}
							</td>
							
						</tr>
						<!-- endloop -->
						</tbody>
					</table>
				</div>
					</div>
					
					
					<div class="demandPage">
					<ul class="pagination fL">
					<li><a href="/invoiceAggregateCompanyDetail/1{{get}}">&laquo;</a></li>
	  							<!-- if {{page.previous}}==0 -->
								<li><a href="javascript:void(0)" title="上一页">&lt;</a></li>
								<!-- else -->
								<li><a href="/invoiceAggregateCompanyDetail/{{page.previous}}{{get}}" title="上一页">&lt;</a></li>
								<!-- endif -->	
								
	  							<!-- if {{page.on_page}}>=3 -->
	  							<li><a href="/invoiceAggregateCompanyDetail/1{{get}}" title="上一页">1</a></li>
	  							<li class="point"><span>...</span></li>
	  							<!-- endif -->
	  							{{page.page}}
	  							<!-- if {{page.on_page}}<3 && {{page.total_page}}>5 -->
	  							<li><a href="/invoiceAggregateCompanyDetail/4{{get}}" >4</a></li>
	  							<li><a href="/invoiceAggregateCompanyDetail/5{{get}}" >5</a></li>
	  							<!-- endif -->
	  							
	  							<!-- if {{page.total_page}}>3&&{{page.total_page}}!={{page.on_page}} -->
	  							<li class="point"><span>...</span></li>
			  					<!-- endif -->
			  					
			  					<!-- if {{page.next}}=={{page.on_page}} -->
								<li><a href="javascript:void(0)" title="下一页">&gt;</a></li>
								<!-- else -->
								<li><a href="/invoiceAggregateCompanyDetail/{{page.next}}{{get}}" title="下一页">&gt;</a></li>
								<!-- endif -->
								
			  					<li><a href="/invoiceAggregateCompanyDetail/{{page.total_page}}{{get}}">&raquo;</a></li>
			  		</ul>
			  	</div>	
					
			</div>
		</div>
	</div>
	
	<div loading-msg='true' style="position:absolute;  left:50%;  top:50%;  "></div>
	
	<div class="modal  fade" id="invdetail">
		<div id="nc"></div>
	</div>
	<div class="modal  fade" id="billing">
		<div id="nr"></div>
	</div>
<script type="text/javascript">autoFlashHeight();</script>
</body>
