[Koha-patches] [PATCH] Bug 2094: fixing two bugs in lost items report
Andrew Moore
andrew.moore at liblime.com
Fri May 9 22:06:26 CEST 2008
* 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.
---
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 fb285db..fa31f52 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 9d46f22..c0482ab 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 );
--
1.5.5.rc0.16.g02b00
More information about the Koha-patches
mailing list