From c006950355a24d10487aab60bd5a9cc624f5fe74 Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Fri, 9 May 2008 14:03:27 -0500 Subject: [PATCH] Bug 2094: implementing ability to select particular lost status in the lost items report This patch adds a drop-down to the lost items report to let the user select a particular lost status to display. Only items with that particluar lost status will be dispolayed. The documentation for the lost items report on the staff client will need to be slightly adjusted. Signed-off-by: Joshua Ferraro --- .../prog/en/modules/reports/itemslost.tmpl | 13 +++++++++- reports/itemslost.pl | 25 +++++++++++-------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tmpl index 4d958cd9f0..c1d819e413 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tmpl @@ -97,7 +97,18 @@ - + + +
  • +
    diff --git a/reports/itemslost.pl b/reports/itemslost.pl index 52ff1f9069..07b6e3cfaa 100755 --- a/reports/itemslost.pl +++ b/reports/itemslost.pl @@ -47,15 +47,17 @@ my $params = $query->Vars; my $get_items = $params->{'get_items'}; if ( $get_items ) { - my $orderbyfilter = $params->{'orderbyfilter'} || undef; - my $branchfilter = $params->{'branchfilter'} || undef; - my $barcodefilter = $params->{'barcodefilter'} || undef; - my $itemtypesfilter = $params->{'itemtypesfilter'} || undef; + my $orderbyfilter = $params->{'orderbyfilter'} || undef; + my $branchfilter = $params->{'branchfilter'} || undef; + my $barcodefilter = $params->{'barcodefilter'} || undef; + my $itemtypesfilter = $params->{'itemtypesfilter'} || undef; + my $loststatusfilter = $params->{'loststatusfilter'} || undef; my %where; - $where{homebranch} = $branchfilter if defined $branchfilter; - $where{barcode} = $barcodefilter if defined $barcodefilter; - $where{itemtype} = $itemtypesfilter if defined $itemtypesfilter; + $where{'homebranch'} = $branchfilter if defined $branchfilter; + $where{'barcode'} = $barcodefilter if defined $barcodefilter; + $where{'itemtype'} = $itemtypesfilter if defined $itemtypesfilter; + $where{'authorised_value'} = $loststatusfilter if defined $loststatusfilter; my $items = GetLostItems( \%where, $orderbyfilter ); $template->param( @@ -100,9 +102,12 @@ foreach my $thisitemtype ( sort keys %$itemtypes ) { push @itemtypesloop, \%row; } -$template->param( - branchloop => \@branchloop, - itemtypeloop => \@itemtypesloop, +# get lost statuses +my $lost_status_loop = C4::Koha::GetAuthorisedValues( 'LOST' ); + +$template->param( branchloop => \@branchloop, + itemtypeloop => \@itemtypesloop, + loststatusloop => $lost_status_loop, ); # writing the template -- 2.20.1