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