Continuing work started from 18355. Making correction to returns.pl.
Created attachment 79547 [details] [review] Bug 21444: Adds the permanent location To Test: 1) Be sure ReturnToShelvingCart is set to Move. 2) Check out an item. 3) Check in the item. 4) Note that only the CART location shows in the Shelving location column. 5) Apply the patch. 6) Check out an item. 7) Check in the item. 8) Note that the permant location now shows with the cart location next to in in parenthesis. 9) Try combinations of missing descriptions or missing locations from the LOC table for the item permanent location and cart. If there is no description, it should show the code in its place. If there is no location defined, it will show either the code that is stored in the item or be blank.
Created attachment 79548 [details] [review] Bug 21444: Clean up whitespace
I am open to suggestions on this one. I show both the permanent location for the shelving, and the cart location. I feel it might be redundant to show the cart location as well, since the item is in hand and being checked in. If there are enough objections, I will gladly remove the cart location.
Bug has been tested and the fix is working.
Hi Christopher, I'have tested it and it works nicely. I wonder if it should be Book cart (permanent location) as the first is the current... but I think both work. But I'd like to ask you to move the display logic, like setting the () to the template. I have to say that I am confused by all the checking before your patch and after - but I notice it's different than before? - $ri{'location'} = $shelflocations->{$shelfcode} if ( defined( $shelfcode ) && defined($shelflocations) && exists( $shelflocations->{$shelfcode} ) ); + my $permshelfcode = $ri{'permlocation'}; + $ri{'location'} = ( $shelflocations->{$permshelfcode} ne '' ) ? $shelflocations->{$permshelfcode} : ( $permshelfcode ) ? $permshelfcode : undef; + $ri{'location'} .= ( ( $shelflocations->{$shelfcode} ne '' ) && ( $shelfcode ne $permshelfcode ) ) ? ' (' . $shelflocations->{$shelfcode} . ')' : ( ( $shelfcode ) && ( $shelfcode ne $permshelfcode ) ) ? ' (' . $shelfcode . ')' : undef;