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