Bug 27846: circ folder
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / returns.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% USE Koha %]
6 [% USE ItemTypes %]
7 [% USE AuthorisedValues %]
8 [% USE TablesSettings %]
9 [% PROCESS 'member-display-address-style.inc' %]
10 [% SET footerjs = 1 %]
11 [% BLOCK display_bormessagepref %]
12     [% IF ( bormessagepref ) %]
13         <li class="notification_method">Patron notification:
14             [% FOREACH mtt IN bormessagepref.keys %]
15                 [%~ IF ( mtt == 'email' ) %] Email[% END ~%]
16                 [%~ IF ( mtt == 'phone' ) %] Phone[% END ~%]
17                 [%~ IF ( mtt == 'sms' ) %] SMS[% END ~%]
18                 [%~ UNLESS loop.last %], [% ELSE %].[% END ~%]
19             [% END %]
20         </li>
21            [% ELSE %]
22         <li class="notification_method none">Patron is not notified.</li>
23     [% END %]
24 [% END %]
25
26 [% BLOCK display_holdpatron_address %]
27     [% PROCESS 'display-address-style' %]
28 [% END %]
29
30 [% INCLUDE 'doc-head-open.inc' %]
31 <title>Koha &rsaquo; Circulation &rsaquo; Check in [% title | html %]</title>
32 [% INCLUDE 'doc-head-close.inc' %]
33 </head>
34
35 <body id="circ_returns" class="circ">
36     <span class="audio-alert-success"></span>
37
38     [% INCLUDE 'header.inc' %]
39     [% INCLUDE 'checkin-search.inc' %]
40
41     <nav aria-label="Breadcrumb" class="breadcrumb">
42         <ol>
43             <li>
44                 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
45             </li>
46             <li>
47                 <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
48             </li>
49             <li>
50                 <a href="#" aria-current="page">
51                     Check in
52                 </a>
53             </li>
54         </ol>
55     </nav>
56
57     <div class="main container-fluid">
58         <div class="row">
59             <div class="col-sm-12">
60                 <main>
61                     <div class="row">
62
63                         [% IF Koha.Preference('CircSidebar') %]
64                             <div class="col-sm-10 col-sm-push-2">
65                         [% ELSE %]
66                             <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
67                         [% END %]
68
69                         [% BLOCK all_checkin_messages %]
70                             [% IF hold_auto_filled %]
71                                 <div class="dialog message hold-auto-filled">
72                                     [% IF ( reservenotes ) %]
73                                         <h4>Notes: [% reservenotes | html %]</h4>
74                                     [% END %]
75                                     <h3>Hold filled for:</h3>
76                                     <ul>
77                                         <li>
78                                             [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 %]
79                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
80                                         </li>
81
82                                         [% INCLUDE display_holdpatron_address %]
83
84                                         [% IF ( patron.phone ) %]
85                                             <li>[% patron.phone | html %]</li>
86                                         [% END %]
87
88                                         [% IF ( patron.email ) %]
89                                             <li>
90                                                 [% IF ( transfertodo ) %]
91                                                     [% patron.email | html %]
92                                                 [% ELSE %]
93                                                     <a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a>
94                                                 [% END %]
95                                             </li>
96                                         [% END %]
97
98                                         [% UNLESS ( transfertodo) %]
99                                             [% INCLUDE display_bormessagepref %]
100                                         [% END %]
101
102                                         [% IF ( patron.is_debarred ) %]
103                                             <li class="error">Patron is RESTRICTED</li>
104                                         [% END %]
105
106                                         [% IF ( patron.gonenoaddress ) %]
107                                             <li class="error">Patron's address is in doubt</li>
108                                         [% END %]
109                                     </ul>
110
111                                     [% IF ( transfertodo ) %]
112                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
113                                     [% ELSE %]
114                                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
115                                     [% END %]
116
117                                     <a href="#" class="btn btn-default print print-slip">
118                                         <i class="fa fa-print"></i> Print
119                                     </a>
120                                 </div> <!-- /.hold-auto-filled -->
121                             [% END # /IF hold_auto_filled %]
122
123                             [% IF ( trigger ) %]
124                                  <div id="transfer-trigger" class="dialog message">
125                                      <h3>Reason for transfer</h3>
126                                      <p>
127                                          [%- SWITCH trigger -%]
128                                              [%- CASE 'Manual' -%]Manual
129                                              [%- CASE 'StockrotationAdvance' -%]Stock rotation advance
130                                              [%- CASE 'StockrotationRepatriation' -%]Stock rotation repatriation
131                                              [%- CASE 'ReturnToHome' -%]Return to home library
132                                              [%- CASE 'ReturnToHolding' -%]Return to holding library
133                                              [%- CASE 'RotatingCollection' -%]Rotating collection
134                                              [%- CASE 'Reserve' -%]Reserve
135                                              [%- CASE 'LostReserve' -%]Lost reserve
136                                              [%- CASE 'CancelReserve' -%]Cancelled reserve
137                                          [%- END -%]
138                                      </p>
139                                  </div>
140                             [% END %]
141
142                             [% IF privacy == 2 AND NOT Koha.Preference('AnonymousPatron') %]
143                                 <div class="dialog alert">
144                                     <strong>Error:</strong>
145                                     This patron has requested their circulation history be anonymized on check-in, but the AnonymousPatron system preference is empty or incorrect.
146                                 </div>
147                             [% ELSIF NOT Koha.Preference('AnonymousPatron') AND Koha.Preference('OPACPrivacy') %]
148                                 <div class="dialog alert">
149                                     <strong>Error:</strong>
150                                     The system preference OPACPrivacy is set but AnonymousPatron is not! Please correct this before continuing circulation.
151                                 </div>
152                             [% END %]
153
154                             [% IF additional_materials && !needs_confirm && !multiple_confirmed %]
155                                 <div class="dialog message">
156                                     Note about the accompanying materials: [% additional_materials | html %]
157                                 </div>
158                             [% END %]
159
160                             [% IF ( collectionItemNeedsTransferred ) %]
161                                  <div id="rotating-collection" class="dialog message">
162                                     <h3>Please transfer item to: [% Branches.GetName( collectionBranch ) | html %]</h3>
163                                     <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% itembarcode | html %]: [% title | html %]</a></p>
164                                     <p>This item is part of a rotating collection.</p>
165                                     <p><button type="button" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | uri %]&amp;branchcode=[% collectionBranch | uri %]&amp;op=slip"><i class="fa fa-print"></i> Print slip</button></p>
166                                 </div>
167                             [% END %]
168
169                             <!-- Patron has added an issue note -->
170                             [% IF ( issue.note) %]
171                                 <div class="dialog message">
172                                     <h1>Patron note</h1>
173                                     <p>[% issue.notedate | $KohaDates %]</p>
174                                     <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber | uri %]"> [% title | html %]</a> [% author | html %]</p>
175                                     <p>[% issue.note | html %]</p>
176                                 </div>
177                             [% END %]
178
179                             <!-- Patron has fines -->
180                             [% IF ( fines ) %]
181                                 <div class="dialog alert">
182                                     <h3>Patron has outstanding fines of [% fines | html %].</h3>
183                                     <p><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% fineborrowernumber | uri %]">Make payment</a>.</p>
184                                 </div>
185                             [% END %]
186
187                             <!-- Item has return claim(s) -->
188                             [% IF ( ReturnClaims ) %]
189                                 <div class="dialog alert return-claim">
190                                     <h3>This item has been claimed as returned by:</h3>
191                                     <ul>
192                                         [% FOREACH rc IN ReturnClaims %]
193                                             <li>
194                                                 [% INCLUDE 'patron-title.inc' patron=rc.patron hide_patron_infos_if_needed=1 invert_name=1 %]
195                                             </li>
196                                         [% END %]
197                                     </ul>
198                                 </div>
199                             [% END %]
200
201                             <!-- Patron has waiting holds -->
202                             [% IF ( waiting_holds ) %]
203                                 <div id="awaiting-pickup" class="dialog message">
204                                     <h3>[% INCLUDE 'patron-title.inc' patron=issue.patron hide_patron_infos_if_needed=1 invert_name=1 %] has [% waiting_holds | html %] hold(s) waiting for pickup.</h3>
205                                     <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% holdsborrowernumber | uri %]">Check out to this patron</a>.</p>
206                                 </div>
207                             [% END %]
208
209                             <!-- Patron is restricted and checkin was backdated -->
210                             [% IF return_date_was_overriden && issue.patron.is_debarred %]
211                                 <div id="restricted_backdated" class="dialog message">
212                                     <h3>
213                                         [% INCLUDE 'patron-title.inc' patron=issue.patron hide_patron_infos_if_needed=1 invert_name=1 %]
214                                         is restricted. Please verify this patron should still be restricted.
215                                     </h3>
216                                 </div>
217                             [% END %]
218
219
220                             [% IF ( errmsgloop ) %]
221                                 <div class="dialog alert audio-alert-warning">
222                                     <h3>Check in message</h3>
223                                     [% IF itembiblionumber %]
224                                         <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% itembarcode | html %]: [% title | html %]</a></p>
225                                     [% END %]
226                                     [% FOREACH errmsgloo IN errmsgloop %]
227                                         [% IF ( errmsgloo.NotForLoanStatusUpdated ) %]
228                                             <p class="problem ret_nflupdate">
229                                                 Not for loan status updated.
230                                                 <br />Old value:
231                                                 [% IF errmsgloo.NotForLoanStatusUpdated.from %]
232                                                     <span class="ret_updatedfrom">
233                                                         [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => errmsgloo.NotForLoanStatusUpdated.from ) | html %].
234                                                     </span>
235                                                 [% ELSE %]
236                                                     Available for loan.
237                                                 [% END %]
238                                                 <br />New value:
239                                                 [% IF errmsgloo.NotForLoanStatusUpdated.to %]
240                                                     <span class="ret_updatedto">
241                                                         [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.notforloan', authorised_value => errmsgloo.NotForLoanStatusUpdated.to ) | html %].
242                                                     </span>
243                                                 [% ELSE %]
244                                                     Available for loan.
245                                                 [% END %]
246                                             </p>
247                                         [% END %]
248                                         [% IF ( errmsgloo.ItemLocationUpdated ) %]
249                                              <p class="problem ret_location_update">
250                                                  Item shelving location updated.
251                                                 <br />Old value:
252                                                 [% IF errmsgloo.ItemLocationUpdated.from %]
253                                                     [% SET av_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => errmsgloo.ItemLocationUpdated.from ) %]
254                                                     [% IF errmsgloo.ItemLocationUpdated.from == '' %]
255                                                         empty
256                                                     [% ELSIF av_description == '' %]
257                                                         [% errmsgloo.ItemLocationUpdated.from | html %] (No description available)
258                                                     [% ELSE %]
259                                                         [% av_description | html %]
260                                                     [% END %]
261                                                 [% ELSE %]
262                                                     "Blank"
263                                                 [% END %]
264                                                 <br />New value:
265                                                 [% IF errmsgloo.ItemLocationUpdated.to %]
266                                                     [% SET av_description = AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => errmsgloo.ItemLocationUpdated.to ) %]
267                                                     [% IF errmsgloo.ItemLocationUpdated.to == '' %]
268                                                         empty
269                                                     [% ELSIF av_description == '' %]
270                                                         [% errmsgloo.ItemLocationUpdated.to | html %] (Not an authorized value)
271                                                     [% ELSE %]
272                                                         [% av_description | html %]
273                                                     [% END %]
274                                                 [% ELSE %]
275                                                     "Blank"
276                                                 [% END %]
277                                              </p>
278                                         [% END %]
279                                         [% IF ( errmsgloo.badbarcode ) %]
280                                             <p class="problem ret_badbarcode">No item with barcode: [% errmsgloo.msg | html %]</p>
281                                         [% END %]
282                                         [% IF ( errmsgloo.ispermanent ) %]
283                                             <p class="problem ret_ispermenant">Please return item to: [% Branches.GetName( errmsgloo.msg ) | html %]</p>
284                                         [% END %]
285                                         [% IF ( errmsgloo.notissued ) %]
286                                             <p class="problem ret_notissued">Not checked out.</p>
287                                         [% END %]
288                                         [% IF ( errmsgloo.localuse) %]
289                                             <p class="problem ret_localuse">Local use recorded</p>
290                                         [% END %]
291                                         [% IF ( errmsgloo.transferred ) %]
292                                             <p class="problem ret_transferred">Item received from [% Branches.GetName( errmsgloo.transferred ) | html %]</p>
293                                         [% END %]
294                                         [% IF ( errmsgloo.waslost ) %]
295                                             [% IF Koha.Preference('BlockReturnOfLostItems') %]
296                                                 <p class="problem ret_blocked">Item is lost, cannot be checked in.</p>
297                                             [% ELSE %]
298                                                 <p class="problem ret_checkedin">Item was lost, now found.</p>
299                                             [% END %]
300                                             [% IF LostItemFeeRefunded and not Koha.Preference('BlockReturnOfLostItems') %]
301                                                 <p class="problem ret_refund">A refund has been applied to the borrowing patron's account.</p>
302                                             [% ELSIF LostItemFeeCharged and not Koha.Preference('BlockReturnOfLostItems') %]
303                                                 <p class="problem ret_charged">A refund for the lost item charge has been applied to the borrowing patron's account, and new overdue charge has been calculated and applied.</p>
304                                             [% ELSIF LostItemFeeRestored and not Koha.Preference('BlockReturnOfLostItems') %]
305                                                 <p class="problem ret_restored">A refund for the lost item charge has been applied to the borrowing patron's account and if an overdue fine was forgiven when the item was marked as lost, it has been reverted.</p>
306                                             [% ELSIF Koha.Preference('BlockReturnOfLostItems') %]
307                                                <h5>Cannot check in</h5>
308                                                <p><strong>NOT CHECKED IN</strong></p>
309                                             [% ELSE %]
310                                                 <p class="problem ret_feeremains">Any lost item fees for this item will remain on the patron's account.</p>
311                                             [% END %]
312                                         [% END %]
313                                         [% IF ( errmsgloo.withdrawn ) %]
314                                             [% IF Koha.Preference('BlockReturnOfWithdrawnItems') %]
315                                                <h5>Cannot check in</h5>
316                                                <p><strong>NOT CHECKED IN</strong></p>
317                                             [% END %]
318                                            <p class="problem ret_withdrawn">Item is withdrawn.</p>
319                                         [% END %]
320                                         [% IF ( errmsgloo.debarred ) %]
321                                             <p class="problem ret_debarred"><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% errmsgloo.debarborrowernumber | uri %]">[% errmsgloo.debarname | html %]([% errmsgloo.debarcardnumber | html %])</a> is now debarred until [% errmsgloo.debarred | $KohaDates %].</p>
322                                         [% END %]
323                                         [% IF ( errmsgloo.prevdebarred ) %]
324                                             <p class="problem ret_prevdebarred"><strong>Reminder: </strong>Patron was earlier restricted until [% errmsgloo.prevdebarred | $KohaDates %].</p>
325                                         [% END %]
326                                         [% IF ( errmsgloo.foreverdebarred ) %]
327                                             <p class="problem ret_foreverdebarred"><strong>Reminder: </strong>Patron has an indefinite restriction.</p>
328                                         [% END %]
329                                         [% IF errmsgloo.data_corrupted %]
330                                             <p class="problem ret_datacorrupt">The item has not been checked in due to a configuration issue in your system. You must ask an administrator to take a look at the <a href="/cgi-bin/koha/about.pl#sysinfo">about page</a> and correct all errors shown on the "System information" tab</p>
331                                         [% END %]
332                                     [% END # /FOREACH errmsgloo %]
333                                 </div> <!-- /.dialog.dialog-alert -->
334                             [% END #/IF errmsgloop %]
335
336                             [% IF ( checkinmsg ) %]
337                                 [% IF ( checkinmsgtype == 'alert' ) %]
338                                     <div class="dialog alert">
339                                 [% ELSE %]
340                                     <div class="dialog message">
341                                 [% END %]
342                                         <p class="problem ret_checkinmsg">[% checkinmsg | html_line_break %]</p>
343                                     </div>
344                             [% END # /IF checkinmsg %]
345                         [% END # /BLOCK all_checkin_messages %]
346
347                         [% IF needs_confirm %]
348                             <div id="circ-needsconfirmation-modal" class="modal fade audio-alert-action block">
349                                 <div class="modal-dialog">
350                                     <div class="modal-content">
351                                         <div class="modal-header">
352                                             <h3>Please confirm checkin</h3>
353                                         </div>
354                                         <div class="modal-body">
355                                             <ul>
356                                                 <li>
357                                                     Please confirm that the accompanying materials are present: <strong>[% additional_materials | html %]</strong>
358                                                 </li>
359                                             </ul>
360                                         </div>
361                                         <div class="modal-footer">
362                                             <form method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off">
363                                                 <input type="hidden" name="barcode" value="[% itembarcode | html %]" />
364                                                 <input type="hidden" name="multiple_confirm" value="1" />
365                                                 [% FOREACH inputloo IN inputloop %]
366                                                     <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
367                                                     <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
368                                                     <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
369                                                 [% END %]
370                                                 <button type="submit" class="approve" accesskey="y"><i class="fa fa-check"></i> Yes, checkin (Y)</button>
371                                             </form>
372                                             <button type="button" data-dismiss="modal" class="deny" accesskey="n"><i class="fa fa-times"></i> No, don't checkin (N)</button>
373                                         </div>
374                                     </div>
375                                 </div>
376                             </div>
377                         [% END %]
378
379                         [% IF wrongbranch %]
380                             <div id="wrong-branch-modal" class="modal fade audio-alert-action block">
381                                 <div class="modal-dialog">
382                                     <div class="modal-content">
383                                         <form method="post" action="returns.pl" name="mainform" id="mainform">
384                                             <div class="modal-header">
385                                                 <h3>
386                                                     Cannot check in
387                                                 </h3>
388                                             </div>
389                                             <div class="modal-body">
390                                                 <p>
391                                                     <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
392                                                         [% itembarcode | html %]: [% title | html %]
393                                                     </a>
394                                                 </p>
395                                                 <p>
396                                                     <strong>
397                                                         NOT CHECKED IN
398                                                     </strong>
399                                                 </p>
400                                                 <p>
401                                                     This item must be checked in at following library:
402                                                     <strong>
403                                                         [% Branches.GetName( rightbranch ) | html %]
404                                                     </strong>
405                                                 </p>
406                                                 [% INCLUDE all_checkin_messages %]
407                                             </div> <!-- /.modal-body -->
408                                             <div class="modal-footer">
409                                                 <button type="button" data-dismiss="modal" class="btn btn-default approve"><i class="fa fa-check"></i> OK</button>
410                                             </div>
411                                         </form> <!-- /#mainform -->
412                                     </div> <!-- /.modal-content -->
413                                 </div> <!-- /.modal-dialog -->
414                             </div> <!-- /#wrong-branch-modal -->
415                         [% END # /IF wrongbranch %]
416
417                         <!-- case of a mistake in transfer loop -->
418                         [% UNLESS ( hold_auto_filled && diffbranch ) %]
419                             [% IF WrongTransfer && !transfertodo %]
420                                 [% IF Koha.Preference('TransfersBlockCirc') %]
421                                     <div id="wrong-transfer-modal" class="modal fade audio-alert-action block">
422                                 [% ELSE %]
423                                     <div id="wrong-transfer-modal" class="modal fade audio-alert-action noblock">
424                                 [% END %]
425                                     <div class="modal-dialog">
426                                         <div class="modal-content">
427                                             <div class="modal-header">
428                                                 <h3>
429                                                     Please return item to: [% Branches.GetName( TransferWaitingAt ) | html %]
430                                                 </h3>
431                                             </div>
432                                             <div class="modal-body">
433                                                 <p>
434                                                     <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
435                                                         [% itembarcode | html %]: [% title | html %]
436                                                     </a>
437                                                 </p>
438                                                 [% INCLUDE all_checkin_messages %]
439                                             </div>
440                                             <div class="modal-footer">
441                                                 <!-- CONFIRM -->
442                                                 <button type="button" data-dismiss="modal" class="btn btn-default approve"><i class="fa fa-check"></i> OK</button>
443                                                 <!-- PRINT SLIP -->
444                                                 <button type="button" data-dismiss="modal" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | uri %]&amp;&amp;branchcode=[% TransferWaitingAt | uri %]&amp;op=slip"><i class="fa fa-print"></i> Print transfer slip</button>
445                                                 <!-- CANCEL TRANSFER -->
446                                                 <form method="post" action="returns.pl" name="mainform">
447                                                     <button class="btn btn-default deny" type="submit"><i class="fa fa-times"></i> Cancel transfer</button>
448                                                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
449                                                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
450                                                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
451                                                     <input type="hidden" name="canceltransfer" value="1" />
452                                                     [% FOREACH inputloo IN inputloop %]
453                                                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
454                                                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
455                                                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
456                                                     [% END %]
457                                                 </form> <!-- /mainform -->
458                                             </div> <!-- /.modal-footer -->
459                                         </div> <!-- /.modal-content -->
460                                     </div> <!-- /.modal-dialog -->
461                                 </div> <!-- /#wrong-transfer-modal -->
462                             [% END # /IF WrongTransfer && !transfertodo %]
463                         [% END # /UNLESS hold_auto_filled && diffbranch %]
464
465                         [% IF ( found ) %]
466                             [% IF ( waiting ) %]
467                                 <div id="hold-found1" class="modal fade audio-alert-action block">
468                                     <div class="modal-dialog">
469                                         <div class="modal-content">
470                                             <form method="post" action="returns.pl" class="confirm">
471                                                 <div class="modal-header">
472                                                     <h3>
473                                                         Hold found (item is already waiting):
474                                                         <br/>
475                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% title | html %]</a>
476                                                         <div class="hold-found-barcode">
477                                                             <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]">[% itembarcode | html %]</a>
478                                                         </div>
479                                                     </h3>
480                                                 </div>
481
482                                                 <div class="modal-body">
483                                                     [% IF ( reservenotes ) %]
484                                                         <h4>Notes: [% reservenotes | html %]</h4>
485                                                     [% END %]
486
487                                                     <h4>Hold for:</h4>
488                                                     <ul>
489                                                         <li>
490                                                             [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_reserves" %]
491                                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
492                                                         </li>
493                                                         [% INCLUDE display_holdpatron_address %]
494                                                         [% IF ( patron.phone ) %]
495                                                             <li> [% patron.phone | html %]</li>
496                                                         [% END %]
497
498                                                         [% IF ( patron.email ) %]
499                                                             <li><a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a></li>
500                                                         [% END %]
501
502                                                         [% IF ( patron.is_debarred ) %]
503                                                             <li class="error">Patron is RESTRICTED</li>
504                                                         [% END %]
505
506                                                         [% IF ( patron.gonenoaddress ) %]
507                                                             <li class="error">Patron's address is in doubt</li>
508                                                         [% END %]
509                                                     </ul>
510
511                                                     [% IF ( transfertodo ) %]
512                                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
513                                                     [% ELSE %]
514                                                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
515                                                     [% END %]
516
517                                                     [% FOREACH inputloo IN inputloop %]
518                                                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
519                                                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
520                                                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
521                                                     [% END %]
522
523                                                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
524                                                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
525                                                     <input type="hidden" name="biblionumber" value="[% itembiblionumber | html %]" />
526                                                     <input type="hidden" name="reserve_id" value="[% reserve_id | html %]" />
527                                                     <input type="hidden" name="diffBranch" value="[% destbranch | html %]" />
528                                                     <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
529                                                     <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
530                                                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
531
532                                                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
533                                                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
534                                                     [% INCLUDE all_checkin_messages %]
535                                                 </div> <!-- /.modal-body -->
536
537                                                 <div class="modal-footer">
538                                                     <input type="hidden" name="cancel_reserve" value="0" />
539                                                     <input id="confirm-hold-barcode" type="hidden" name="barcode" value="[% barcode | html %]" />
540
541                                                     <button type="submit" class="btn btn-default approve" data-dismiss="modal">
542                                                         <i class="fa fa-check"></i> Confirm hold
543                                                     </button>
544
545                                                     <input type="hidden" name="print_slip" value="0" />
546                                                     <button type="button" class="btn btn-default print">
547                                                         <i class="fa fa-print"></i> Print slip and confirm
548                                                     </button>
549
550                                                     <button type="button" class="btn btn-default deny cancel-hold">
551                                                         <i class="fa fa-times"></i> Cancel hold
552                                                     </button>
553                                                 </div> <!-- /.modal-footer -->
554                                             </form> <!-- /.confirm -->
555                                         </div> <!-- /.modal-content -->
556                                     </div> <!-- /.modal-dialog -->
557                                 </div> <!-- /#hold-found1 -->
558                             [% END # /IF waiting %]
559
560                             [% IF transfer || needstransfer %]
561                                 [% IF Koha.Preference('TransfersBlockCirc') %]
562                                     <div id="item-transfer-modal" class="modal fade audio-alert-action block">
563                                 [% ELSE %]
564                                     <div id="item-transfer-modal" class="modal fade audio-alert-action noblock">
565                                 [% END %]1
566                                     <div class="modal-dialog">
567                                         <div class="modal-content">
568                                             <form method="post" action="returns.pl" name="mainform" id="mainform">
569
570                                                 <input type="hidden" name="print_slip" value="0" />
571
572                                                 <div class="modal-header">
573                                                     <h3>
574                                                         Please return this item to [% IF transfer %][% Branches.GetName( transfer ) | html %][% ELSE %][% Branches.GetName( returnbranch ) | html %][% END %]
575                                                     </h3>
576                                                 </div>
577                                                 <div class="modal-body">
578                                                     <p>
579                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">
580                                                             [% itembarcode | html %]: [% title | html %]
581                                                         </a>
582                                                     </p>
583                                                     [% IF !transfer %]
584                                                         <p>
585                                                             Transfer now?
586                                                         </p>
587                                                     [% END %]
588                                                     <input type="hidden" name="tobranch" value="[% returnbranch | html %]" />
589                                                     <input type="hidden" name="transferitem" value="[% itemnumber | html %]" />
590                                                     <input type="hidden" name="barcode" value="0" />
591                                                     <input type="hidden" name="trigger" value="[% trigger | html %]" />
592                                                     [% INCLUDE all_checkin_messages %]
593                                                 </div>
594                                                 <div class="modal-footer">
595                                                     [% IF !transfer %]
596                                                         <button type="submit" name="dotransfer" value="Yes" class="btn btn-default approve"><i class="fa fa-check"></i> Yes</button>
597                                                         <button type="button" name="dotransfer" value="Yes" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | uri %]&amp;&amp;branchcode=[% returnbranch | uri %]&amp;op=slip"><i class="fa fa-print"></i> Yes, print slip</button>
598                                                         <button type="button" data-dismiss="modal" class="btn btn-default deny" name="notransfer" value="No"><i class="fa fa-times"></i> No</button>
599                                                     [% ELSE %]
600                                                         <button type="button" data-dismiss="modal" class="btn btn-default approve"><i class="fa fa-check"></i> OK</button>
601                                                         <button type="button" data-dismiss="modal" name="dotransfer" class="btn btn-default print openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber | uri %]&amp;branchcode=[% transfer | uri %]&amp;op=slip"><i class="fa fa-print"></i> Print slip</button>
602                                                     [% END %]
603                                                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
604                                                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
605                                                     <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
606                                                     <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
607                                                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
608                                                     [% FOREACH inputloo IN inputloop %]
609                                                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
610                                                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
611                                                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
612                                                     [% END %]
613                                                 </div> <!-- /.modal-footer -->
614                                             </form> <!-- /#mainform -->
615                                         </div> <!-- /.modal-content -->
616                                     </div> <!-- /.modal-dialog -->
617                                 </div> <!-- /#item-transfer-modal -->
618                             [% END # /IF transfer || needstransfer %]
619
620                             <!-- case of simple return no issue or transfer but with a reservation  -->
621                             [% IF ( reserved ) %]
622                                 <!-- reserved -->
623                                 <div id="hold-found2" class="modal fade audio-alert-action block">
624                                     <div class="modal-dialog">
625                                         <div class="modal-content">
626                                             <form method="post" action="returns.pl" class="confirm">
627
628                                                 <input type="hidden" name="print_slip" value="0" />
629
630                                                 <div class="modal-header">
631                                                     <h3>
632                                                         Hold found:
633                                                         <br/>
634                                                         <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber | uri %]">[% title | html %]</a>
635                                                         <div class="hold-found-barcode">
636                                                             (<a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% itembiblionumber | uri %]&amp;itemnumber=[% itemnumber | uri %]">[% itembarcode | html %]</a>)
637                                                         </div>
638                                                     </h3>
639                                                 </div>
640
641                                                 <div class="modal-body">
642                                                     [% IF ( reservenotes ) %]
643                                                         <h4>Notes:</h4>
644                                                         <p>[% reservenotes | html %]</p>
645                                                         <hr />
646                                                     [% END %]
647                                                     <h5>Hold for:</h5>
648                                                     <ul>
649                                                         <li>
650                                                             [% INCLUDE 'patron-title.inc' patron=patron hide_patron_infos_if_needed=1 invert_name=1 link_to="circulation_reserves" %]
651                                                             <span class="patron-category"> - [% patron.category.description | html %]</span>
652                                                         </li>
653
654                                                         [% INCLUDE display_holdpatron_address %]
655
656                                                         [% IF ( patron.phone ) %]
657                                                             <li>[% patron.phone | html %]</li>
658                                                         [% END %]
659
660                                                         [% IF ( patron.email ) %]
661                                                             <li>
662                                                                 [% IF ( transfertodo ) %]
663                                                                     [% patron.email | html %]
664                                                                 [% ELSE %]
665                                                                     <a id="boremail" href="mailto:[% patron.email | html %]">[% patron.email | html %]</a>
666                                                                 [% END %]
667                                                             </li>
668                                                         [% END %]
669
670                                                         [% UNLESS ( transfertodo) %]
671                                                             [% INCLUDE display_bormessagepref %]
672                                                         [% END %]
673
674                                                         [% IF ( patron.is_debarred ) %]
675                                                             <li class="error">Patron is RESTRICTED</li>
676                                                         [% END %]
677
678                                                         [% IF ( patron.gonenoaddress ) %]
679                                                             <li class="error">Patron's address is in doubt</li>
680                                                         [% END %]
681                                                     </ul>
682                                                     [% IF ( transfertodo ) %]
683                                                         <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) | html %]</h4>
684                                                     [% ELSE %]
685                                                         <h4><strong>Hold at</strong> [% Branches.GetName( destbranch ) | html %]</h4>
686                                                     [% END %]
687
688                                                     [% FOREACH inputloo IN inputloop %]
689                                                         <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
690                                                         <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
691                                                         <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
692                                                     [% END %]
693
694                                                     <input type="hidden" name="itemnumber" value="[% itemnumber | html %]" />
695                                                     <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" />
696                                                     <input type="hidden" name="biblionumber" value="[% itembiblionumber | html %]" />
697                                                     <input type="hidden" name="reserve_id" value="[% reserve_id | html %]" />
698                                                     <input type="hidden" name="diffBranch" value="[% destbranch | html %]" />
699                                                     <input type="hidden" name="exemptfine" value="[% exemptfine | html %]" />
700                                                     <input type="hidden" name="dropboxmode" value="[% dropboxmode | html %]" />
701                                                     <input type="hidden" name="forgivemanualholdsexpire" value="[% forgivemanualholdsexpire | html %]" />
702                                                     <input type="hidden" name="return_date_override" value="[% return_date_override | html %]" />
703                                                     <input type="hidden" name="return_date_override_remember" value="[% return_date_override_remember | html %]" />
704                                                     [% INCLUDE all_checkin_messages %]
705                                                 </div>
706
707                                                 <div class="modal-footer">
708                                                     [% IF ( transfertodo ) %]
709                                                         <button type="submit" class="btn btn-default approve">
710                                                             <i class="fa fa-check"></i> Confirm hold and transfer
711                                                         </button>
712                                                         <button type="button" class="btn btn-default print">
713                                                             <i class="fa fa-print"></i> Print slip, transfer, and confirm
714                                                         </button>
715                                                     [% ELSE %]
716                                                         <button type="submit" class="btn btn-default approve">
717                                                             <i class="fa fa-check"></i> Confirm hold
718                                                         </button>
719                                                         <button type="button" class="btn btn-default print">
720                                                             <i class="fa fa-print"></i> Print slip and confirm
721                                                         </button>
722                                                     [% END %]
723
724                                                     <button data-dismiss="modal" aria-hidden="true" type="submit" class="btn btn-default deny">
725                                                         <i class="fa fa-times"></i> Ignore
726                                                     </button>
727                                                 </div> <!-- /.modal-footer -->
728                                             </form> <!-- /.confirm -->
729                                         </div> <!-- /.modal-content -->
730                                     </div> <!-- /.modal-dialog -->
731                                 </div> <!-- /#hold-found2 -->
732                             [% END #/IF reserved %]
733                         [% END # /IF found %]
734
735                         <div class="static_checkin_messages">
736                             [% INCLUDE all_checkin_messages %]
737                         </div>
738
739                         <form id="checkin-form" method="post" action="/cgi-bin/koha/circ/returns.pl" autocomplete="off" >
740                             <fieldset id="circ_returns_checkin">
741                                 <div class="show_checkin_dialog" style="float:right;display:none"><button type="button" class="btn btn-default btn-sm" data-toggle="tooltip" title="Show the last checkin message"><i class="fa fa-info"></i></button></div>
742                                 <h3>Check in</h3>
743                                 <div class="row">
744                                     <div class="col-sm-6">
745                                         <div class="hint">Enter item barcode:</div>
746                                             <div class="form-control-group">
747                                                 [% IF ( exemptfine ) %]
748                                                     <input name="barcode" id="barcode" size="14" class="focus input-warning" type="text" />
749                                                 [% ELSIF ( dropboxmode ) %]
750                                                     <input name="barcode" id="barcode" size="14" class="barcode focus input-warning" />
751                                                 [% ELSE %]
752                                                     <input name="barcode" id="barcode" size="14" class="barcode focus" />
753                                                 [% END %]
754                                                 <button type="submit" class="btn btn-default">Check in</button>
755                                                 [% FOREACH inputloo IN inputloop %]
756                                                     <input type="hidden" name="ri-[% inputloo.counter | html %]" value="[% inputloo.barcode | html %]" />
757                                                     <input type="hidden" name="dd-[% inputloo.counter | html %]" value="[% inputloo.duedate | html %]" />
758                                                     <input type="hidden" name="bn-[% inputloo.counter | html %]" value="[% inputloo.borrowernumber | html %]" />
759                                                 [% END %]
760                                             </div>
761                                         <div id="show-circ-settings">
762                                             <a href="#"><i class="fa circ-settings-icon fa-caret-down"></i> Checkin settings</a>
763                                         </div>
764                                     </div>
765                                     <div class="col-sm-6">
766                                         [% IF ( exemptfine ) %]
767                                             <div id="exemptfines" class="checkin-active-setting">
768                                         [% ELSE %]
769                                             <div id="exemptfines" class="checkin-active-setting" style="display:none;">
770                                         [% END %]
771                                             <p><i class="fa fa-check"></i> Fines for returned items are forgiven.</p>
772                                         </div>
773
774                                         [% IF ( forgivemanualholdsexpire ) %]
775                                             <div id="forgivemanualholdsexpire-alert" class="checkin-active-setting">
776                                         [% ELSE %]
777                                             <div id="forgivemanualholdsexpire-alert" class="checkin-active-setting" style="display:none;">
778                                         [% END %]
779                                                 <p><i class="fa fa-check"></i> Fines are not charged for manually cancelled holds.</p>
780                                             </div>
781
782                                         [% IF ( dropboxmode ) %]
783                                             <div id="dropboxmode" class="checkin-active-setting">
784                                         [% ELSE %]
785                                             <div id="dropboxmode" class="checkin-active-setting" style="display:none;">
786                                         [% END %]
787                                             <p><i class="fa fa-check"></i> Book drop mode. <span class="single-line">( Effective checkin date is [% dropboxdate | $KohaDates with_hours => 1 %] )</span></p>
788                                         </div>
789                                         [% IF ( return_date_override_remember ) %]
790                                             <div id="return_date_remember" class="checkin-active-setting">
791                                         [% ELSE %]
792                                             <div id="return_date_remember" class="checkin-active-setting" style="display:none;">
793                                         [% END %]
794                                             <p><i class="fa fa-check"></i> Saved check-in date: <span id="saved_return_date" class="single-line">[% return_date_override | html %]</span></p>
795                                         </div>
796                                     </div>
797                                 </div>
798
799                                 <div class="circ-settings">
800                                     [% IF Koha.Preference('SpecifyReturnDate') %]
801                                         <div class="date-select" id="return_date_override_fields">
802                                             <div class="hint">Specify return date [% INCLUDE 'date-format.inc' %]: </div>
803
804                                             <input type="text" size="13" id="return_date_override" name="return_date_override" value="[% return_date_override | html %]" />
805
806
807
808                                             <button type="button" class="action btn btn-default btn-xs" id="cleardate" name="cleardate">Clear</button>
809                                             <div class="circ-setting">
810                                                 [% IF ( return_date_override_remember ) %]
811                                                     <input type="checkbox" id="return_date_override_remember" name="return_date_override_remember" checked="checked" />
812                                                 [% ELSE %]
813                                                     <input type="checkbox" id="return_date_override_remember" name="return_date_override_remember" />
814                                                 [% END %]
815                                                 <label for="return_date_override_remember"> Remember return date for next check in</label>
816                                             </div>
817                                         </div> <!-- /.date-select -->
818                                     [% END %]
819
820                                     [% IF ( CAN_user_updatecharges_writeoff && overduecharges ) %]
821                                         <div id="forgive-overdue-fines" class="circ-setting">
822                                             [% IF ( exemptfine ) %]
823                                                 <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" />
824                                             [% ELSE %]
825                                                 <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" />
826                                             [% END %]
827                                             <label for="exemptcheck">Forgive overdue charges</label>
828                                         </div>
829                                     [% END %] <!-- overduecharges -->
830
831                                     <div id="book-drop-mode" class="circ-setting">
832                                         [% IF ( dropboxmode ) %]
833                                             <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" />
834                                         [% ELSE %]
835                                             <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" />
836                                         [% END %]
837                                         <label for="dropboxcheck">Book drop mode</label>
838                                     </div>
839
840                                     [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %]
841                                         <div class="forgive-manual-hold-fees circ-setting">
842                                             [% IF ( forgivemanualholdsexpire ) %]
843                                                 <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" checked="checked" />
844                                             [% ELSE %]
845                                                 <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" />
846                                             [% END %]
847                                             <label for="forgivemanualholdsexpire">Forgive fees for manually expired holds</label>
848                                         </div>
849                                     [% END %] <!-- overduecharges -->
850
851                                 </div> <!-- /.circ-settings -->
852                             </fieldset> <!-- /#circ_returns_checkin -->
853                         </form> <!-- /#checkin-form -->
854
855                         [% IF ( riloop ) %]
856                             <h2>Checked-in items</h2>
857                             <table id="checkedintable">
858                                 <thead>
859                                     <tr>
860                                         <th class="ci-duedate">Due date</th>
861                                         <th class="ci-title">Title</th>
862                                         <th class="ci-author">Author</th>
863                                         <th class="ci-barcode">Barcode</th>
864                                         <th class="ci-homelibrary">Home library</th>
865                                         <th class="ci-holdinglibrary">Holding library</th>
866                                         <th class="ci-shelvinglocation">Shelving location</th>
867                                         <th class="ci-callnumber">Call number</th>
868                                         <th class="ci-dateaccessioned">Date acquired</th>
869                                         <th class="ci-recordlevelitemtype">Record-level itemtype</th>
870                                         <th class="ci-itemtype">Item type</th>
871                                         <th class="ci-collection">Collection</th>
872                                         <th class="ci-patron">Patron</th>
873                                         <th class="ci-note">Note</th>
874                                     </tr>
875                                 </thead>
876
877                                 [% FOREACH riloo IN riloop %]
878                                     <tr>
879                                         <td class="ci-duedate">
880                                             [% IF ( riloo.duedate ) %]
881                                                 [% IF ( riloo.return_overdue ) %]
882                                                     <span class="overdue">[% riloo.duedate | html %] (overdue)</span>
883                                                 [% ELSE %]
884                                                     [% riloo.duedate | html %]
885                                                 [% END %]
886                                             [% ELSE %]
887                                                 Not checked out
888                                             [% END %]
889                                             [% IF ( riloo.damaged ) %]
890                                                 <span class="dmg">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.damaged', authorised_value => riloo.damaged ) | html %]</span>
891                                             [% END %]
892                                         </td>
893                                         <td class="ci-title">
894                                             <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber | uri %]">
895                                                 [% riloo.itemtitle | html %]
896                                                 [% FOREACH subtitle IN riloo.subtitle.split(' \\| ') %] <span class="subtitle">[% subtitle | html %]</span>[% END %]
897                                                 [% FOREACH part_number IN riloo.part_number.split(' \\| ') %] <span class="part_number">[% part_number | html %]</span>[% END %]
898                                                 [% FOREACH part_name IN riloo.part_name.split(' \\| ') %] <span class="part_name">[% part_name | html %]<span>[% END %]
899                                             </a>
900                                             [% IF ( riloo.enumchron ) %]
901                                                 <br/>
902                                                 <span class="item_enumeration" style="white-space: nowrap;">[% riloo.enumchron | html %]</span>
903                                             [% END %]
904                                         </td>
905                                         <td class="ci-author">[% riloo.itemauthor | html %]</td>
906                                         <td class="ci-barcode">
907                                             <a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber | uri %]&amp;itemnumber=[% riloo.itemnumber | uri %]#item[% riloo.itemnumber | uri %]">[% riloo.barcode | html %]</a>
908                                         </td>
909                                         <td class="ci-homelibrary">
910                                             [% Branches.GetName( riloo.homebranch ) | html %]
911                                         </td>
912                                         <td class="ci-holdinglibrary">
913                                             [% Branches.GetName( riloo.holdingbranch ) | html %]
914                                         </td>
915                                         <td class="ci-shelvinglocation">
916                                             <span class="shelvingloc">[% riloo.location | html %]</span>
917                                         </td>
918                                         <td class="ci-callnumber">
919                                             [% riloo.itemcallnumber | html %]
920                                         </td>
921                                         <td class="ci-dateaccessioned">
922                                             [% riloo.dateaccessioned | $KohaDates %]
923                                         </td>
924                                         <td class="ci-recordlevelitemtype">
925                                             [% ItemTypes.GetDescription( riloo.recordtype ) | html %]
926                                         </td>
927                                         <td class="ci-itemtype">
928                                             [% ItemTypes.GetDescription( riloo.itemtype ) | html %]
929                                         </td>
930                                         <td class="ci-collection">
931                                             [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => riloo.ccode) | html %]
932                                         </td>
933                                         <td class="ci-patron">
934                                             [% IF ( riloo.duedate ) %]
935                                                 [% INCLUDE 'patron-title.inc' patron=riloo.patron hide_patron_infos_if_needed=1 invert_name=1 %]
936                                                 [% IF riloo.borissuescount %]
937                                                     <span class="results_summary nowrap">
938                                                         <span class="label">Checkouts:</span>
939                                                         <span class="number_box">
940                                                             <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% riloo.patron.borrowernumber | uri %]">[% riloo.borissuescount | html %]</a>
941                                                         </span>
942                                                     </span>
943                                                 [% END %]
944                                                 <a class="btn btn-default btn-xs printcheckinslip" href="#" data-borrowernumber="[% riloo.patron.borrowernumber | html %]"><i class="fa fa-print"></i> Print checkin slip</a>
945                                             [% ELSE %]
946                                                 Not checked out
947                                             [% END %]
948                                         </td>
949                                         <td class="ci-note">
950                                             [% IF ( riloo.patron.borrowernotes ) %]
951                                                 <p><span class="circ-hlt patron-note">[% riloo.patron.borrowernotes | html %]</span></p>
952                                             [% END %]
953                                             [% IF ( riloo.itemnote ) %]
954                                                 <p><span class="circ-hlt item-note-public">[% riloo.itemnote | html %]</span></p>
955                                             [% END %]
956                                             [% IF ( riloo.itemnotes_nonpublic ) %]
957                                                 <p><span class="circ-hlt item-note-nonpublic">[% riloo.itemnotes_nonpublic | html %]</span></p>
958                                             [% END %]
959                                         </td>
960                                     </tr>
961                                 [% END # /FOREACH riloo %]
962                             </table> <!-- /#checkedintable -->
963                         [% END # /IF riloop %]
964
965                     [% IF Koha.Preference('CircSidebar') %]
966                             </div> <!-- /.col-sm-10.col-sm-push-2 -->
967                             <div class="col-sm-2 col-sm-pull-10">
968                                 <aside>
969                                     [% INCLUDE 'circ-nav.inc' %]
970                                 </aside>
971                             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
972                         </div> <!-- /.row -->
973                     [% ELSE %]
974                             </div> <!-- /.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2 -->
975                         </div> <!-- /.row -->
976                     [% END %]
977
978                 </main>
979             </div> <!-- /.col-sm-12 -->
980         </div> <!-- /.row -->
981
982 [% MACRO jsinclude BLOCK %]
983     [% INCLUDE 'datatables.inc' %]
984     [% INCLUDE 'columns_settings.inc' %]
985     [% INCLUDE 'calendar.inc' %]
986     [% Asset.js("lib/jquery/plugins/jquery-ui-timepicker-addon.min.js") | $raw %]
987     [% Asset.js("js/pages/circulation.js") | $raw %]
988     [% INCLUDE 'timepicker.inc' %]
989
990     <script>
991         function Dopop(link) {
992             var newin = window.open(link, 'popup', 'width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
993             $("#barcode").focus();
994         }
995         $(document).ready(function () {
996             $("#checkin-form").preventDoubleFormSubmit();
997             $(".modal.block").modal({ backdrop: 'static'}).on('shown.bs.modal', function() {
998                 $("#barcode").prop("disabled", true);
999                 $(".show_checkin_dialog").show();
1000             }).on('hidden.bs.modal', function() {
1001                 $("#barcode").prop("disabled", false).focus();
1002             });
1003             $(".modal.noblock").modal({ backdrop: 'static'}).on('shown.bs.modal', function() {
1004                 $("#barcode").prop("disabled", false).focus();
1005             }).on('hidden.bs.modal', function() {
1006                 $("#barcode").prop("disabled", false).focus();
1007             });
1008
1009             $("body").on("click", ".show_checkin_dialog button", function(e){
1010                 e.preventDefault();
1011                 $(".modal").modal("show");
1012             });
1013             [% IF reserve_id %]
1014                 $(".print-slip").on('click', function(e) {
1015                     e.preventDefault();
1016                     Dopop('hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]');
1017                 });
1018                 [% IF print_slip %]
1019                     Dopop('hold-transfer-slip.pl?reserve_id=[% reserve_id | uri %]');
1020                 [% END %]
1021             [% END %]
1022             var columns_settings = [% TablesSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) | $raw %]
1023             var returns_table = KohaTable("checkedintable", {
1024                     "bFilter":false,
1025                     "bPaginate":false,
1026                     "bInfo":false,
1027                     "bSort":false,
1028                     "dom": 'B<"clearfix">t',
1029                     }, columns_settings);
1030
1031             $("#return_date_override").datetimepicker({
1032                 onClose: function(dateText, inst) {
1033                     if (validate_date(dateText, inst) ) {
1034                         $("#barcode").focus();
1035                     }
1036                 },
1037                 defaultDate: -1,
1038                 hour: 23,
1039                 minute: 59,
1040                 maxDate: 0
1041             }).on("change", function(e, value) {
1042                 if ( ! is_valid_date( $(this).val() ) ) {$(this).val("");}
1043             });
1044             $("#return_date_override").on("blur", function() {
1045                 check_valid_return_date();
1046             });
1047             $("#checkin-form").submit(function( event ) {
1048                 if ( !check_valid_return_date() ) {
1049                     event.preventDefault();
1050                 }
1051             });
1052
1053             function check_valid_return_date() {
1054                 if ( $("#return_date_override").val() ) {
1055                     var datetime = DateTime_from_syspref( $("#return_date_override").val() );
1056                     var now = new Date();
1057                     if ( !datetime || datetime > now ) {
1058                         alert("Invalid return date/time!");
1059                         $("#return_date_override").val("")
1060                         return false;
1061                     }
1062                 }
1063                 // Add saved date information to onscreen message, which
1064                 // may or may not be hidden
1065                 $("#saved_return_date").text( $("#return_date_override").val() );
1066                 return true;
1067             }
1068
1069             $("#exemptcheck").change(function () {
1070                 if (this.checked == true) {
1071                     $("#barcode").addClass("input-warning");
1072                     $("#exemptfines").show();
1073                 } else {
1074                     $("#barcode").removeClass("input-warning");
1075                     $("#exemptfines").hide();
1076                 }
1077                 $("#barcode").focus();
1078             });
1079             $("#dropboxcheck").change(function () {
1080                 if (this.checked == true) {
1081                     $("#barcode").addClass("input-warning");
1082                     $("#dropboxmode").show();
1083
1084                     $("#return_date_override_fields :input").prop('disabled', true);
1085                     $("#return_date_override").datetimepicker("disable");
1086                 } else {
1087                     $("#barcode").removeClass("input-warning");
1088                     $("#dropboxmode").hide();
1089
1090                     $("#return_date_override_fields :input").prop('disabled', false);
1091                     $("#return_date_override").datetimepicker("enable");
1092                 }
1093                 $("#barcode").focus();
1094             });
1095             $("#forgivemanualholdsexpire").change(function () {
1096                 if (this.checked == true) {
1097                     $("#barcode").addClass("input-warning");
1098                     $("#forgivemanualholdsexpire-alert").show();
1099                 } else {
1100                     $("#barcode").removeClass("input-warning");
1101                     $("#forgivemanualholdsexpire-alert").hide();
1102                 }
1103                 $("#barcode").focus();
1104             });
1105
1106             [% IF(overduecharges) %]
1107                 $("#barcode").focus(function () {
1108                     if (($("#exemptcheck").prop("checked") == true) || ($("#dropboxcheck").prop("checked") == true)) {
1109                         $("#barcode").addClass("input-warning");
1110                     } else {
1111                         $("#barcode").removeClass("input-warning");
1112                     }
1113                 });
1114                 $("#barcode").blur(function () {
1115                     $("#barcode").removeClass("input-warning");
1116                 });
1117             [% END %]
1118
1119             $('.openWin').on("click",function(e){
1120                 Dopop( $(this).data("url") );
1121             });
1122
1123             $('.print').on("click",function(e){
1124                 this.form.print_slip.value = 1;
1125                 let barcode = document.getElementById('confirm-hold-barcode');
1126                 if ( barcode ) barcode.remove();
1127                 this.form.submit();
1128             });
1129
1130             $('.cancel-hold').on("click",function(e){
1131                 this.form.cancel_reserve.value = 1;
1132                 this.form.submit();
1133             });
1134
1135             $('.action').on("click",function(e){
1136                 this.checked = false;
1137                 this.form.return_date_override.value = '';
1138                 this.form.return_date_override_remember.checked = false;
1139                 this.form.barcode.focus();
1140                 $("#return_date_remember").hide();
1141                 return false;
1142             });
1143
1144             $("#return_date_override_remember").on("change", function(){
1145                 if( $(this).prop("checked" ) ){
1146                     if( $("#return_date_override").val() == "" ){
1147                         $("#saved_return_date").text( _("No date selected") );
1148                     } else {
1149                         $("#saved_return_date").text( $("#return_date_override").val() );
1150                     }
1151                     $("#return_date_remember").show();
1152                 } else {
1153                     $("#return_date_remember").hide();
1154                 }
1155             });
1156             $('[data-toggle="tooltip"]').tooltip();
1157
1158             $(".printcheckinslip").on("click", function(e){
1159                 e.preventDefault();
1160                 var borrowernumber = $(this).data('borrowernumber');
1161                 window.open("/cgi-bin/koha/members/printslip.pl?borrowernumber=" + borrowernumber + "&amp;print=checkinslip", "printwindow");
1162             });
1163
1164         });
1165     </script>
1166 [% END %]
1167
1168 [% INCLUDE 'intranet-bottom.inc' %]