Bug 9543 - (Follow-up) Show patrons messaging subscription on holds notification
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / returns.tt
blobf092ea83ad65720f362747bf483493178aa6105c
1 [% USE KohaDates %]
2 [% USE Branches %]
3 [% USE Koha %]
4 [% USE Borrowers %]
5 [% USE ItemTypes %]
6 [% USE AuthorisedValues %]
7 [% USE ColumnsSettings %]
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             [% END %]
17         </li>
18            [% ELSE %]
19         <li>Patron is not notified.</li>
20     [% END %]
21 [% END %]
23 [% INCLUDE 'doc-head-open.inc' %]
24 <title>Koha &rsaquo; Circulation &rsaquo; Check in [% title |html %]</title>
25 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
26 [% INCLUDE 'doc-head-close.inc' %]
27 [% INCLUDE 'datatables.inc' %]
28 [% INCLUDE 'columns_settings.inc' %]
29 [% INCLUDE 'calendar.inc' %]
30 <script type="text/javascript" src="[% interface %]/lib/jquery/plugins/jquery-ui-timepicker-addon.min.js"></script>
31 [% INCLUDE 'timepicker.inc' %]
33 <script type="text/javascript">
34 //<![CDATA[
35 function Dopop(link) {
36     var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
37     $("#barcode").focus();
39 $(document).ready(function () {
41     [% IF print_slip %]
42         Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]');
43     [% END %]
45     var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %]
46     var returns_table = KohaTable("#checkedintable", {
47             "bFilter":false,
48             "bPaginate":false,
49             "bInfo":false,
50             "bSort":false,
51             "dom": 'B<"clearfix">t',
52             }, columns_settings);
54     $("#return_date_override").datetimepicker({
55         onClose: function(dateText, inst) { $("#barcode").focus(); },
56         defaultDate: -1,
57         hour: 23,
58         minute: 59,
59         maxDate: 0
60     });
61     $("#return_date_override").on("blur", function() {
62             check_valid_return_date();
63     });
64     $("#checkin-form").submit(function( event ) {
65         if ( !check_valid_return_date() ) {
66             event.preventDefault();
67         }
68     });
70     function check_valid_return_date() {
71         if ( $("#return_date_override").val() ) {
72             var datetime = DateTime_from_syspref( $("#return_date_override").val() );
73             var now = new Date();
74             if ( !datetime || datetime > now ) {
75                 alert("Invalid return date/time!");
76                 $("#return_date_override").val("")
77                 return false;
78             }
79         }
80         return true;
81     }
83     $("#exemptcheck").change(function () {
84         if (this.checked == true) {
85             $("#barcode").addClass("alert");
86             $("#exemptfines").show();
87         } else {
88             $("#barcode").removeClass("alert");
89             $("#exemptfines").hide();
90         }
91         $("#barcode").focus();
92     });
93     $("#dropboxcheck").change(function () {
94         if (this.checked == true) {
95             $("#barcode").addClass("alert");
96             $("#dropboxmode").show();
98             $("#return_date_override_fields :input").prop('disabled', true);
99             $("#return_date_override").datetimepicker("disable");
100         } else {
101             $("#barcode").removeClass("alert");
102             $("#dropboxmode").hide();
104             $("#return_date_override_fields :input").prop('disabled', false);
105             $("#return_date_override").datetimepicker("enable");
106         }
107         $("#barcode").focus();
108     });
109     $("#forgivemanualholdsexpire").change(function () {
110         if (this.checked == true) {
111             $("#barcode").addClass("alert");
112             $("#forgivemanualholdsexpire-alert").show();
113         } else {
114             $("#barcode").removeClass("alert");
115             $("#forgivemanualholdsexpire-alert").hide();
116         }
117         $("#barcode").focus();
118     });
119     [% IF(overduecharges) %] $("#barcode").focus(function () {
120         if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) {
121             $("#barcode").addClass("alert");
122         } else {
123             $("#barcode").removeClass("alert");
124         }
125     });
126     $("#barcode").blur(function () {
127         $("#barcode").removeClass("alert");
128     });
129     [% END %]
131 //]]>
132 </script>
133 </head>
134 <body id="circ_returns" class="circ">
135 <span class="audio-alert-success"></span>
137 [% INCLUDE 'header.inc' %]
138 [% INCLUDE 'checkin-search.inc' %]
140 <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>
142 <div id="doc" class="yui-t7">
144    <div id="bd">
145         <div id="yui-main">
147 <div class="yui-g">
149 [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
150     <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>
151 [% ELSIF NOT Koha.Preference('AnonymousPatron') AND Koha.Preference('OPACPrivacy') %]
152     <div class="dialog alert"><strong>Error:</strong> The system preference OPACPrivacy is set but AnonymousPatron is not! Please correct this before continuing circulation.</div>
153 [% END %]
155 [% IF additional_materials %]
156     <div class="dialog message" id="materials">Note about the accompanying materials: <br />
157     [% additional_materials %]
158     </div>
159 [% END %]
161 [% IF ( collectionItemNeedsTransferred ) %]
162  <div id="rotating-collection" class="dialog message">
163         <h3>Please transfer item to: [% collectionBranchName %]</h3>
164             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
165             <p>This item is part of a rotating collection.</p>
166             <p><a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;branchcode=[% collectionBranch %]&amp;op=slip'); return true;">Print slip</a></p>
167 </div>
168 [% END %]
170 <!-- Patron has fines -->
171 [% IF ( fines ) %]
172     <div class="dialog alert">
173         <h3>Patron has outstanding fines of [% fines %].</h3>
174         <p><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% fineborrowernumber %]">Make payment</a>.</p>
175     </div>
176 [% END %]
178 <!-- Patron has waiting holds -->
179 [% IF ( waiting_holds ) %]
180     <div id="awaiting-pickup" class="dialog message">
181         <h3>[% holdsfirstname %] [% holdssurname %] has [% waiting_holds %] hold(s) waiting for pickup.</h3>
182         <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber %]">Check out to this patron</a>.</p>
183     </div>
184 [% END %]
186 <!-- Patron is restricted and checkin was backdated -->
187 [% IF return_date_was_overriden && Borrowers.IsDebarred( borrower ) %]
188     <div id="restricted_backdated" class="dialog message">
189         <h3>
190             <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">
191                 [% borrower.firstname %] [% borrower.surname %]
192             </a>
193             is restricted. Please verify this patron should still be restricted.
194         </h3>
195     </div>
196 [% END %]
198 [% IF ( wrongbranch ) %]
199     <div class="dialog alert"><h3>Cannot check in</h3>
200         <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
201         </p><strong>NOT CHECKED IN</strong></p>
202         <p>This item must be checked in at following library: <strong>[% Branches.GetName( rightbranch ) %]</strong></p>
203     </div>
204 [% END %]
205 <!-- case of a mistake in transfer loop -->
206 [% IF ( WrongTransfer ) %]
207     <div id="return2" class="dialog message">
208         <!-- WrongTransfer -->
209         <h3>Please return item to: [% Branches.GetName( TransferWaitingAt ) %]</h3>
210             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
211         <button type="submit" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% homebranch %]&amp;op=slip'); return true;"><i class="fa fa-print"></i> Print transfer slip</button><button 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>
212 [% IF ( wborcnum ) %]<h5>Hold for:</h5>
213         <ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
214             [% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
215         <li>[% wborstnum %] [% wboraddress %][% IF ( wboraddress2 ) %]<br />
216                 [% wboraddress2 %]<br />[% END %]
217         [% wborcity %]  [% wborzip %]</li>
218         [% IF ( wborphone ) %]<li>[% wborphone %]</li>[% END %]
219                 [% IF ( wboremail ) %]<li><a id="boremail" href="mailto:[% wboremail %]">[% wboremail %]</a></li>[% END %]
220         </ul>
222     <form method="post" action="returns.pl" class="confirm">
223             <input type="hidden" name="WT-itemNumber" value="[% WrongTransferItem %]" />
224             <input type="hidden" name="WT-waitingAt" value="[% TransferWaitingAt %]" />
225             <input type="hidden" name="WT-From" value="[% wtransfertFrom %]" />
226             <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
227             <input type="hidden" name="print_slip" value="0" />
228             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
229             <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
230             <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>
231         <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
232         <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
233     </form>
234     [% END %]</div>
235 [% END %]
237 [% IF ( found ) %]
238 <!-- found -->
239 <!-- case of a reservation found, and display info -->
240     [% IF ( waiting ) %]
241         <!-- waiting -->
243     <div id="hold-found1" class="dialog message audio-alert-action">
244         <h3>Hold found (item is already waiting)</h3>
245         <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
246         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
247         <h4>Hold for:</h4>
248                         <ul>
249             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
250             <li>[% borstnum %] [% boraddress %]<br />
251                         [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
252             [% borcity %] [% borzip %]</li>
253            [% IF ( borphone ) %]<li> [% borphone %]</li>[% END %]
254                    [% IF ( boremail ) %]<li><a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a></li>[% END %]
255             [% INCLUDE display_bormessagepref %]
256 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
257 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]</ul>
258                 [% IF ( transfertodo ) %]
259             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
260                 [% ELSE %]
261                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
262         [% END %]
263         <form method="post" action="returns.pl" class="confirm">
264             <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
266             <input type="hidden" name="cancel_reserve" value="0" />
267             <button type="submit" class="deny" onclick="this.form.cancel_reserve.value = 1; this.form.submit();"><i class="fa fa-times"></i> Cancel</button>
269             <input type="hidden" name="print_slip" value="0" />
270             <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print and confirm</button>
271             [% FOREACH inputloo IN inputloop %]
272                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
273                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
274                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
275             [% END %]
276                 <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
277                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
278                 <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
279                 <input type="hidden" name="resbarcode" value="[% barcode %]" />
280                 <input type="hidden" name="diffBranch" value="[% destbranch %]" />
281                 <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
282                 <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
283                 <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
285                 <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
286                 <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
287                 </form>
288         </div>
289     [% END %]
291     [% IF ( diffbranch ) %]
292                 <!-- diffbranch -->
293         <div id="transfer-needed" class="dialog message audio-alert-action">
294             <h3>Hold needing transfer found</h3>
295                 <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
296                 <h4>Hold for: </h4>
297                     <ul>
298                         <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
299                         <li>[% borstnum %] [% boraddress %]<br />
300                                                 [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
301                                                 [% borcity %]  [% borzip %]</li>
302                         [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
303                         [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
304 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
305 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
306                     </ul>
307                 [% IF ( transfertodo ) %]
308             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
309                 [% ELSE %]
310                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
311         [% END %]
313         <form method="post" action="returns.pl" class="confirm">
314             <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
315             <input type="hidden" name="print_slip" value="0" />
316             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
317             <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
318             <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>
319             [% FOREACH inputloo IN inputloop %]
320                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
321                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
322                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
323             [% END %]
324             <input type="hidden" name="diffBranch" value="[% destbranch %]" />
325             <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
326             <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
327             <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
328             <input type="hidden" name="barcode" value="0" />
330             <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
331             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
332         </form>
333                 </div>
334     [% END %]
336     [% IF ( transfer ) %]
337     <!-- transfer: item with no reservation, must be returned according to home library circulation rules -->
338         <div id="return1" class="dialog message audio-alert-action">
339             <h3>Please return item to: [% Branches.GetName( returnbranch ) %]</h3>
340             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
341             <ul><li><a href="#" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;branchcode=[% returnbranch %]&amp;op=slip'); return true;">Print slip</a></li></ul>
342         </div>
343     [% END %]
345     [% IF ( needstransfer ) %]
346         <!-- needstransfer -->
347     <div id="item-transfer" class="dialog message audio-alert-action"><h3> This item needs to be transferred to [% Branches.GetName( returnbranch ) %]</h3>
348     Transfer now?<br />
349     <form method="post" action="returns.pl" name="mainform" id="mainform">
350     [% IF itemnumber %]
351         <button type="submit" name="dotransfer" class="print" onclick="Dopop('transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% returnbranch %]&amp;op=slip'); return true;"><i class="fa fa-print"></i> Yes, print slip</button>
352     [% END %]
353         <button type="submit" name="dotransfer" class="submit"><i class="fa fa-check"></i> Yes</button>
354         <button type="submit" name="notransfer" class="submit"><i class="fa fa-times"></i> No</button>
355     <input type="hidden" name="tobranch" value="[% returnbranch %]" />
356         <input type="hidden" name="transferitem" value="[% itemnumber %]" />
357         <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
358         <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
359         <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
360         [% FOREACH inputloo IN inputloop %]
361         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
362         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
363         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
364         [% END %]
365         <input type="hidden" name="barcode" value="0" />
366         <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
367         <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
368         </form>   </div>
369     [% END %]
371     [% IF ( diffbranch ) %]
372         <!-- diffbranch -->
373         <h3 class="audio-alert-action">Item consigned:</h3>
374         <table>
375         <caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a></caption>
376         <tr>
377             <th>Hold for:</th>
378             <td>[% name %]</td>
379         </tr>
380         </table>
381         <form method="post" action="returns.pl"><input type="submit" value="OK" />
382             [% FOREACH inputloo IN inputloop %]
383                 [% UNLESS ( inputloo.first ) %]
384                     <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
385                     <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
386                     <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
387                 [% END %]
388             [% END %]
390             <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
391             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
393             <input type="hidden" name="barcode" value="0" />
394         </form>
395     [% END %]
398     <!-- case of simple return no issue or transfer but with a reservation  -->
399     [% IF ( reserved ) %]
400         <!--  reserved  -->
402     <div id="hold-found2" class="dialog message audio-alert-action">
403       <h3>Hold found</h3>
404           <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
405         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
406         <h5>Hold for:</h5>
407                 <ul>
408             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
409                 [% borsurname %], [% borfirstname %]
410             </a> ([% borcnum %])</li>
411             <li>[% borstnum %] [% boraddress %]<br />
412                         [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
413                         [% borcity %] [% borzip %]</li>
414             [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
415             [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
416             [% UNLESS ( transfertodo) %]
417                 [% INCLUDE display_bormessagepref %]
418             [% END %]
419 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
420 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
421         </ul>
422         [% IF ( transfertodo ) %]
423             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
424                 [% ELSE %]
425                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
426         [% END %]
427         <form method="post" action="returns.pl" class="confirm">
428             <input type="hidden" name="print_slip" value="0" />
429             [% IF ( transfertodo ) %]
430                 <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm hold and transfer</button>
431                 <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit()"><i class="fa fa-print"></i> Print slip, transfer, and confirm</button>
432             [% ELSE %]
433                 <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm hold</button>
434                 <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>
435             [% END %]
436                 <button type="submit" class="deny" onclick="$('.dialog:visible').hide('slow'); $('#barcode').focus(); return false;"><i class="fa fa-times"></i> Ignore</button>
437             [% FOREACH inputloo IN inputloop %]
438         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
439         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
440         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />[% END %]
441             <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
442             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
443             <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
444             <input type="hidden" name="resbarcode" value="[% barcode %]" />
445             <input type="hidden" name="diffBranch" value="[% destbranch %]" />
446             <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
447             <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
448             <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire %]" />
449             <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
450             <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember %]" />
451         </form>
452         </div>
453     [% END %]
454 [% END %]
456 [% IF ( errmsgloop ) %]
457     <div class="dialog alert audio-alert-warning">
458         <h3>Check in message</h3>
459         [% IF itembiblionumber %]
460             <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
461         [% END %]
462         [% FOREACH errmsgloo IN errmsgloop %]
463                     [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
464                         <p class="problem">
465                             Not for loan status updated.
466                             <br />Old value:
467                             [% IF errmsgloo.NotForLoanStatusUpdated.from %]
468                                 [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %].
469                             [% ELSE %]
470                                 Available for loan.
471                             [% END %]
472                             <br />New value:
473                             [% IF errmsgloo.NotForLoanStatusUpdated.to %]
474                                 [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %].
475                             [% ELSE %]
476                                 Available for loan.
477                             [% END %]
478                         </p>
479                     [% END %]
480                     [% IF ( errmsgloo.badbarcode ) %]
481                         <p class="problem">No item with barcode: [% errmsgloo.msg %]</p>
482                     [% END %]
483                     [% IF ( errmsgloo.ispermanent ) %]
484                         <p class="problem">Please return item to: [% errmsgloo.msg %]</p>
485                     [% END %]
486                     [% IF ( errmsgloo.notissued ) %]
487                         <p class="problem">Not checked out.</p>
488                     [% END %]
489                     [% IF ( errmsgloo.localuse) %]
490                         <p class="problem">Local use recorded</p>
491                     [% END %]
492                     [% IF ( errmsgloo.waslost ) %]
493                         <p class="problem">Item was lost, now found.</p>
494                         [% IF ( LostItemFeeRefunded ) %]
495                             <p class="problem">A refund has been applied to the borrowing patron's account.</p>
496                         [% ELSE %]
497                             <p class="problem">Any lost item fees for this item will remain on the patron's account.</p>
498                         [% END %]
499                     [% END %]
500                     [% IF ( errmsgloo.withdrawn ) %]
501                         [% IF BlockReturnOfWithdrawnItems %]
502                            <h5>Cannot check in</h5>
503                            <p><strong>NOT CHECKED IN</strong></p>
504                            <p class="problem">Item is withdrawn.</p>
505                         [% ELSE %]
506                            <p class="problem">Item is withdrawn.</p>
507                         [% END %]
508                     [% END %]
509                     [% IF ( errmsgloo.debarred ) %]
510                         <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>
511                     [% END %]
512                     [% IF ( errmsgloo.prevdebarred ) %]
513                         <p class="problem"><b>Reminder: </b>Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].</p>
514                     [% END %]
515                     [% IF ( errmsgloo.foreverdebarred ) %]
516                         <p class="problem"><b>Reminder: </b>Patron has an indefinite restriction.</p>
517                     [% END %]
519             [% END %]
520         [% ELSE %]
521         [% END %]
522     </div>
524 [% IF ( checkinmsg ) %]
525     [% IF ( checkinmsgtype == 'alert' ) %]
526         <div class="dialog alert">
527     [% ELSE %]
528         <div class="dialog message">
529     [% END %]
530             <p class="problem">[% checkinmsg | html_line_break %]</p>
531         </div>
532 [% END%]
534     <div id="exemptfines" class="dialog message" style="display:none;">
535         <p>Fines for returned items are forgiven.</p>
536     </div>
537     <div id="forgivemanualholdsexpire-alert" class="dialog message" style="display:none;">
538         <p>Fines are not charged for manually cancelled holds.</p>
539     </div>
540     <div id="dropboxmode" class="dialog message" style="display:none;">
541         <p>Book drop mode.  (Effective checkin date is [% dropboxdate %] ).</p>
542     </div>
543 </div>
544         <div class="yui-g">
545     <form id="checkin-form" method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off" >
546     <div class="yui-u first">
547             <fieldset>
548         <legend>Check in</legend>
549             <label for="barcode">Enter item barcode: </label>
550                         [% IF ( exemptfine ) %]
551                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
552                         [% ELSIF ( dropboxmode ) %]
553                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
554                         [% ELSE %]
555                         <input name="barcode" id="barcode" size="14" class="focus"/>
556                         [% END %]
557             <input type="submit" class="submit" value="Submit" />
559             [% IF Koha.Preference('SpecifyReturnDate') %]
560                 <div class="date-select" id="return_date_override_fields">
561                     <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
563                     <input type="text" size="13" id="return_date_override" name="return_date_override" value="[% return_date_override %]" />
565                     <label for="return_date_override_remember"> Remember for next check in:</label>
566                     [% IF ( return_date_override_remember ) %]
567                         <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" checked="checked" />
568                     [% ELSE %]
569                         <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" />
570                     [% END %]
572                     <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;" />
573             </div>
574         [% END %]
575             [% FOREACH inputloo IN inputloop %]
576                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
577                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
578                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
579             [% END %]
582             </fieldset>
583             </div>
584             <div class="yui-u">
585             <fieldset id="checkin_options">
586                 <legend>Options</legend>
587                     [% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %]
588                     <p>
589                         [% IF ( exemptfine ) %]
590                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" />
591                         [% ELSE %]
592                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" />
593                         [% END %]
594                         <label for="exemptcheck">Forgive overdue charges</label>
595                     </p>
596                     [% END %] <!-- overduecharges -->
597                     <p>
598                         [% IF ( dropboxmode ) %]
599                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" />
600                         [% ELSE %]
601                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" />
602                         [% END %]
603                         <label for="dropboxcheck">Book drop mode</label>
604                     </p>
605                     [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %]
606                     <p>
607                         [% IF ( forgivemanualholdsexpire ) %]
608                         <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" checked="checked" />
609                         [% ELSE %]
610                         <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" />
611                         [% END %]
612                         <label for="forgivemanualholdsexpire">Forgive fees for manually expired holds</label>
613                     </p>
614                     [% END %] <!-- overduecharges -->
615             </fieldset>
616         </div>
617     </form>
618 </div>
620 [% IF ( riloop ) %]
621     <h2>Checked-in items</h2>
622     <table id="checkedintable">
623     <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>
625         [% FOREACH riloo IN riloop %]
626             <tr>
627             <td class="ci-duedate">[% IF ( riloo.duedate ) %]
628                     [% IF ( riloo.return_overdue ) %]
629                         <span class="overdue">[% riloo.duedate %] (overdue)</span>
630                     [% ELSE %][% riloo.duedate %]
631                     [% END %]
632                 [% ELSE %]Not checked out
633                 [% END %]
634             </td>
635             <td class="ci-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber %]">
636                     [% riloo.itemtitle |html %]</a></td>
637             <td class="ci-author">[% riloo.itemauthor %]</td>
638             <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>
639             <td class="ci-homelibrary">[% Branches.GetName( riloo.homebranch ) %]</td>
640             <td class="ci-holdinglibrary">[% Branches.GetName( riloo.holdingbranch ) %]</td>
641             <td class="ci-shelvinglocation">[% riloo.location %]</td>
642             <td class="ci-callnumber">[% riloo.itemcallnumber %]</td>
643             <td class="ci-dateaccessioned">[% riloo.dateaccessioned | $KohaDates %]</td>
644             <td class="ci-type">[% ItemTypes.GetDescription( riloo.itemtype ) %] [% AuthorisedValues.GetByCode('CCODE', riloo.ccode) %]</td>
645             <td class="ci-patron">[% IF ( riloo.duedate ) %]
646                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riloo.borrowernumber %]">
647                     [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %])
648                 </a>
649             [% ELSE %]Not checked out[% END %]</td>
650             <td class="ci-note">
651                 [% IF ( riloo.bornote ) %]<p><span class="circ-hlt">[% riloo.bornote %]</p></span>[% END %]
652                 [% IF ( riloo.itemnote ) %]<p><span class="circ-hlt">[% riloo.itemnote %]</p></span>[% END %]
653                 [% IF ( riloo.itemnotes_nonpublic ) %]<p><span class="circ-hlt">[% riloo.itemnotes_nonpublic %]</p></span>[% END %]
654             </td>
655            </tr>
656         [% END %]
657     </table></div>
658 [% END %]
661 </div>
662 [% INCLUDE 'intranet-bottom.inc' %]