Bug 14224: Allow patron notes about item shown at check in
[koha_ffzg] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / returns.tt
1 [% USE KohaDates %]
2 [% USE Branches %]
3 [% USE Koha %]
4 [% USE Borrowers %]
5 [% USE ItemTypes %]
6 [% USE AuthorisedValues %]
7 [% USE ColumnsSettings %]
8
9 [% BLOCK display_bormessagepref %]
10     [% IF ( bormessagepref ) %]
11         <li>Patron notification:
12             [% FOREACH mtt IN bormessagepref.keys %]
13                 [%~ IF ( mtt == 'email' ) %] Email[% END ~%]
14                 [%~ IF ( mtt == 'phone' ) %] Phone[% END ~%]
15                 [%~ IF ( mtt == 'sms' ) %] SMS[% END ~%]
16                 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
17             [% END %]
18         </li>
19            [% ELSE %]
20         <li>Patron is not notified.</li>
21     [% END %]
22 [% END %]
23
24 [% BLOCK display_holdpatron_address %]
25     [% IF Koha.Preference( 'AddressFormat' ) %]
26         [% INCLUDE "member-display-address-style-${ Koha.Preference( 'AddressFormat' ) }.inc" %]
27     [% ELSE %]
28         [% INCLUDE 'member-display-address-style-us.inc' %]
29     [% END %]
30 [% END %]
31
32 [% INCLUDE 'doc-head-open.inc' %]
33 <title>Koha &rsaquo; Circulation &rsaquo; Check in [% title |html %]</title>
34 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
35 [% INCLUDE 'doc-head-close.inc' %]
36 [% INCLUDE 'datatables.inc' %]
37 [% INCLUDE 'columns_settings.inc' %]
38 [% INCLUDE 'calendar.inc' %]
39 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
40 [% INCLUDE 'timepicker.inc' %]
41
42 <script type="text/javascript">
43 //<![CDATA[
44 function Dopop(link) {
45     var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
46     $("#barcode").focus();
47 }
48 $(document).ready(function () {
49     $(".modal").modal({ backdrop: 'static' }).on('shown', function() {
50         $("#barcode").prop("disabled", true);
51     }).on('hidden', function() {
52         $("#barcode").prop("disabled", false).focus();
53     });
54
55     [% IF print_slip %]
56         Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]');
57     [% END %]
58
59     var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %]
60     var returns_table = KohaTable("#checkedintable", {
61             "bFilter":false,
62             "bPaginate":false,
63             "bInfo":false,
64             "bSort":false,
65             "dom": 'B<"clearfix">t',
66             }, columns_settings);
67
68     $("#return_date_override").datetimepicker({
69         onClose: function(dateText, inst) {
70             if (validate_date(dateText, inst) ) {
71                 $("#barcode").focus();
72             }
73         },
74         defaultDate: -1,
75         hour: 23,
76         minute: 59,
77         maxDate: 0
78     }).on("change", function(e, value) {
79         if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
80     });
81     $("#return_date_override").on("blur", function() {
82             check_valid_return_date();
83     });
84     $("#checkin-form").submit(function( event ) {
85         if ( !check_valid_return_date() ) {
86             event.preventDefault();
87         }
88     });
89
90     function check_valid_return_date() {
91         if ( $("#return_date_override").val() ) {
92             var datetime = DateTime_from_syspref( $("#return_date_override").val() );
93             var now = new Date();
94             if ( !datetime || datetime > now ) {
95                 alert("Invalid return date/time!");
96                 $("#return_date_override").val("")
97                 return false;
98             }
99         }
100         return true;
101     }
102
103     $("#exemptcheck").change(function () {
104         if (this.checked == true) {
105             $("#barcode").addClass("alert");
106             $("#exemptfines").show();
107         } else {
108             $("#barcode").removeClass("alert");
109             $("#exemptfines").hide();
110         }
111         $("#barcode").focus();
112     });
113     $("#dropboxcheck").change(function () {
114         if (this.checked == true) {
115             $("#barcode").addClass("alert");
116             $("#dropboxmode").show();
117
118             $("#return_date_override_fields :input").prop('disabled', true);
119             $("#return_date_override").datetimepicker("disable");
120         } else {
121             $("#barcode").removeClass("alert");
122             $("#dropboxmode").hide();
123
124             $("#return_date_override_fields :input").prop('disabled', false);
125             $("#return_date_override").datetimepicker("enable");
126         }
127         $("#barcode").focus();
128     });
129     $("#forgivemanualholdsexpire").change(function () {
130         if (this.checked == true) {
131             $("#barcode").addClass("alert");
132             $("#forgivemanualholdsexpire-alert").show();
133         } else {
134             $("#barcode").removeClass("alert");
135             $("#forgivemanualholdsexpire-alert").hide();
136         }
137         $("#barcode").focus();
138     });
139     [% IF(overduecharges) %] $("#barcode").focus(function () {
140         if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) {
141             $("#barcode").addClass("alert");
142         } else {
143             $("#barcode").removeClass("alert");
144         }
145     });
146     $("#barcode").blur(function () {
147         $("#barcode").removeClass("alert");
148     });
149     [% END %]
150     $('.openWin').on("click",function(e){
151         Dopop( $(this).data("url") );
152     });
153 });
154 //]]>
155 </script>
156 </head>
157 <body id="circ_returns" class="circ">
158 <span class="audio-alert-success"></span>
159
160 [% INCLUDE 'header.inc' %]
161 [% INCLUDE 'checkin-search.inc' %]
162
163 <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; Check in</div>
164
165 [% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc" class="yui-t7">[% END %]
166
167 <div id="bd">
168 <div id="yui-main">
169 [% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
170 <div class="yui-g">
171
172 [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
173     <div class="dialog alert"><strong>Error:</strong> This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.</div>
174 [% ELSIF NOT Koha.Preference('AnonymousPatron') AND Koha.Preference('OPACPrivacy') %]
175     <div class="dialog alert"><strong>Error:</strong> The system preference OPACPrivacy is set but AnonymousPatron is not! Please correct this before continuing circulation.</div>
176 [% END %]
177
178 [% IF additional_materials %]
179     <div class="dialog message" id="materials">Note about the accompanying materials: <br />
180     [% additional_materials %]
181     </div>
182 [% END %]
183
184 [% IF ( collectionItemNeedsTransferred ) %]
185  <div id="rotating-collection" class="dialog message">
186         <h3>Please transfer item to: [% Branches.GetName( collectionBranch ) %]</h3>
187             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
188             <p>This item is part of a rotating collection.</p>
189             <p><button type="button" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&amp;branchcode=[% collectionBranch %]&amp;op=slip"><i class="fa fa-print"></i> Print slip</button></p>
190 </div>
191 [% END %]
192
193 <!-- Patron has added an issue note -->
194 [% IF ( issue.note) %]
195     <div class="dialog message">
196         <h1>Patron note</h1>
197         <p>[% issue.notedate | $KohaDates %]</p>
198         <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]"> [% title |html %]</a> [% author %]</p>
199         <p>[% issue.note %]</p>
200     </div>
201 [% END %]
202
203 <!-- Patron has fines -->
204 [% IF ( fines ) %]
205     <div class="dialog alert">
206         <h3>Patron has outstanding fines of [% fines %].</h3>
207         <p><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% fineborrowernumber %]">Make payment</a>.</p>
208     </div>
209 [% END %]
210
211 <!-- Patron has waiting holds -->
212 [% IF ( waiting_holds ) %]
213     <div id="awaiting-pickup" class="dialog message">
214         <h3>[% holdsfirstname %] [% holdssurname %] has [% waiting_holds %] hold(s) waiting for pickup.</h3>
215         <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber %]">Check out to this patron</a>.</p>
216     </div>
217 [% END %]
218
219 <!-- Patron is restricted and checkin was backdated -->
220 [% IF return_date_was_overriden && Borrowers.IsDebarred( borrower ) %]
221     <div id="restricted_backdated" class="dialog message">
222         <h3>
223             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">
224                 [% borrower.firstname %] [% borrower.surname %]
225             </a>
226             is restricted. Please verify this patron should still be restricted.
227         </h3>
228     </div>
229 [% END %]
230
231 [% IF ( wrongbranch ) %]
232     <div class="dialog alert"><h3>Cannot check in</h3>
233         <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
234         </p><strong>NOT CHECKED IN</strong></p>
235         <p>This item must be checked in at following library: <strong>[% Branches.GetName( rightbranch ) %]</strong></p>
236     </div>
237 [% END %]
238 <!-- case of a mistake in transfer loop -->
239 [% IF ( WrongTransfer ) %]
240     <div id="return2" class="dialog message">
241         <!-- WrongTransfer -->
242         <h3>Please return item to: [% Branches.GetName( TransferWaitingAt ) %]</h3>
243             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
244         <button type="submit" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% TransferWaitingAt %]&amp;op=slip"><i class="fa fa-print"></i> Print transfer slip</button>
245         <button class="deny" type="submit" onclick="window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button>
246 [% IF ( wborcnum ) %]<h5>Hold for:</h5>
247         <ul>
248             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
249             [% borsurname %], [% borfirstname %]</a> ([% borcnum %]) <span class="patron-category"> - [% wborcategory %]</span> </li>
250             [% INCLUDE display_holdpatron_address %]
251             [% IF ( wborphone ) %]<li>[% wborphone %]</li>[% END %]
252             [% IF ( wboremail ) %]<li><a id="boremail" href="mailto:[% wboremail %]">[% wboremail %]</a></li>[% END %]
253         </ul>
254
255     <form method="post" action="returns.pl" class="confirm">
256             <input type="hidden" name="WT-itemNumber" value="[% WrongTransferItem %]" />
257             <input type="hidden" name="WT-waitingAt" value="[% TransferWaitingAt %]" />
258             <input type="hidden" name="WT-From" value="[% wtransfertFrom %]" />
259             <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
260             <input type="hidden" name="print_slip" value="0" />
261             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
262             <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
263             <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and confirm</button>
264         <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
265         <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
266     </form>
267     [% END %]</div>
268 [% END %]
269
270 [% IF ( found ) %]
271     [% IF ( waiting ) %]
272         <div id="hold-found1" class="modal fade audio-alert-action">
273             <div class="modal-dialog">
274             <div class="modal-content">
275             <form method="post" action="returns.pl" class="confirm">
276                 <div class="modal-header">
277                     <h3>
278                         Hold found (item is already waiting):
279                         <br/>
280                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">
281                             [% itembarcode |html %]: [% title |html %]
282                         </a>
283                     </h3>
284                 </div>
285
286                 <div class="modal-body">
287                     [% IF ( reservenotes ) %]
288                         <h4>Notes: [% reservenotes %]</h4>
289                     [% END %]
290
291                     <h4>Hold for:</h4>
292                     <ul>
293                     <li>
294                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])
295                         <span class="patron-category"> - [% borcategory %]</span>
296                     </li>
297                     [% INCLUDE display_holdpatron_address %]
298                     [% IF ( borphone ) %]
299                         <li> [% borphone %]</li>
300                     [% END %]
301
302                     [% IF ( boremail ) %]
303                         <li><a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a></li>
304                     [% END %]
305
306                     [% IF ( debarred ) %]
307                         <li class="error">Patron is RESTRICTED</li>
308                     [% END %]
309
310                     [% IF ( gonenoaddress ) %]
311                         <li class="error">Patron's address is in doubt</li>
312                     [% END %]
313                     </ul>
314
315                     [% IF ( transfertodo ) %]
316                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) %]</h4>
317                     [% ELSE %]
318                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) %]</h4>
319                     [% END %]
320
321                     [% FOREACH inputloo IN inputloop %]
322                         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
323                         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
324                         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
325                     [% END %]
326
327                     <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
328                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
329                     <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
330                     <input type="hidden" name="reserve_id" value="[% reserve_id %]" />
331                     <input type="hidden" name="diffBranch" value="[% destbranch %]" />
332                     <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
333                     <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
334                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
335
336                     <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
337                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
338                 </div>
339
340                 <div class="modal-footer">
341                     <input type="hidden" name="cancel_reserve" value="0" />
342
343                     <button type="submit" class="btn btn-default approve">
344                         <i class="fa fa-check"></i> Confirm
345                     </button>
346
347                     <input type="hidden" name="print_slip" value="0" />
348                     <button type="submit" class="btn btn-default print" onclick="this.form.print_slip.value = 1; this.form.submit();">
349                         <i class="fa fa-print"></i> Print and confirm
350                     </button>
351
352                     <button type="submit" class="btn btn-default deny" onclick="this.form.cancel_reserve.value = 1; this.form.submit();">
353                         <i class="fa fa-times"></i> Cancel hold
354                     </button>
355                 </div>
356             </form>
357            </div>
358            </div>
359         </div>
360     [% END %]
361
362     [% IF ( diffbranch ) %]
363                 <!-- diffbranch -->
364         <div id="transfer-needed" class="dialog message audio-alert-action">
365             <h3>Hold needing transfer found</h3>
366                 <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
367                 <h4>Hold for: </h4>
368                     <ul>
369                         <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %]) <span class="patron-category"> - [% wborcategory %]</span> </li>
370                         [% INCLUDE display_holdpatron_address %]
371                         [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
372                         [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
373 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
374 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
375                     </ul>
376         [% IF ( transfertodo ) %]
377             <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) %]</h4>
378         [% ELSE %]
379             <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) %]</h4>
380         [% END %]
381
382         <form method="post" action="returns.pl" class="confirm">
383             <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
384             <input type="hidden" name="print_slip" value="0" />
385             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
386             <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
387             <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and continue</button>
388             [% FOREACH inputloo IN inputloop %]
389                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
390                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
391                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
392             [% END %]
393             <input type="hidden" name="diffBranch" value="[% destbranch %]" />
394             <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
395             <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
396             <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
397             <input type="hidden" name="barcode" value="0" />
398
399             <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
400             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
401         </form>
402                 </div>
403     [% END %]
404
405     [% IF ( transfer ) %]
406     <!-- transfer: item with no reservation, must be returned according to home library circulation rules -->
407         <div id="return1" class="dialog message audio-alert-action">
408             <h3>Please return item to: [% Branches.GetName( returnbranch ) %]</h3>
409             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
410             <p><button type="button" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&amp;branchcode=[% returnbranch %]&amp;op=slip"><i class="fa fa-print"></i> Print slip</button></p>
411         </div>
412     [% END %]
413
414     [% IF ( needstransfer ) %]
415         <!-- needstransfer -->
416     <div id="item-transfer" class="dialog message audio-alert-action"><h3> This item needs to be transferred to [% Branches.GetName( returnbranch ) %]</h3>
417     Transfer now?<br />
418     <form method="post" action="returns.pl" name="mainform" id="mainform">
419     [% IF itemnumber %]
420         <button type="submit" name="dotransfer" value="Yes" class="print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% returnbranch %]&amp;op=slip"><i class="fa fa-print"></i> Yes, print slip</button>
421     [% END %]
422     <button type="submit" name="dotransfer" value="Yes" class="submit"><i class="fa fa-check"></i> Yes</button>
423     <button type="submit" name="notransfer" value="No" class="submit"><i class="fa fa-times"></i> No</button>
424     <input type="hidden" name="tobranch" value="[% returnbranch %]" />
425         <input type="hidden" name="transferitem" value="[% itemnumber %]" />
426         <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
427         <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
428         <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
429         [% FOREACH inputloo IN inputloop %]
430         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
431         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
432         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
433         [% END %]
434         <input type="hidden" name="barcode" value="0" />
435         <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
436         <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
437         </form>   </div>
438     [% END %]
439
440     [% IF ( diffbranch ) %]
441         <!-- diffbranch -->
442         <h3 class="audio-alert-action">Item consigned:</h3>
443         <table>
444         <caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a></caption>
445         <tr>
446             <th>Hold for:</th>
447             <td>[% name %]</td>
448         </tr>
449         </table>
450         <form method="post" action="returns.pl"><input type="submit" value="OK" />
451             [% FOREACH inputloo IN inputloop %]
452                 [% UNLESS ( inputloo.first ) %]
453                     <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
454                     <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
455                     <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
456                 [% END %]
457             [% END %]
458
459             <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
460             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
461
462             <input type="hidden" name="barcode" value="0" />
463         </form>
464     [% END %]
465
466
467     <!-- case of simple return no issue or transfer but with a reservation  -->
468     [% IF ( reserved ) %]
469         <!--  reserved  -->
470         <div id="hold-found2" class="modal fade audio-alert-action">
471             <div class="modal-dialog">
472             <div class="modal-content">
473             <form method="post" action="returns.pl" class="confirm">
474                 <div class="modal-header">
475                     <h3>
476                         Hold found:
477                         <br/>
478                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">
479                             [% itembarcode |html %]: [% title |html %]
480                         </a>
481                 </div>
482
483                 <div class="modal-body">
484                     [% IF ( reservenotes ) %]
485                         <h4>Notes: [% reservenotes %]</h4>
486                     [% END %]
487                     <h5>Hold for:</h5>
488                         <li>
489                             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
490                                 [% borsurname %], [% borfirstname %]
491                             </a>
492                             ([% borcnum %])
493                             <span class="patron-category"> - [% borcategory %]</span>
494                         </li>
495
496                         [% INCLUDE display_holdpatron_address %]
497
498                         [% IF ( borphone ) %]
499                             <li>[% borphone %]</li>
500                         [% END %]
501
502                         [% IF ( boremail ) %]
503                             <li>
504                                 [% IF ( transfertodo ) %]
505                                     [% boremail %]
506                                 [% ELSE %]
507                                     <a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>
508                                 [% END %]
509                             </li>
510                         [% END %]
511
512                         [% UNLESS ( transfertodo) %]
513                             [% INCLUDE display_bormessagepref %]
514                         [% END %]
515
516                         [% IF ( debarred ) %]
517                             <li class="error">Patron is RESTRICTED</li>
518                         [% END %]
519
520                         [% IF ( gonenoaddress ) %]
521                             <li class="error">Patron's address is in doubt</li>
522                         [% END %]
523
524                     [% IF ( transfertodo ) %]
525                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) %]</h4>
526                     [% ELSE %]
527                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) %]</h4>
528                     [% END %]
529
530                     <input type="hidden" name="print_slip" value="0" />
531
532
533                     [% FOREACH inputloo IN inputloop %]
534                         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
535                         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
536                         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
537                     [% END %]
538
539                     <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
540                     <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
541                     <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
542                     <input type="hidden" name="reserve_id" value="[% reserve_id %]" />
543                     <input type="hidden" name="diffBranch" value="[% destbranch %]" />
544                     <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
545                     <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
546                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
547                     <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
548                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
549                 </div>
550
551                 <div class="modal-footer">
552                     [% IF ( transfertodo ) %]
553                         <button type="submit" class="btn btn-default approve">
554                             <i class="fa fa-check"></i> Confirm hold and transfer
555                         </button>
556                         <button type="submit" class="btn btn-default print" onclick="this.form.print_slip.value = 1; this.form.submit()">
557                             <i class="fa fa-print"></i> Print slip, transfer, and confirm
558                         </button>
559                     [% ELSE %]
560                         <button type="submit" class="btn btn-default approve">
561                             <i class="fa fa-check"></i> Confirm hold
562                         </button>
563                         <button type="submit" class="btn btn-default print" onclick="this.form.print_slip.value = 1; this.form.submit();">
564                             <i class="fa fa-print"></i> Print slip and confirm
565                         </button>
566                     [% END %]
567
568                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-danger deny" onclick="$('#barcode').focus(); return false;">
569                         <i class="fa fa-times"></i> Ignore
570                     </button>
571                 </div>
572             </form>
573             </div>
574             </div>
575         </div>
576     [% END %]
577 [% END %]
578
579 [% IF ( errmsgloop ) %]
580     <div class="dialog alert audio-alert-warning">
581         <h3>Check in message</h3>
582         [% IF itembiblionumber %]
583             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
584         [% END %]
585         [% FOREACH errmsgloo IN errmsgloop %]
586             [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
587                 <p class="problem">
588                     Not for loan status updated.
589                     <br />Old value:
590                     [% IF errmsgloo.NotForLoanStatusUpdated.from %]
591                         [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %].
592                     [% ELSE %]
593                         Available for loan.
594                     [% END %]
595                     <br />New value:
596                     [% IF errmsgloo.NotForLoanStatusUpdated.to %]
597                         [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %].
598                     [% ELSE %]
599                         Available for loan.
600                     [% END %]
601                 </p>
602             [% END %]
603             [% IF ( errmsgloo.badbarcode ) %]
604                 <p class="problem">No item with barcode: [% errmsgloo.msg | html %]</p>
605             [% END %]
606             [% IF ( errmsgloo.ispermanent ) %]
607                 <p class="problem">Please return item to: [% Branches.GetName( errmsgloo.msg ) %]</p>
608             [% END %]
609             [% IF ( errmsgloo.notissued ) %]
610                 <p class="problem">Not checked out.</p>
611             [% END %]
612             [% IF ( errmsgloo.localuse) %]
613                 <p class="problem">Local use recorded</p>
614             [% END %]
615             [% IF ( errmsgloo.waslost ) %]
616                 <p class="problem">Item was lost, now found.</p>
617                 [% IF ( LostItemFeeRefunded ) %]
618                     <p class="problem">A refund has been applied to the borrowing patron's account.</p>
619                 [% ELSE %]
620                     <p class="problem">Any lost item fees for this item will remain on the patron's account.</p>
621                 [% END %]
622             [% END %]
623             [% IF ( errmsgloo.withdrawn ) %]
624                 [% IF BlockReturnOfWithdrawnItems %]
625                    <h5>Cannot check in</h5>
626                    <p><strong>NOT CHECKED IN</strong></p>
627                    <p class="problem">Item is withdrawn.</p>
628                 [% ELSE %]
629                    <p class="problem">Item is withdrawn.</p>
630                 [% END %]
631             [% END %]
632             [% IF ( errmsgloo.debarred ) %]
633                 <p class="problem"><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% errmsgloo.debarborrowernumber %]">[% errmsgloo.debarname %]([% errmsgloo.debarcardnumber %])</a> is now debarred until [% errmsgloo.debarred | $KohaDates %].</p>
634             [% END %]
635             [% IF ( errmsgloo.prevdebarred ) %]
636                 <p class="problem"><b>Reminder: </b>Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].</p>
637             [% END %]
638             [% IF ( errmsgloo.foreverdebarred ) %]
639                 <p class="problem"><b>Reminder: </b>Patron has an indefinite restriction.</p>
640             [% END %]
641         [% END %]
642     </div>
643 [% END %]
644
645 [% IF ( checkinmsg ) %]
646     [% IF ( checkinmsgtype == 'alert' ) %]
647         <div class="dialog alert">
648     [% ELSE %]
649         <div class="dialog message">
650     [% END %]
651             <p class="problem">[% checkinmsg | html_line_break %]</p>
652         </div>
653 [% END%]
654
655     <div id="exemptfines" class="dialog message" style="display:none;">
656         <p>Fines for returned items are forgiven.</p>
657     </div>
658     <div id="forgivemanualholdsexpire-alert" class="dialog message" style="display:none;">
659         <p>Fines are not charged for manually cancelled holds.</p>
660     </div>
661     <div id="dropboxmode" class="dialog message" style="display:none;">
662         <p>Book drop mode.  (Effective checkin date is [% dropboxdate %] ).</p>
663     </div>
664 </div>
665 <div class="yui-g">
666     <form id="checkin-form" method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off" >
667     <div class="yui-u first">
668             <fieldset>
669         <legend>Check in</legend>
670             <label for="barcode">Enter item barcode: </label>
671                         [% IF ( exemptfine ) %]
672                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
673                         [% ELSIF ( dropboxmode ) %]
674                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
675                         [% ELSE %]
676                         <input name="barcode" id="barcode" size="14" class="focus"/>
677                         [% END %]
678             <input type="submit" class="submit" value="Submit" />
679
680             [% IF Koha.Preference('SpecifyReturnDate') %]
681                 <div class="date-select" id="return_date_override_fields">
682                     <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
683
684                     <input type="text" size="13" id="return_date_override" name="return_date_override" value="[% return_date_override %]" />
685
686                     <label for="return_date_override_remember"> Remember for next check in:</label>
687                     [% IF ( return_date_override_remember ) %]
688                         <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" checked="checked" />
689                     [% ELSE %]
690                         <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" />
691                     [% END %]
692
693                     <input type="button" class="action" id="cleardate" value="Clear" name="cleardate" onclick="this.checked = false; this.form.return_date_override.value = ''; this.form.return_date_override_remember.checked = false; this.form.barcode.focus(); return false;" />
694             </div>
695         [% END %]
696             [% FOREACH inputloo IN inputloop %]
697                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
698                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
699                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
700             [% END %]
701
702
703             </fieldset>
704             </div>
705             <div class="yui-u">
706             <fieldset id="checkin_options">
707                 <legend>Options</legend>
708                     [% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %]
709                     <p>
710                         [% IF ( exemptfine ) %]
711                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" />
712                         [% ELSE %]
713                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" />
714                         [% END %]
715                         <label for="exemptcheck">Forgive overdue charges</label>
716                     </p>
717                     [% END %] <!-- overduecharges -->
718                     <p>
719                         [% IF ( dropboxmode ) %]
720                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" />
721                         [% ELSE %]
722                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" />
723                         [% END %]
724                         <label for="dropboxcheck">Book drop mode</label>
725                     </p>
726                     [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %]
727                     <p>
728                         [% IF ( forgivemanualholdsexpire ) %]
729                         <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" checked="checked" />
730                         [% ELSE %]
731                         <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" />
732                         [% END %]
733                         <label for="forgivemanualholdsexpire">Forgive fees for manually expired holds</label>
734                     </p>
735                     [% END %] <!-- overduecharges -->
736             </fieldset>
737         </div>
738     </form>
739 </div>
740
741 [% IF ( riloop ) %]
742     <h2>Checked-in items</h2>
743     <table id="checkedintable">
744     <thead><tr><th class="ci-duedate">Due date</th><th class="ci-title">Title</th><th class="ci-author">Author</th><th class="ci-barcode">Barcode</th><th class="ci-homelibrary">Home library</th><th class="ci-holdinglibrary">Holding library</th><th class="ci-shelvinglocation">Shelving location</th><th class="ci-callnumber">Call number</th><th class="ci-dateaccessioned">Date acquired</th><th class="ci-type">Type</th><th class="ci-patron">Patron</th><th class="ci-note">Note</th></tr></thead>
745
746         [% FOREACH riloo IN riloop %]
747             <tr>
748             <td class="ci-duedate">[% IF ( riloo.duedate ) %]
749                     [% IF ( riloo.return_overdue ) %]
750                         <span class="overdue">[% riloo.duedate %] (overdue)</span>
751                     [% ELSE %][% riloo.duedate %]
752                     [% END %]
753                 [% ELSE %]Not checked out
754                 [% END %]
755             </td>
756             <td class="ci-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber %]">
757                     [% riloo.itemtitle |html %]
758                 </a>
759                 [% IF ( riloo.enumchron ) %]
760                     <br/>
761                     <span class="item_enumeration" style="white-space: nowrap;">[% riloo.enumchron %]</span>
762                 [% END %]
763             </td>
764             <td class="ci-author">[% riloo.itemauthor %]</td>
765             <td class="ci-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber %]&amp;itemnumber=[% riloo.itemnumber %]#item[% riloo.itemnumber %]">[% riloo.barcode %]</a></td>
766             <td class="ci-homelibrary">[% Branches.GetName( riloo.homebranch ) %]</td>
767             <td class="ci-holdinglibrary">[% Branches.GetName( riloo.holdingbranch ) %]</td>
768             <td class="ci-shelvinglocation">[% riloo.location %]</td>
769             <td class="ci-callnumber">[% riloo.itemcallnumber %]</td>
770             <td class="ci-dateaccessioned">[% riloo.dateaccessioned | $KohaDates %]</td>
771             <td class="ci-type">[% ItemTypes.GetDescription( riloo.itemtype ) %] [% AuthorisedValues.GetByCode('CCODE', riloo.ccode) %]</td>
772             <td class="ci-patron">[% IF ( riloo.duedate ) %]
773                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riloo.borrowernumber %]">
774                     [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %])
775                 </a>
776                 [% IF riloo.borissuescount %]
777                     <span class="results_summary nowrap">
778                         <span class="label">Checkouts:</span>
779                         <span class="number_box">
780                             <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% riloo.borrowernumber %]">[% riloo.borissuescount %]</a>
781                         </span>
782                     </span>
783                 [% END %]
784             [% ELSE %]Not checked out[% END %]</td>
785             <td class="ci-note">
786                 [% IF ( riloo.bornote ) %]<p><span class="circ-hlt patron-note">[% riloo.bornote %]</p></span>[% END %]
787                 [% IF ( riloo.itemnote ) %]<p><span class="circ-hlt item-note-public">[% riloo.itemnote %]</p></span>[% END %]
788                 [% IF ( riloo.itemnotes_nonpublic ) %]<p><span class="circ-hlt item-note-nonpublic">[% riloo.itemnotes_nonpublic %]</p></span>[% END %]
789             </td>
790            </tr>
791         [% END %]
792     </table>
793 [% END %]
794 </div>
795 [% IF Koha.Preference('CircSidebar') %]
796 </div>
797 <div class="yui-b noprint">
798     [% INCLUDE 'circ-nav.inc' %]
799 </div>
800 [% END %]
801 </div>
802 </div>
803 </div>
804 [% INCLUDE 'intranet-bottom.inc' %]