5 #package to deal with Returns
6 #written 3/11/99 by olwen@katipo.co.nz
9 # Copyright 2000-2002 Katipo Communications
11 # This file is part of Koha.
13 # Koha is free software; you can redistribute it and/or modify it under the
14 # terms of the GNU General Public License as published by the Free Software
15 # Foundation; either version 2 of the License, or (at your option) any later
18 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
19 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
20 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License along with
23 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
24 # Suite 330, Boston, MA 02111-1307 USA
26 # FIXME - This package is only used in groups.pl, which in turn is
27 # never used. Presumably this module is therefore obsolete.
33 use C4::Circulation::Circ2;
35 #use C4::InterfaceCDK;
36 #use C4::Circulation::Main;
37 #use C4::Circulation::Renewals;
43 use vars qw($VERSION @ISA @EXPORT);
45 # set the version for version checking
49 @EXPORT = qw(&getgroups &groupmembers);
54 my $dbh = C4::Context->dbh;
55 my $sth=$dbh->prepare("select distinct groupshortname,grouplongname from borrowergroups");
57 while (my ($short, $long)=$sth->fetchrow) {
58 $groups{$short}=$long;
64 my ($env, $group) = @_;
66 my $dbh = C4::Context->dbh;
67 my $q_group=$dbh->quote($group);
68 my $sth=$dbh->prepare("select borrowernumber from borrowergroups where groupshortname=?");
69 $sth->execute($q_group);
70 while (my ($borrowernumber) = $sth->fetchrow) {
71 my ($patron, $flags) = getpatroninformation($env, $borrowernumber);
72 my $currentissues=currentissues($env, $patron);
73 $patron->{'currentissues'}=$currentissues;
74 push (@members, $patron);
80 END { } # module clean-up code here (global destructor)