Skip to content

Commit

Permalink
Merge pull request #156 from hgq/13_02_pt16905729_4_08
Browse files Browse the repository at this point in the history
13 02 pt16905729 4 08
  • Loading branch information
ctfliblime committed Aug 29, 2011
2 parents 590434c + b6ce8f5 commit 0590171
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 25 deletions.
20 changes: 0 additions & 20 deletions C4/Members.pm
Expand Up @@ -1303,26 +1303,6 @@ sub GetBorNotifyAcctRecord {
return ( $total, \@acctlines, $numlines );
}

sub GetMemberLostItems
{
my %g = @_;
my $dbh = C4::Context->dbh;
my $sth = $dbh->prepare('
SELECT * FROM lost_items
WHERE borrowernumber = ?
ORDER BY date_lost DESC');
$sth->execute($g{borrowernumber});
my @all = ();
while(my $row = $sth->fetchrow_hashref()) {
next if ($g{only_claimsreturned} && !$$row{claims_returned});
if ($g{formatdate}) {
$$row{date_lost} = C4::Dates::format_date($$row{date_lost});
}
push @all, $row;
}
return \@all;
}

sub GetLostStats {
my ( $borrowernumber, $hide_old ) = @_;
my $dbh = C4::Context->dbh;
Expand Down
8 changes: 3 additions & 5 deletions circ/circulation.pl
Expand Up @@ -35,6 +35,7 @@
use C4::Items qw();
use C4::Members;
use C4::Accounts;
use C4::LostItems;
use C4::Biblio;
use C4::Reserves;
use Koha;
Expand Down Expand Up @@ -344,11 +345,8 @@ sub FormatFinesSummary {
$cookie = [$cookie, $lbb, $lbc, $lbf, $lbs];

my ( $od, $issue, $fines ) = GetMemberIssuesAndFines( $borrowernumber );
my $li = C4::Members::GetMemberLostItems(
borrowernumber => $borrowernumber,
formatdate => 1,
only_claimsreturned => 0,
) // [];
# deprecated: C4::Members::GetMemberLostItems
my $li = C4::LostItems::GetLostItems($borrowernumber) // [];
my $numlostitems = scalar @$li;
@$li = splice(@$li,0,5);
$template->param(
Expand Down

0 comments on commit 0590171

Please sign in to comment.