[Koha-cvs] koha/reports catalogue_stats.pl [rel_2_2]

Henri-Damien LAURENT laurenthdl at alinto.com
Mon Jul 31 14:51:56 CEST 2006


CVSROOT:	/sources/koha
Module name:	koha
Branch:		rel_2_2
Changes by:	Henri-Damien LAURENT <hdl>	06/07/31 12:51:56

Modified files:
	reports        : catalogue_stats.pl 

Log message:
	Bug Fixing : displaying holdingbranch list

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/reports/catalogue_stats.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.10.2.4&r2=1.10.2.5

Patches:
Index: catalogue_stats.pl
===================================================================
RCS file: /sources/koha/koha/reports/catalogue_stats.pl,v
retrieving revision 1.10.2.4
retrieving revision 1.10.2.5
diff -u -b -r1.10.2.4 -r1.10.2.5
--- catalogue_stats.pl	2 Aug 2005 15:53:40 -0000	1.10.2.4
+++ catalogue_stats.pl	31 Jul 2006 12:51:56 -0000	1.10.2.5
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 
-# $Id: catalogue_stats.pl,v 1.10.2.4 2005/08/02 15:53:40 hdl Exp $
+# $Id: catalogue_stats.pl,v 1.10.2.5 2006/07/31 12:51:56 hdl Exp $
 
 # Copyright 2000-2002 Katipo Communications
 #
@@ -205,7 +205,7 @@
 	my $branches=getbranches();
 	my %select_branches;
 	$select_branches{""} = "";
-	foreach my $branch (keys %$branches) {
+	foreach my $branch (sort keys %$branches) {
 		push @select, $branch;
 		$select_branches{$branch} = $branches->{$branch}->{'branchname'};
 	}
@@ -220,9 +220,16 @@
 	$req->execute;
 	undef @select;
 	push @select,"";
+	my %select_location;
+	$select_location{""} = "";
+	while (my $items =$req->fetchrow_hashref) {
+		push @select, $items->{"holdingbranch"};
+		$select_location{$items->{'holdingbranch'}} = $branches->{$items->{'holdingbranch'}}->{'branchname'};
+	}
 	my $CGIlocation=CGI::scrolling_list( -name     => 'Filter',
 				-id => 'holdingbranch',
 				-values   => \@select,
+				-labels   => \%select_location,
 				-size     => 1,
 				-multiple => 0 );
 	





More information about the Koha-cvs mailing list