From 31ad99e2b59e589f4c4f193c838a8685fba8f1a8 Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Fri, 9 May 2008 15:06:26 -0500 Subject: [PATCH] Bug 2094: fixing two bugs in lost items report * I guess the limit by item type was never working. I made it look for the right database column * I fixed the error that was returned with no items were returned. Signed-off-by: Joshua Ferraro --- C4/Items.pm | 2 +- reports/itemslost.pl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Items.pm b/C4/Items.pm index fb285dbb81..fa31f52327 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -904,7 +904,7 @@ sub GetLostItems { my $sth = $dbh->prepare($query); $sth->execute( @query_parameters ); - my $items; + my $items = []; while ( my $row = $sth->fetchrow_hashref ){ push @$items, $row; } diff --git a/reports/itemslost.pl b/reports/itemslost.pl index 9d46f22958..c0482ab818 100755 --- a/reports/itemslost.pl +++ b/reports/itemslost.pl @@ -56,7 +56,7 @@ if ( $get_items ) { my %where; $where{'homebranch'} = $branchfilter if defined $branchfilter; $where{'barcode'} = $barcodefilter if defined $barcodefilter; - $where{'itemtype'} = $itemtypesfilter if defined $itemtypesfilter; + $where{'itype'} = $itemtypesfilter if defined $itemtypesfilter; $where{'authorised_value'} = $loststatusfilter if defined $loststatusfilter; my $items = GetLostItems( \%where, $orderbyfilter ); -- 2.39.5