Bug 6467: Add shelving location to checkin screen
authorruth@bywatersolutions.com <ruth@bywatersolutions.com>
Mon, 6 Jun 2011 22:50:15 +0000 (18:50 -0400)
committerChris Cormack <chrisc@catalyst.net.nz>
Mon, 6 Jun 2011 23:16:17 +0000 (11:16 +1200)
Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Ian Walls <ian.walls@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
circ/returns.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt

index d7fad0c..bb5230b 100755 (executable)
@@ -537,6 +537,7 @@ if ($borrower) {
 my $returned_counter = ( C4::Context->preference('numReturnedItemsToShow') ) ? C4::Context->preference('numReturnedItemsToShow') : 8;
 my $count = 0;
 my @riloop;
+my $shelflocations = GetKohaAuthorisedValues('items.location','');
 foreach ( sort { $a <=> $b } keys %returneditems ) {
     my %ri;
     if ( $count++ < $returned_counter ) {
@@ -575,6 +576,11 @@ foreach ( sort { $a <=> $b } keys %returneditems ) {
         $ri{ccode}            = $biblio->{'ccode'};
         $ri{itemnumber}       = $biblio->{'itemnumber'};
         $ri{barcode}          = $bar_code;
+
+        $ri{location}         = $biblio->{'location'};
+        my $shelfcode = $ri{'location'};
+        $ri{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) );
+
     }
     else {
         last;
index 620f770..c02be49 100644 (file)
@@ -396,7 +396,7 @@ function Dopop(link) {
 [% IF ( riloop ) %]
     <h2>Checked-In items</h2>
     <table>
-       <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>
+       <tr><th>Due Date</th><th>Title</th>     <th>Author</th> <th>Barcode</th><th>Shelving Location</th><th>Call Number</th><th>Type</th>     <th>Patron</th><th>Note</th></tr>
 
         [% FOREACH riloo IN riloop %]
             <tr>
@@ -412,6 +412,7 @@ function Dopop(link) {
                     [% riloo.itemtitle |html %]</a></td>
                        <td>[% riloo.itemauthor %]</td>
             <td><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber %]&amp;itemnumber=[% riloo.itemnumber %]#item[% riloo.itemnumber %]">[% riloo.barcode %]</a></td>
+            <td>[% riloo.location %]</td>
             <td>[% riloo.itemcallnumber %]</td>
             <td>[% riloo.itemtype %] [% riloo.ccode %]</td>
                        <td>[% IF ( riloo.duedate ) %]