Bug 8758: Remove useless code in circ/returns.pl

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>

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Jonathan Druart 2012-09-11 15:08:01 +02:00 committed by Chris Cormack
parent c443b49768
commit 3b3048d1fa
2 changed files with 0 additions and 84 deletions

View File

@ -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;

View 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>