Merge remote branch 'kc/new/enh/bug_5431' into kcmaster
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / returns.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Circulation &rsaquo; Check In [% title |html %]</title>
3 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript">
5 //<![CDATA[
6 function Dopop(link) {
7     var newin=window.open(link,'popup','width=600,height=400,resizable=1,toolbar=0,scrollbars=1,top');
8 }
9          $(document).ready(function() {
10                 $("#exemptcheck").change(function(){
11                         if(this.checked == true) {
12                                 $("#barcode").addClass("alert");
13                                 $("#exemptfines").show();
14                         } else {
15                                 $("#barcode").removeClass("alert");
16                                 $("#exemptfines").hide();
17                         }
18                         $("#barcode").focus();
19                 });
20                 $("#dropboxcheck").change(function(){
21                         if (this.checked == true) {
22                                 $("#barcode").addClass("alert");
23                                 $("#dropboxmode").show();
24                         } else {
25                                 $("#barcode").removeClass("alert");
26                                 $("#dropboxmode").hide();
27                         }
28                         $("#barcode").focus();
29                 });
30                 [% IF ( overduecharges ) %]$("#barcode").focus(function(){
31                         if(($("#exemptcheck").attr("checked") == true)||($("#dropboxcheck").attr("checked") == true)){
32                                 $("#barcode").addClass("alert");
33                         } else {
34                                 $("#barcode").removeClass("alert");
35                         }
36                 });
37                 $("#barcode").blur(function(){
38                         $("#barcode").removeClass("alert");
39                 });[% END %]
40          });
41 //]]>
42 </script>
43 </head>
44 <body>
45 [% INCLUDE 'header.inc' %]
46 [% INCLUDE 'checkin-search.inc' %]
47
48 <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>
49
50 <div id="doc" class="yui-t7">
51
52    <div id="bd">
53         <div id="yui-main">
54
55 <div class="yui-g">
56
57 [% IF ( collectionItemNeedsTransferred ) %]
58         <div class="dialog message">This item is part of a Rotating Collection and needs to be Transferred to [% collectionBranch %]</div>
59 [% END %]
60
61 <!-- Patron has fines -->
62 [% IF ( fines ) %]
63     <div class="dialog alert">
64         <h3>Patron has outstanding fines of [% fines %].</h3>
65         <p><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% fineborrowernumber %]">Make payment</a>.</p>
66     </div>
67 [% END %]
68
69
70 [% IF ( wrongbranch ) %]
71 <div class="dialog alert"><h3>Cannot Check In</h3><p>This item must be checked in at its home library. <strong>NOT CHECKED IN</strong></p>
72 </div>
73 [% END %]
74 <!-- case of a mistake in transfer loop -->
75 [% IF ( WrongTransfer ) %]<div class="dialog message"><!-- WrongTransfer --><h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a> to [% TransferWaitingAt %]</h3>
76 [% IF ( wborcnum ) %]<h5>Hold for:</h5>
77         <ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
78             [% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
79         <li>[% wboraddress %][% IF ( wboraddress2 ) %]<br />
80                 [% wboraddress2 %]<br />[% END %]
81         [% wborcity %]  [% wborzip %]</li>
82         [% IF ( wborphone ) %]<li>[% wborphone %]</li>[% END %]
83                 [% IF ( wboremail ) %]<li><a id="boremail" href="mailto:[% wboremail %]">[% wboremail %]</a></li>[% END %]
84         </ul>
85
86     <form method="post" action="returns.pl" class="confirm">
87             <input type="hidden" name="WT-itemNumber" value="[% WrongTransferItem %]" />
88             <input type="hidden" name="WT-waitingAt" value="[% TransferWaitingAt %]" />
89             <input type="hidden" name="WT-From" value="[% wtransfertFrom %]" />
90         <input type="submit" class="approve" value="Confirm" />
91                         <input type="submit" value="Print Slip and Confirm" class="print" onclick="Dopop('hold-transfer-slip.pl?transfer=1&amp;borrowernumber=[% borrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip'); this.form.submit();" />
92     </form>
93     [% END %]</div>
94 [% END %]
95
96 [% IF ( found ) %]
97 <!-- found -->
98 <!-- case of a reservation found, and display info -->
99     [% IF ( waiting ) %]
100         <!-- waiting -->
101
102 [% IF ( soundon ) %]
103 <audio src="/intranet-tmpl/prog/sound/ending.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
104 [% END %]       
105         
106 <div class="dialog message">
107         <h3>Hold Found (item is already waiting):  <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
108         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
109         <h4>Hold for:</h4>
110                         <ul>
111             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
112             <li>[% boraddress %]<br />
113                         [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
114             [% borcity %] [% borzip %]</li>
115            [% IF ( borphone ) %]<li> [% borphone %]</li>[% END %]
116                    [% IF ( boremail ) %]<li><a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a></li>[% END %]
117 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
118 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]</ul>
119                 [% IF ( transfertodo ) %]
120             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
121                 [% ELSE %]
122                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
123         [% END %]
124         <form method="post" action="returns.pl" class="confirm">
125             <input type="submit" class="approve" value="Confirm" />
126
127                         <input type="submit" value="Print and Confirm" class="print" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip'); this.form.submit();" />
128             [% FOREACH inputloo IN inputloop %]
129                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
130                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
131                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
132             [% END %]
133                 <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
134                 <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
135                 <input type="hidden" name="resbarcode" value="[% barcode %]" />
136                 <input type="hidden" name="diffBranch" value="[% destbranch %]" />
137                 <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
138                 <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
139                 </form>
140         </div>
141     [% END %]
142
143     [% IF ( diffbranch ) %]
144                 <!-- diffbranch -->
145         <div class="dialog message">
146                 <h3>Hold needing transfer found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
147                 <h4>Hold for: </h4>
148                     <ul>
149                         <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li>
150                         <li>[% boraddress %]<br />
151                                                 [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
152                                                 [% borcity %]  [% borzip %]</li>
153                         [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
154                         [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
155 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
156 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
157                     </ul>
158                 [% IF ( transfertodo ) %]
159             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
160                 [% ELSE %]
161                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
162         [% END %]
163
164         <form method="post" action="returns.pl" class="confirm">
165             <input type="submit" class="approve" value="Confirm" />
166                         <input type="submit" value="Print Slip and Confirm" class="print" onclick="Dopop('hold-transfer-slip.pl?transfer=1&amp;borrowernumber=[% borrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip'); this.form.submit();" />
167             [% FOREACH inputloo IN inputloop %]
168                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
169                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
170                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
171             [% END %]
172             <input type="hidden" name="diffBranch" value="[% destbranch %]" />
173             <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
174             <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
175             <input type="hidden" name="barcode" value="0" />
176         </form>
177                 </div>
178     [% END %]
179
180     [% IF ( transfer ) %]
181     <!-- transfer: item with no reservation, must be returned to its homebranch -->
182         <div class="dialog message">
183           <h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% DEFAULT title="item" |html %]</a> to [% homebranchname %]</h3></div>[% END %]
184
185     [% IF ( needstransfer ) %]
186         <!-- needstransfer -->
187         <div class="dialog message"><h3> This item needs to be transferred to [% homebranchname %]</h3>
188         Transfer Now?<br />
189     <form method="post" action="returns.pl" name="mainform" id="mainform">
190         <input type="submit" name="dotransfer" value="Yes" class="submit" />
191         <input type="submit" name="notransfer" value="No" class="submit" />
192         <input type="hidden" name="tobranch" value="[% homebranch %]" />
193         <input type="hidden" name="transferitem" value="[% itemnumber %]" />
194         <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
195         <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
196         [% FOREACH inputloo IN inputloop %]
197         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
198         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
199         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.bornum %]" />
200         [% END %]
201         <input type="hidden" name="barcode" value="0" />
202         </form>   </div>
203         [% END %]
204
205     [% IF ( diffbranch ) %]
206         <!-- diffbranch -->
207         <h3>Item Consigned:</h3>
208         <table>
209         <caption><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% title |html %]</a></caption>
210         <tr>
211             <th>Hold for:</th>
212             <td>[% name %]</td>
213         </tr>
214         </table>
215         <form method="post" action="returns.pl"><input type="submit" value="OK" />
216             [% FOREACH inputloo IN inputloop %]
217                 [% UNLESS ( inputloo.first ) %]
218                     <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
219                     <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
220                     <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
221                 [% END %]
222             [% END %]
223             <input type="hidden" name="barcode" value="0" />
224         </form>
225     [% END %]
226
227
228     <!-- case of simple return no issue or transfer but with a reservation  -->
229     [% IF ( reserved ) %]
230         <!--  reserved  -->
231         
232 [% IF ( soundon ) %]
233 <audio src="/intranet-tmpl/prog/sound/opening.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
234 [% END %]
235         
236         <div class="dialog message">
237           <h3>Hold Found: <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itembiblionumber %]">[% title |html %]</a></h3>
238         [% IF ( reservenotes ) %]<h4>Notes: [% reservenotes %]</h4>[% END %]
239         <h5>Hold for:</h5>
240                 <ul>
241             <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
242                 [% borsurname %], [% borfirstname %]
243             </a> ([% borcnum %])</li>
244             <li>[% boraddress %]<br />
245                         [% IF ( boraddress2 ) %][% boraddress2 %]<br />[% END %]
246                         [% borcity %] [% borzip %]</li>
247             [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
248             [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
249 [% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
250 [% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
251         </ul>
252         [% IF ( transfertodo ) %]
253             <h4><strong>Transfer to:</strong> [% destbranchname %]</h4>
254                 [% ELSE %]
255                 <h4><strong>Hold at</strong> [% destbranchname %]</h4>
256         [% END %]
257         <form method="post" action="returns.pl" class="confirm">
258             [% IF ( transfertodo ) %]
259                 <input type="submit" class="approve" value="Confirm hold and Transfer" />
260                 <input type="submit" value="Print slip, Transfer, and Confirm" class="print" onclick="Dopop('hold-transfer-slip.pl?transfer=1&amp;borrowernumber=[% borrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip'); this.form.submit();" />
261             [% ELSE %]
262                 <input type="submit" class="approve" value="Confirm hold" />
263                 <input type="submit" value="Print Slip and Confirm" class="print" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% itembiblionumber %]&amp;op=slip'); this.form.submit();" />
264             [% END %]
265                 <input type="submit" class="deny" value="Ignore" onclick="$('.dialog:visible').hide('slow'); $('#barcode').focus(); return false;" />
266             [% FOREACH inputloo IN inputloop %]
267         <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
268         <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
269         <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />[% END %]
270             <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
271             <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
272             <input type="hidden" name="resbarcode" value="[% barcode %]" />
273             <input type="hidden" name="diffBranch" value="[% destbranch %]" />
274             <input type="hidden" name="exemptfine" value="[% exemptfine %]" />
275             <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" />
276         </form>
277         </div>
278     [% END %]
279 [% ELSE %]
280
281 [% IF ( errmsgloop ) %]
282     <div class="dialog alert">
283         [% FOREACH errmsgloo IN errmsgloop %]
284                     [% IF ( errmsgloo.badbarcode ) %]
285                         <p class="problem">No Item with barcode: [% errmsgloo.msg %]</p>
286                     [% END %]
287                     [% IF ( errmsgloo.ispermanent ) %]
288                         <p class="problem">Please return to  [% errmsgloo.msg %]</p>
289                     [% END %]
290                     [% IF ( errmsgloo.notissued ) %]
291                         <p class="problem">Not checked out.</p>
292                     [% END %]
293                     [% IF ( errmsgloo.waslost ) %]
294                         <p class="problem">Item was lost, now found.</p>
295                     [% END %]
296                     [% IF ( errmsgloo.withdrawn ) %]
297                         <p class="problem">Item is withdrawn.</p>
298                     [% END %]
299             [% END %]
300 [% IF ( soundon ) %]
301 <audio src="/intranet-tmpl/prog/sound/critical.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
302 [% END %]
303         [% ELSE %]
304 [% IF ( soundon ) %]
305 <audio src="/intranet-tmpl/prog/sound/beep.ogg" autoplay="autoplay" autobuffer="autobuffer"></audio>
306 [% END %]
307         [% END %]
308     </div>
309 [% END %]
310
311     <div id="exemptfines" class="dialog message" style="display:none;">
312         <p>Fines for returned items are forgiven.</p>
313     </div>
314     <div id="dropboxmode" class="dialog message" style="display:none;">
315         <p>Dropbox Mode.  (Effective checkin date is [% dropboxdate %] ).</p>
316     </div>
317 </div>
318         <div class="yui-g">
319     <form method="post" action="/cgi-bin/koha/circ/returns.pl" >
320     <div class="yui-u first">
321             <fieldset>
322         <legend>Check In</legend>
323             <label for="barcode">Enter item barcode: </label>
324                         [% IF ( exemptfine ) %]
325                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
326                         [% ELSIF ( dropboxmode ) %]
327                         <input name="barcode" id="barcode" size="14" class="focus alert"/>
328                         [% ELSE %]
329                         <input name="barcode" id="barcode" size="14" class="focus"/>
330                         [% END %]
331             <input type="submit" class="submit" value="Submit" />
332             [% FOREACH inputloo IN inputloop %]
333                 <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" />
334                 <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" />
335                 <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />
336             [% END %]
337
338
339             </fieldset>
340             </div>
341             <div class="yui-u">
342             <fieldset id="checkin_options">
343                 <legend>Options</legend>
344
345                 <ul>
346                     [% IF ( overduecharges ) %]
347                     <li>
348                         [% IF ( exemptfine ) %]
349                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" checked="checked" />
350                         [% ELSE %]
351                         <input type="checkbox" id="exemptcheck" name="exemptfine" value="exemptfine" />
352                         [% END %]
353                         <label for="exemptcheck">Forgive overdue charges</label>
354                     </li>
355                     [% END %] <!-- overduecharges -->
356                     <li>
357                         [% IF ( dropboxmode ) %]
358                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" checked="checked" />
359                         [% ELSE %]
360                         <input type="checkbox" id="dropboxcheck" name="dropboxmode" value="dropboxmode" />
361                         [% END %]
362                         <label for="dropboxcheck">Dropbox mode</label>
363                     </li>
364                 </ul>
365             </fieldset>
366         </div>
367     </form>
368 </div>
369
370 [% IF ( returned ) %]
371 <div class="yui-g">    <table>
372         <tr><th>Item Information</th><th>Patron Information</th></tr>
373         <tr>
374             <td>[% title |html %]</td>
375             <td>
376
377                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riborrowernumber %]">[% riborsurname %], [% ribortitle %] [% riborfirstname %]</a> ([% riborcnum %])
378                 [% IF ( flagset ) %]
379                 ([% FOREACH flagloo IN flagloop %]
380                 [% flagloo.flag %]
381                 [% IF ( flagloo.charges ) %] of [% flagloo.chargeamount %] [% END %]
382                 ,
383                 [% END %])[% END %]
384             </td>
385         </tr>
386     </table>
387 [% END %]
388 [% IF ( riloop ) %]
389     <h2>Checked-In items</h2>
390     <table>
391         <tr><th>Due Date</th><th>Title</th>     <th>Author</th> <th>Barcode</th><th>Call Number</th><th>Type</th>       <th>Patron</th><th>Note</th></tr>
392
393         [% FOREACH riloo IN riloop %]
394             <tr>
395             <td>[% IF ( riloo.duedate ) %]
396                     [% IF ( riloo.return_overdue ) %]
397                         <span class="overdue">[% riloo.duedate %] (overdue)</span>
398                     [% ELSE %][% riloo.duedate %]
399                     [% END %]
400                 [% ELSE %]Not checked out
401                 [% END %]
402             </td>
403             <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% riloo.itembiblionumber %]">
404                     [% riloo.itemtitle |html %]</a></td>
405                         <td>[% riloo.itemauthor %]</td>
406             <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber %]&amp;itemnumber=[% riloo.itemnumber %]#item[% riloo.itemnumber %]">[% riloo.barcode %]</a></td>
407             <td>[% riloo.itemcallnumber %]</td>
408             <td>[% riloo.itemtype %] [% riloo.ccode %]</td>
409                         <td>[% IF ( riloo.duedate ) %]
410                 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riloo.borrowernumber %]">
411                     [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %])
412                 </a>
413             [% ELSE %]Not checked out[% END %]</td>
414             <td>[% IF ( riloo.bornote ) %]<span class="circ-hlt">[% riloo.bornote %]<br /></span>[% END %]
415             [% IF ( riloo.itemnote ) %]<span class="circ-hlt">[% riloo.itemnote %]</span>[% END %]
416             </td>
417            </tr>
418         [% END %]
419     </table></div>
420 [% END %]
421
422
423 </div>
424 [% INCLUDE 'intranet-bottom.inc' %]