3 #package to deal with Returns
4 #written 3/11/99 by olwen@katipo.co.nz
10 use C4::Circulation::Circ2;
12 #use C4::InterfaceCDK;
13 #use C4::Circulation::Main;
15 #use C4::Circulation::Renewals;
21 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
23 # set the version for version checking
27 @EXPORT = qw(&getgroups &groupmembers);
28 %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
30 # your exported package globals go here,
31 # as well as any optionally exported functions
33 @EXPORT_OK = qw($Var1 %Hashit);
36 # non-exported package globals go here
37 #use vars qw(@more $stuff);
39 # initalize package globals, first exported ones
44 # then the others (which are still accessible as $Some::Module::stuff)
48 # all file-scoped lexicals must be created before
49 # the functions below that use them.
51 # file-private lexicals go here
55 # here's a file-private function as a closure,
56 # callable as &$priv_func; it cannot be prototyped.
61 # make all your functions, whether exported or not;
68 my $sth=$dbh->prepare("select distinct groupshortname,grouplongname from borrowergroups");
70 while (my ($short, $long)=$sth->fetchrow) {
71 $groups{$short}=$long;
78 my ($env, $group) = @_;
81 my $q_group=$dbh->quote($group);
82 my $sth=$dbh->prepare("select borrowernumber from borrowergroups where groupshortname=$q_group");
84 while (my ($borrowernumber) = $sth->fetchrow) {
85 my ($patron, $flags) = getpatroninformation($env, $borrowernumber);
86 my $currentissues=currentissues($env, $patron);
87 $patron->{'currentissues'}=$currentissues;
88 push (@members, $patron);
94 END { } # module clean-up code here (global destructor)