1 package C4::Circulation::Borrissues;
5 #package to deal with Issues
6 #written 3/11/99 by chris@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
31 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
33 # set the version for version checking
37 @EXPORT = qw(&printallissues);
38 %EXPORT_TAGS = ( ); # eg: TAG => [ qw!name1 name2! ],
40 # your exported package globals go here,
41 # as well as any optionally exported functions
43 @EXPORT_OK = qw($Var1 %Hashit);
46 # non-exported package globals go here
47 use vars qw(@more $stuff);
49 # initalize package globals, first exported ones
54 # then the others (which are still accessible as $Some::Module::stuff)
58 # all file-scoped lexicals must be created before
59 # the functions below that use them.
61 # file-private lexicals go here
65 # here's a file-private function as a closure,
66 # callable as &$priv_func; it cannot be prototyped.
71 # make all your functions, whether exported or not;
73 # FIXME - This function is only used in C4::InterfaceCDK, which looks
74 # obsolete. Does that mean that this module is also obsolete?
75 # Otherwise, this needs a POD.
77 my ($env,$borrower)=@_;
79 my $dbh = C4::Context->dbh;
80 my $query = "select * from issues,items,biblioitems,biblio
81 where borrowernumber = '$borrower->{'borrowernumber'}'
82 and (returndate is null)
83 and (issues.itemnumber = items.itemnumber)
84 and (items.biblioitemnumber = biblioitems.biblioitemnumber)
85 and (items.biblionumber = biblio.biblionumber)
87 my $sth = $dbh->prepare($query);
90 while (my $data = $sth->fetchrow_hashref) {
91 # FIXME - This should be $issues[$x] = $data, right?
92 # Or better yet, push @issues, $data.
97 remoteprint ($env,\@issues,$borrower);