<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- 採訪: 訂單查詢<!-- TMPL_INCLUDE NAME="doc-head-close-calendar.inc" -->
<!-- TMPL_INCLUDE name="masthead.inc" -->
<!-- TMPL_INCLUDE NAME="acqui-full-topmenu.inc" -->
<!-- TMPL_INCLUDE name="intranet-nav.inc" -->

<div id="main">
	<h1>訂單查詢</h3>
	<div class="results"><!-- TMPL_VAR Name ="numresults" --> 找到的訂單。</div>
	<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
	<div class="data">
	<table>
		<thead><tr>
			<th scope="col">&nbsp;</th>
			<th scope="col">供應商</th>
			<th scope="col">題名/作者</th>
			<th scope="col">館藏地</th>
			<th scope="col">驗收者</th>
			<th scope="col">訂單數量</th>
			<th scope="col">驗收數量</th>
			<th scope="col">單位花費</th>
			<th scope="col">&nbsp;</th>
		</tr>
		<tr>
			
				<th scope="col">過濾依照:</th>
				<th scope="col"><input type="text" name="name" value="<!-- TMPL_VAR name="name" -->" /></th>
				<th scope="col"><input type="text" name="title" value="<!-- TMPL_VAR name="title"-->" /> <input type="text" name="author" value="<!-- TMPL_VAR name="author" -->" /></th>
				<th scope="col">					從 <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" border="0" hspace="0" vspace="0" id="openCalendarFrom" style="cursor: pointer;" valign="top">
					<input type="text" readonly="readonly" size="10" id="from" name="fromplacedon" value="<!-- TMPL_VAR name="from_placed_on" -->">
					<script language="JavaScript" type="text/javascript">
						function validate1(date) {
							var day = date.getDate();
							var month = date.getMonth() + 1;
							var year = date.getFullYear();
							var weekDay = date.getDay();
							var dayMonth = month + '-' + day;
							var dateString = year + '-' + month + '-' + day;
							var dateTo = document.getElementById('to').value.split("-");
							var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]);
							if (date > limitDate) {
								return true;
							} else {
								return false;
							}
						}
						Calendar.setup(
							{
								inputField : "從",
								ifFormat : "%Y-%m-%d",
								button : "openCalendarFrom",
								disableFunc : validate1,
								dateStatusFunc : validate1
							}
						);
					</script><br />
					到 <img src="<!-- TMPL_VAR Name="themelang" -->/includes/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" border="0" />
					<input readonly="readonly" size="10" id="to" name="toplacedon" value="<!-- TMPL_VAR name="to_placed_on" -->" type="text" />
					<script type="text/javascript">
						function validate2(date) {
							var day = date.getDate();
							var month = date.getMonth() + 1;
							var year = date.getFullYear();
							var weekDay = date.getDay();
							var dayMonth = month + '-' + day;
							var dateString = year + '-' + month + '-' + day;
							var dateFrom = document.getElementById('from').value.split("-");
							var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]);
							if (limitDate > date) {
								return true;
							} else {
								return false;
							}
						}

						Calendar.setup(
							{
								inputField : "到",
								ifFormat : "%Y-%m-%d",
								button : "openCalendarTo",
								disableFunc : validate2,
								dateStatusFunc : validate2
							}
						);
					</script></th>
				<th scope="col">&nbsp;</th>
				<th scope="col">&nbsp;</th>
				<th scope="col">&nbsp;</th>
				<th scope="col">&nbsp;</th>
				<th scope="col"><input type="submit" class="submit" value="設定過濾" /></th>
		</tr></thead>
		<tfoot><tr>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td>&nbsp;</td>
			<td class="total"><!-- TMPL_VAR name="total_qty" --></td>
			<td class="total"><!-- TMPL_VAR name="total_qtyreceived" --></td>
			<td class="total"><!-- TMPL_VAR name="total_price" --></td>
			<td>&nbsp;</td>
		</tr></tfoot>
		<tbody>
		<!-- TMPL_LOOP NAME="suggestions_loop" -->
			<!-- TMPL_IF name="toggle" -->
					<tr class="highlight">
				<!-- TMPL_ELSE -->
					<tr>
				<!-- /TMPL_IF -->
				<td><!-- TMPL_VAR NAME="count" --></td>
				<td><!-- TMPL_VAR NAME="name" --></td>
				<td><a href="basket.pl?basket=<!-- TMPL_VAR name="basketno" -->"><!-- TMPL_VAR NAME="title" --></a><!-- TMPL_IF NAME="author" -->, by <!-- TMPL_VAR NAME="author" --><!-- /TMPL_IF -->
				</td>
				<td><!-- TMPL_VAR name="creationdate" --></td>
				<td><!-- TMPL_VAR name="datereceived" --></td>
				<td><!-- TMPL_VAR name="quantity" --></td>
				<td><!-- TMPL_VAR NAME="quantityreceived" --></td>
				<td class="credit"><!-- TMPL_VAR name="ecost" --></td>
				<td>&nbsp;</td>
			</tr>
		<!-- /TMPL_LOOP -->
	</tbody>			
	</table></div></form>
</div>
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
