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