Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt
Marcel de Rooy ded520afdc Bug 9761: Make it possible to confirm future hold requests at checkin time
Description:

A new pref ConfirmFutureHolds is added. When confirming a hold at checkin time,
the number of days in this pref is taken into account when looking for reserves.
Note that this pref does not interfere with renewing, issuing or transferring
a book. For report Holds to pull, the default end date is calculated with this
new preference.
The use of ConfirmFutureHolds is useful only when future holds are allowed.

Test plan:
1) Enable future holds. Add a number of days into ConfirmFutureHolds.
2) Place a future hold within this number of days.
3) Run holds to pull report. Check default startdate and enddate.
4) Check this book in. Can you confirm the hold? Do not confirm.
5) Issue the book to another patron. You should not see a warning.
6) Renew the book for this patron via opac or staff. No warning either.
7) Check in again. Warning pops up again.
8) Transfer book. Switch branch. Check in. Hold found pops up. Do not confirm.
9) Back to first branch. Check in (with popup). Remove the hold. Add new future
hold past the number of days. Check in (no warn).

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-25 00:26:34 +00:00

185 lines
6.7 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Circulation &rsaquo; Holds to pull</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
<!-- Plugin datatables -->
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
<script type="text/JavaScript" language="JavaScript">
//<![CDATA[
$(document).ready(function() {
[% IF (dateformat == 'metric') %]
dt_add_type_uk_date();
[% END %]
var holdst = $("#holdst").dataTable($.extend(true, {}, dataTablesDefaults, {
}));
holdst.fnAddFilters("filter");
[%# add separateData function to cleanse jQuery select lists by breaking apart strings glued with BR tags and then de-duplicating any repeated library codes %]
function separateData ( ColumnData ){
var cD = ColumnData;
var new_array = new Array();
for ( j=0 ; j<cD.length ; j++ ) {
var split_array = cD[j].split(/<br>/gi);
for ( k=0 ; k<split_array.length ; k++ ){
var check_array = $.inArray(split_array[k], new_array);
if (check_array == -1) {
new_array.push(split_array[k]);
}
}
}
new_array.sort();
return new_array;
}
[%# add SeparateData function into createSelect function, so that it does the createSelect on clean data %]
function createSelect( data ) {
data = separateData(data);
var r='<select style="width:99%"><option value="">None</option>', i, len=data.length;
for ( i=0 ; i<len ; i++ ) {
r += '<option value="'+data[i]+'">'+data[i]+'</option>';
}
return r+'</select>';
}
$("#homebranchfilter").each( function () {
$(this).html( createSelect( holdst.fnGetColumnData(4) ) );
$('select', this).change( function () {
holdst.fnFilter( $(this).val(), 4 );
} );
} );
$("#itypefilter").each( function () {
$(this).html( createSelect( holdst.fnGetColumnData(8) ) );
$('select', this).change( function () {
holdst.fnFilter( $(this).val(), 8 );
} );
} );
$("#locationfilter").each( function () {
$(this).html( createSelect( holdst.fnGetColumnData(9) ) );
$('select', this).change( function () {
holdst.fnFilter( $(this).val(), 9 );
} );
} );
});
//]]>
</script>
</head>
<body id="circ_pendingreserves" class="circ">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Holds to pull</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h2>Holds to pull[% IF ( run_report ) %] placed between [% from %] and [% to %][% END %]</h2>
[% IF ( run_report ) %]
<h3>Reported on [% todaysdate %]</h3>
<p>The following holds have not been filled. Please retrieve them and check them in.</p>
<div class="searchresults">
[% IF ( reserveloop ) %]
<table id="holdst">
<thead>
<tr>
<th>Pull this many items</th>
<th>Items available</th>
<th>Patrons with holds</th>
<th>Title</th>
<th>Libraries</th>
<th>Available call numbers</th>
<th>Available copy No</th>
<th>Available enumeration</th>
<th>Available itypes</th>
<th>Available locations</th>
<th>Earliest hold date</th>
</tr>
</thead>
<tbody>
[% FOREACH reserveloo IN reserveloop %]
<tr>
[% IF ( reserveloo.borrowernumber ) %]
<td><p><b>[% reserveloo.pullcount %]</b></p></td>
<td>[% reserveloo.count %]</td>
<td>[% reserveloo.rcount %]</td>
<td>
<p>
[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
[% reserveloo.title |html %]
</a> [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author %]</p>[% END %]
</p>
</td>
[% ELSE %]
<td>"</td>
<td>"</td>
<td>"</td>
<td>"</td>
[% END %]
<td>[% reserveloo.holdingbranch %]</td>
<td><p>[% reserveloo.itemcallnumber %]</p></td>
<td><p>[% reserveloo.copyno %]</p></td>
<td><p>[% reserveloo.enumchron %]</p></td>
<td>[% reserveloo.itype %]</td>
<td>[% reserveloo.location %]</td>
<td width="15%">
<p>[% reserveloo.reservedate %]</p>
<p>in [% reserveloo.branch %]</p>
[% IF ( reserveloo.statusw ) %]<p>Waiting</p>[% END %][% IF ( reserveloo.statusf ) %]<p>Fullfilled</p>[% END %]
</td>
</tr>
[% END %]
</tbody>
<tfoot>
<tr>
<td><input type="text" class="filter" data-column_num="0" placeholder="Pull this many items" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="1" placeholder="Items available" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="2" placeholder="Patron holds" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="3" placeholder="Title" style="width:95%"/></td>
<td id="homebranchfilter"></td>
<td><input type="text" class="filter" data-column_num="5" placeholder="Call number" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="6" placeholder="Available copy" style="width:95%"/></td>
<td><input type="text" class="filter" data-column_num="7" placeholder="Available enumeration" style="width:95%"/></td>
<td id="itypefilter"></td>
<td id="locationfilter"></td>
<td></td>
</tr>
</tfoot>
</table>
[% ELSE %]
<b>No items found.</b>
[% END %]
</div>
[% END %]
</div>
</div>
<div class="yui-b">
<div id="filters">
<form action="/cgi-bin/koha/circ/pendingreserves.pl" method="post" >
<fieldset class="brief">
<h4>Refine results</h4>
<ol>
<li>
<label for="from">
Start date:
</label>
<input type="text" size="10" id="from" name="from" value="[% from %]" class="datepickerfrom" />
</li>
<li><label for="to">
End date:
</label>
<input type="text" size="10" id="to" name="to" value="[% to %]" class="datepickerto" />
</li>
</ol>
<p><i>(Inclusive, default is [% HoldsToPullStartDate %] days ago to [% IF ( HoldsToPullEndDate ) %][% HoldsToPullEndDate %] days ahead[% ELSE %]today[% END %], set other date ranges as needed. )</i></p>
<fieldset class="action"><input type="submit" name="run_report" value="Submit" class="submit"/></fieldset>
</fieldset>
</form>
</div>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]