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