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