Bug 8758: Remove useless code in circ/returns.pl
authorJonathan Druart <jonathan.druart@biblibre.com>
Tue, 11 Sep 2012 13:08:01 +0000 (15:08 +0200)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 5 Nov 2012 17:12:58 +0000 (12:12 -0500)
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Before applying the patch I removed the [% IF %] from
around the markup which is removed by this patch. A table
of title and patron information appeared which I don't
remember ever seeing before. This tells me it's really
unused.

After applying the patch I performed some check-ins on both
checked out items and items which were on hold. All operations
completed normally.
Passed-QA-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
circ/returns.pl
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt

index d93b7cd..902456d 100755 (executable)
@@ -465,72 +465,6 @@ foreach my $code ( keys %$messages ) {
 }
 $template->param( errmsgloop => \@errmsgloop );
 
-# patrontable ....
-if ($borrower) {
-    my $flags = $borrower->{'flags'};
-    my @flagloop;
-    my $flagset;
-    foreach my $flag ( sort keys %$flags ) {
-        my %flaginfo;
-        unless ($flagset) { $flagset = 1; }
-        $flaginfo{redfont} = ( $flags->{$flag}->{'noissues'} );
-        $flaginfo{flag}    = $flag;
-        if ( $flag eq 'CHARGES' ) {
-            $flaginfo{msg}            = $flag;
-            $flaginfo{charges}        = 1;
-            $flaginfo{chargeamount}   = $flags->{$flag}->{amount};
-            $flaginfo{borrowernumber} = $borrower->{borrowernumber};
-        }
-        elsif ( $flag eq 'WAITING' ) {
-            $flaginfo{msg}     = $flag;
-            $flaginfo{waiting} = 1;
-            my @waitingitemloop;
-            my $items = $flags->{$flag}->{'itemlist'};
-            foreach my $item (@$items) {
-                my $biblio = GetBiblioFromItemNumber( $item->{'itemnumber'});
-                push @waitingitemloop, {
-                    biblionum => $biblio->{'biblionumber'},
-                    barcode   => $biblio->{'barcode'},
-                    title     => $biblio->{'title'},
-                    brname    => $branches->{ $biblio->{'holdingbranch'} }->{'branchname'},
-                };
-            }
-            $flaginfo{itemloop} = \@waitingitemloop;
-        }
-        elsif ( $flag eq 'ODUES' ) {
-            my $items = $flags->{$flag}->{'itemlist'};
-            my @itemloop;
-            foreach my $item ( sort { $a->{'date_due'} cmp $b->{'date_due'} }
-                @$items )
-            {
-                my $biblio = GetBiblioFromItemNumber( $item->{'itemnumber'});
-                push @itemloop, {
-                    duedate   => format_sqldatetime($item->{date_due}),
-                    biblionum => $biblio->{'biblionumber'},
-                    barcode   => $biblio->{'barcode'},
-                    title     => $biblio->{'title'},
-                    brname    => $branches->{ $biblio->{'holdingbranch'} }->{'branchname'},
-                };
-            }
-            $flaginfo{itemloop} = \@itemloop;
-            $flaginfo{overdue}  = 1;
-        }
-        else {
-            $flaginfo{other} = 1;
-            $flaginfo{msg}   = $flags->{$flag}->{'message'};
-        }
-        push( @flagloop, \%flaginfo );
-    }
-    $template->param(
-        flagset          => $flagset,
-        flagloop         => \@flagloop,
-        riborrowernumber => $borrower->{'borrowernumber'},
-        riborcnum        => $borrower->{'cardnumber'},
-        riborsurname     => $borrower->{'surname'},
-        ribortitle       => $borrower->{'title'},
-        riborfirstname   => $borrower->{'firstname'}
-    );
-}
 #set up so only the last 8 returned items display (make for faster loading pages)
 my $returned_counter = ( C4::Context->preference('numReturnedItemsToShow') ) ? C4::Context->preference('numReturnedItemsToShow') : 8;
 my $count = 0;
index 050ebd3..672105a 100644 (file)
@@ -412,24 +412,6 @@ $(document).ready(function () {
     </form>
 </div>
 
-[% IF ( returned ) %]
-<div class="yui-g">    <table>
-        <tr><th>Item information</th><th>Patron information</th></tr>
-        <tr>
-            <td>[% title |html %]</td>
-            <td>
-
-                <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% riborrowernumber %]">[% riborsurname %], [% ribortitle %] [% riborfirstname %]</a> ([% riborcnum %])
-                [% IF ( flagset ) %]
-                ([% FOREACH flagloo IN flagloop %]
-                [% flagloo.flag %]
-               [% IF ( flagloo.charges ) %] of [% flagloo.chargeamount %] [% END %]
-               ,
-                [% END %])[% END %]
-            </td>
-        </tr>
-    </table>
-[% END %]
 [% IF ( riloop ) %]
     <h2>Checked-in items</h2>
     <table>