1 package C4::Circulation::Borrissues; #assumes C4/Circulation/Borrissues
3 #package to deal with Issues
4 #written 3/11/99 by chris@katipo.co.nz
7 # Copyright 2000-2002 Katipo Communications
9 # This file is part of Koha.
11 # Koha is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
16 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License along with
21 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
22 # Suite 330, Boston, MA 02111-1307 USA
29 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
31 # set the version for version checking
35 @EXPORT = qw(&printallissues);
36 %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
38 # your exported package globals go here,
39 # as well as any optionally exported functions
41 @EXPORT_OK = qw($Var1 %Hashit);
44 # non-exported package globals go here
45 use vars qw(@more $stuff);
47 # initalize package globals, first exported ones
52 # then the others (which are still accessible as $Some::Module::stuff)
56 # all file-scoped lexicals must be created before
57 # the functions below that use them.
59 # file-private lexicals go here
63 # here's a file-private function as a closure,
64 # callable as &$priv_func; it cannot be prototyped.
69 # make all your functions, whether exported or not;
73 my ($env,$borrower)=@_;
75 my $dbh = C4::Context->dbh;
76 my $query = "select * from issues,items,biblioitems,biblio
77 where borrowernumber = '$borrower->{'borrowernumber'}'
78 and (returndate is null)
79 and (issues.itemnumber = items.itemnumber)
80 and (items.biblioitemnumber = biblioitems.biblioitemnumber)
81 and (items.biblionumber = biblio.biblionumber)
83 my $sth = $dbh->prepare($query);
86 while (my $data = $sth->fetchrow_hashref) {
87 # FIXME - This should be $issues[$x] = $data, right?
88 # Or better yet, push @issues, $data.
93 remoteprint ($env,\@issues,$borrower);
95 END { } # module clean-up code here (global destructor)