From 99ad10712e061d37c82d333849eb6fa78a275296 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 11 Sep 2012 15:08:01 +0200 Subject: [PATCH] Bug 8758: Remove useless code in circ/returns.pl Signed-off-by: Owen Leonard 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 Signed-off-by: Jared Camins-Esakov --- circ/returns.pl | 66 ------------------- .../prog/en/modules/circ/returns.tt | 18 ----- 2 files changed, 84 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index d93b7cdc50..902456d8cc 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -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; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 050ebd3d51..672105a191 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -412,24 +412,6 @@ $(document).ready(function () { -[% IF ( returned ) %] -
- - - - - -
Item informationPatron information
[% title |html %] - - [% riborsurname %], [% ribortitle %] [% riborfirstname %] ([% riborcnum %]) - [% IF ( flagset ) %] - ([% FOREACH flagloo IN flagloop %] - [% flagloo.flag %] - [% IF ( flagloo.charges ) %] of [% flagloo.chargeamount %] [% END %] - , - [% END %])[% END %] -
-[% END %] [% IF ( riloop ) %]

Checked-in items

-- 2.39.5