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