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