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