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