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