a5bd240321
Rule : - always format_date() before sending date to template - always format_date_in_iso immediatly after reading a date coming from a parameter - deal internally only with dates in iso Note that : - I could not test things related to issues stats due to the my DB -issues.issuedate not filled, see commit about 3.00.00.006 - acquisitions_stats does not work when you filter on date Signed-off-by: Joshua Ferraro <jmf@liblime.com>
131 lines
No EOL
4.7 KiB
Cheetah
131 lines
No EOL
4.7 KiB
Cheetah
<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->
|
|
<title>Koha › Acquisitions › Order search</title>
|
|
<!-- TMPL_INCLUDE NAME="doc-head-calendar.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="calendar.inc" -->
|
|
</head>
|
|
<body>
|
|
<!-- TMPL_INCLUDE NAME="header.inc" -->
|
|
<!-- TMPL_INCLUDE NAME="acquisitions-search.inc" -->
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › Order search</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
|
|
|
|
|
|
<h1>Order search</h1>
|
|
<div id="acqui_histsearch">
|
|
<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
|
|
<table>
|
|
<tr>
|
|
<th> </th>
|
|
<th>Title</th>
|
|
<th>Author</th>
|
|
<th>Supplier</th>
|
|
<th>Placed on</th>
|
|
<th>Recieved on</th>
|
|
<th>Quantity ordered</th>
|
|
<th>Unit cost</th>
|
|
<th> </th>
|
|
</tr>
|
|
<tr>
|
|
<th>Filter By:</th>
|
|
<th><input type="text" name="title" value="<!-- TMPL_VAR name="title"-->" /></th>
|
|
<th><input type="text" name="author" value="<!-- TMPL_VAR name="author" -->" /></th>
|
|
<th><input type="text" name="name" value="<!-- TMPL_VAR name="name" -->" /></th>
|
|
<th><label for="from">From</label> <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" border="0" id="openCalendarFrom" style="cursor: pointer;" alt="Show Calendar" />
|
|
<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 : "from",
|
|
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
|
|
button : "openCalendarFrom",
|
|
disableFunc : validate1,
|
|
dateStatusFunc : validate1
|
|
}
|
|
);
|
|
</script>
|
|
<label for="to">To</label> <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" alt="Show Calendar" />
|
|
<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 : "to",
|
|
ifFormat : "<!-- TMPL_VAR NAME="DHTMLcalendar_dateformat" -->",
|
|
button : "openCalendarTo",
|
|
disableFunc : validate2,
|
|
dateStatusFunc : validate2
|
|
}
|
|
);
|
|
</script></th>
|
|
<th> </th>
|
|
<th> </th>
|
|
<th> </th>
|
|
<th><input type="submit" value="Set Filter" /></th>
|
|
</tr>
|
|
<!-- TMPL_LOOP NAME="suggestions_loop" -->
|
|
<tr>
|
|
<td> <!-- TMPL_IF NAME="invoicenumber" -->
|
|
<a href="/cgi-bin/koha/acqui/parcel.pl?invoice=<!-- TMPL_VAR NAME="invoicenumber"-->&supplierid=<!-- TMPL_VAR NAME="id"-->&datereceived=<!-- TMPL_VAR NAME="datereceived" -->">Parcel</a>
|
|
<!-- TMPL_ELSE -->
|
|
|
|
<!-- /TMPL_IF -->
|
|
</td>
|
|
<td><a href="basket.pl?basketno=<!-- TMPL_VAR name="basketno" -->"><!-- TMPL_VAR NAME="title" --></a></td>
|
|
<td><!-- TMPL_VAR NAME="author" --></td>
|
|
<td><!-- TMPL_VAR NAME="name" --></td>
|
|
<td><!-- TMPL_VAR name="creationdate" --></td>
|
|
<td><!-- TMPL_VAR name="datereceived" --></td>
|
|
<td><!-- TMPL_VAR name="quantity" --></td>
|
|
<td><!-- TMPL_VAR name="ecost" --></td>
|
|
<td> </td>
|
|
</tr>
|
|
<!-- /TMPL_LOOP -->
|
|
</table>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="yui-b">
|
|
<!-- TMPL_INCLUDE NAME="acquisitions-menu.inc" -->
|
|
</div>
|
|
</div>
|
|
<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" --> |