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