Bug 13261 - Better check in message for patrons with indefinite restricition
[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     </form>
166     [% END %]</div>
167 [% END %]
168
169 [% IF ( found ) %]
170 <!-- found -->
171 <!-- case of a reservation found, and display info -->
172     [% IF ( waiting ) %]
173         <!-- waiting -->
174
175 [% IF ( soundon ) %]
176 <audio src="[% interface %]/[% theme %]/sound/ending.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
177 [% END %]
178
179 <div id="hold-found1" class="dialog message">
180         <h3>Hold found (item is already waiting):  <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
181         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
182         <h4>Hold for:</h4>
183                         <ul>
184             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
185             <li>[% borstnum %] [% boraddress %]<br />
186                         [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
187             [% borcity %] [% borzip %]</li>
188            [% IF ( borphone ) %]<li> [% borphone %]</li>[% END %]
189                    [% IF ( boremail ) %]<li><a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a></li>[% END %]
190 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
191 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]</ul>
192                 [% IF ( transfertodo ) %]
193             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
194                 [% ELSE %]
195                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
196         [% END %]
197         <form method="post" action="returns.pl" class="confirm">
198             <input type="submit" class="approve" value="Confirm" />
199
200             <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();" />
201             [% FOREACH inputloo IN inputloop %]
202                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
203                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
204                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
205             [% END %]
206                 <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
207                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
208                 <input type="hidden" name="resbarcode" value="[% barcode %]" />
209                 <input type="hidden" name="diffBranch" value="[% destbranch %]" />
210                 <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
211                 <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
212                 </form>
213         </div>
214     [% END %]
215
216     [% IF ( diffbranch ) %]
217                 <!-- diffbranch -->
218         [% IF ( soundon ) %]
219         <audio src="[% interface %]/[% theme %]/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
220         [% END %]
221         <div id="transfer-needed" class="dialog message">
222                 <h3>Hold needing transfer found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
223                 <h4>Hold for: </h4>
224                     <ul>
225                         <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
226                         <li>[% borstnum %] [% boraddress %]<br />
227                                                 [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
228                                                 [% borcity %]  [% borzip %]</li>
229                         [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
230                         [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
231 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
232 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
233                     </ul>
234                 [% IF ( transfertodo ) %]
235             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
236                 [% ELSE %]
237                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
238         [% END %]
239
240         <form method="post" action="returns.pl" class="confirm">
241             <input type="submit" class="approve" value="Confirm" />
242             <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();" />
243             [% FOREACH inputloo IN inputloop %]
244                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
245                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
246                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
247             [% END %]
248             <input type="hidden" name="diffBranch" value="[% destbranch %]" />
249             <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
250             <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
251             <input type="hidden" name="barcode" value="0" />
252         </form>
253                 </div>
254     [% END %]
255
256     [% IF ( transfer ) %]
257     <!-- transfer: item with no reservation, must be returned to its home library -->
258         <div id="return1" class="dialog message">
259             <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>
260         </div>
261         [% IF ( soundon ) %]
262         <audio src="[% interface %]/[% theme %]/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
263         [% END %]
264     [% END %]
265
266     [% IF ( needstransfer ) %]
267         <!-- needstransfer -->
268         [% IF ( soundon ) %]
269         <audio src="[% interface %]/[% theme %]/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
270         [% END %]
271         <div id="item-transfer" class="dialog message"><h3> This item needs to be transferred to [% homebranchname %]</h3>
272     Transfer now?<br />
273     <form method="post" action="returns.pl" name="mainform" id="mainform">
274     [% IF itemnumber %]
275         <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;" />
276     [% END %]
277         <input type="submit" name="dotransfer" value="Yes" class="submit" />
278         <input type="submit" name="notransfer" value="No" class="submit" />
279         <input type="hidden" name="tobranch" value="[% homebranch %]" />
280         <input type="hidden" name="transferitem" value="[% itemnumber %]" />
281         <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
282         <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
283         [% FOREACH inputloo IN inputloop %]
284         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
285         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
286         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
287         [% END %]
288         <input type="hidden" name="barcode" value="0" />
289         </form>   </div>
290     [% END %]
291
292     [% IF ( diffbranch ) %]
293         <!-- diffbranch -->
294         [% IF ( soundon ) %]
295         <audio src="[% interface %]/[% theme %]/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
296         [% END %]
297         <h3>Item consigned:</h3>
298         <table>
299         <caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a></caption>
300         <tr>
301             <th>Hold for:</th>
302             <td>[% name %]</td>
303         </tr>
304         </table>
305         <form method="post" action="returns.pl"><input type="submit" value="OK" />
306             [% FOREACH inputloo IN inputloop %]
307                 [% UNLESS ( inputloo.first ) %]
308                     <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
309                     <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
310                     <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
311                 [% END %]
312             [% END %]
313             <input type="hidden" name="barcode" value="0" />
314         </form>
315     [% END %]
316
317
318     <!-- case of simple return no issue or transfer but with a reservation  -->
319     [% IF ( reserved ) %]
320         <!--  reserved  -->
321
322         [% IF ( soundon ) %]
323         <audio src="[% interface %]/[% theme %]/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
324         [% END %]
325
326         <div id="hold-found2" class="dialog message">
327       <h3>Hold found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
328         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
329         <h5>Hold for:</h5>
330                 <ul>
331             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
332                 [% borsurname %], [% borfirstname %]
333             </a> ([% borcnum %])</li>
334             <li>[% borstnum %] [% boraddress %]<br />
335                         [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
336                         [% borcity %] [% borzip %]</li>
337             [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
338             [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
339 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
340 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
341         </ul>
342         [% IF ( transfertodo ) %]
343             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
344                 [% ELSE %]
345                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
346         [% END %]
347         <form method="post" action="returns.pl" class="confirm">
348             [% IF ( transfertodo ) %]
349                 <input type="submit" class="approve" value="Confirm hold and transfer" />
350                 <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();" />
351             [% ELSE %]
352                 <input type="submit" class="approve" value="Confirm hold" />
353                 <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();" />
354             [% END %]
355                 <input type="submit" class="deny" value="Ignore" onclick="$('.dialog:visible').hide('slow'); $('#barcode').focus(); return false;" />
356             [% FOREACH inputloo IN inputloop %]
357         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
358         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
359         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />[% END %]
360             <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
361             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
362             <input type="hidden" name="resbarcode" value="[% barcode %]" />
363             <input type="hidden" name="diffBranch" value="[% destbranch %]" />
364             <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
365             <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
366         </form>
367         </div>
368     [% END %]
369 [% END %]
370
371 [% IF ( errmsgloop ) %]
372     <div class="dialog alert">
373         <h3>Check in message</h3>
374         [% FOREACH errmsgloo IN errmsgloop %]
375                     [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
376                         <p class="problem">
377                             Not for loan status updated
378                             from
379                             [% IF errmsgloo.NotForLoanStatusUpdated.from %]
380                                 [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.from ) %]
381                             [% ELSE %]
382                                 being available for loan
383                             [% END %]
384                             to
385                             [% IF errmsgloo.NotForLoanStatusUpdated.to %]
386                                 [% AuthorisedValues.GetByCode( 'NOT_LOAN', errmsgloo.NotForLoanStatusUpdated.to ) %]
387                             [% ELSE %]
388                                 being available for loan
389                             [% END %]
390                         </p>
391                     [% END %]
392                     [% IF ( errmsgloo.badbarcode ) %]
393                         <p class="problem">No item with barcode: [% errmsgloo.msg %]</p>
394                     [% END %]
395                     [% IF ( errmsgloo.ispermanent ) %]
396                         <p class="problem">Please return to  [% errmsgloo.msg %]</p>
397                     [% END %]
398                     [% IF ( errmsgloo.notissued ) %]
399                         <p class="problem">Not checked out.</p>
400                     [% END %]
401                     [% IF ( errmsgloo.localuse) %]
402                         <p class="problem">Local use recorded</p>
403                     [% END %]
404                     [% IF ( errmsgloo.waslost ) %]
405                         <p class="problem">Item was lost, now found.</p>
406                         [% IF ( LostItemFeeRefunded ) %]
407                             <p class="problem">A refund has been applied to the borrowing patron's account.</p>
408                         [% ELSE %]
409                             <p class="problem">Any lost item fees for this item will remain on the patron's account</p>
410                         [% END %]
411                     [% END %]
412                     [% IF ( errmsgloo.withdrawn ) %]
413                         [% IF BlockReturnOfWithdrawnItems %]
414                            <h5>Cannot check in</h5>
415                            <p class="problem">Item is withdrawn. <strong>NOT CHECKED IN</strong></p>
416                         [% ELSE %]
417                            <p class="problem">Item is withdrawn.</p>
418                         [% END %]
419                     [% END %]
420                     [% IF ( errmsgloo.debarred ) %]
421                         <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>
422                     [% END %]
423                     [% IF ( errmsgloo.prevdebarred ) %]
424                         <p class="problem"><b>Reminder: </b>Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %]</p>
425                     [% END %]
426                     [% IF ( errmsgloo.foreverdebarred ) %]
427                         <p class="problem"><b>Reminder: </b>Patron has an indefinite restriction</p>
428                     [% END %]
429
430             [% END %]
431 [% IF ( soundon ) %]
432 <audio src="[% interface %]/[% theme %]/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
433 [% END %]
434         [% ELSE %]
435 [% IF ( soundon ) %]
436 <audio src="[% interface %]/[% theme %]/sound/beep.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
437 [% END %]
438         [% END %]
439     </div>
440
441 [% IF ( checkinmsg ) %]
442     [% IF ( checkinmsgtype == 'alert' ) %]
443         <div class="dialog alert">
444     [% ELSE %]
445         <div class="dialog message">
446     [% END %]
447             <p class="problem">[% checkinmsg | html_line_break %]</p>
448         </div>
449 [% END%]
450
451     <div id="exemptfines" class="dialog message" style="display:none;">
452         <p>Fines for returned items are forgiven.</p>
453     </div>
454     <div id="dropboxmode" class="dialog message" style="display:none;">
455         <p>Book drop mode.  (Effective checkin date is [% dropboxdate %] ).</p>
456     </div>
457 </div>
458         <div class="yui-g">
459     <form id="checkin-form" method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off" >
460     <div class="yui-u first">
461             <fieldset>
462         <legend>Check in</legend>
463             <label for="barcode">Enter item barcode: </label>
464                         [% IF ( exemptfine ) %]
465                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
466                         [% ELSIF ( dropboxmode ) %]
467                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
468                         [% ELSE %]
469                         <input name="barcode" id="barcode" size="14" class="focus"/>
470                         [% END %]
471             <input type="submit" class="submit" value="Submit" />
472
473             [% IF Koha.Preference('SpecifyReturnDate') %]
474                 <div class="date-select" id="return_date_override_fields">
475                     <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
476
477                     <input type="text" size="13" id="return_date_override" name="return_date_override" value="[% return_date_override %]" />
478
479                     <label for="return_date_override_remember"> Remember for next check in:</label>
480                     [% IF ( return_date_override_remember ) %]
481                         <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" checked="checked" />
482                     [% ELSE %]
483                         <input type="checkbox" id="return_date_override_remember" onclick="this.form.barcode.focus();" name="return_date_override_remember" />
484                     [% END %]
485
486                     <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;" />
487             </div>
488         [% END %]
489             [% FOREACH inputloo IN inputloop %]
490                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
491                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
492                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
493             [% END %]
494
495
496             </fieldset>
497             </div>
498             <div class="yui-u">
499             <fieldset id="checkin_options">
500                 <legend>Options</legend>
501                     [% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %]
502                     <p>
503                         [% IF ( exemptfine ) %]
504                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" />
505                         [% ELSE %]
506                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" />
507                         [% END %]
508                         <label for="exemptcheck">Forgive overdue charges</label>
509                     </p>
510                     [% END %] <!-- overduecharges -->
511                     <p>
512                         [% IF ( dropboxmode ) %]
513                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" />
514                         [% ELSE %]
515                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" />
516                         [% END %]
517                         <label for="dropboxcheck">Book drop mode</label>
518                     </p>
519             </fieldset>
520         </div>
521     </form>
522 </div>
523
524 [% IF ( riloop ) %]
525     <h2>Checked-in items</h2>
526     <table id="checkedintable">
527     <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>
528
529         [% FOREACH riloo IN riloop %]
530             <tr>
531             <td class="ci-duedate">[% IF ( riloo.duedate ) %]
532                     [% IF ( riloo.return_overdue ) %]
533                         <span class="overdue">[% riloo.duedate %] (overdue)</span>
534                     [% ELSE %][% riloo.duedate %]
535                     [% END %]
536                 [% ELSE %]Not checked out
537                 [% END %]
538             </td>
539             <td class="ci-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber %]">
540                     [% riloo.itemtitle |html %]</a></td>
541             <td class="ci-author">[% riloo.itemauthor %]</td>
542             <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>
543             <td class="ci-homelibrary">[% riloo.homebranch %]</td>
544             <td class="ci-holdinglibrary">[% riloo.holdingbranch %]</td>
545             <td class="ci-shelvinglocation">[% riloo.location %]</td>
546             <td class="ci-callnumber">[% riloo.itemcallnumber %]</td>
547             <td class="ci-type">[% riloo.itemtype %] [% riloo.ccode %]</td>
548             <td class="ci-patron">[% IF ( riloo.duedate ) %]
549                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riloo.borrowernumber %]">
550                     [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %])
551                 </a>
552             [% ELSE %]Not checked out[% END %]</td>
553             <td class="ci-note">[% IF ( riloo.bornote ) %]<span class="circ-hlt">[% riloo.bornote %]<br /></span>[% END %]
554             [% IF ( riloo.itemnote ) %]<span class="circ-hlt">[% riloo.itemnote %]</span>[% END %]
555             </td>
556            </tr>
557         [% END %]
558     </table></div>
559 [% END %]
560
561
562 </div>
563 [% INCLUDE 'intranet-bottom.inc' %]