4 # Copyright 2000-2002 Katipo Communications
6 # This file is part of Koha.
8 # Koha is free software; you can redistribute it and/or modify it under the
9 # terms of the GNU General Public License as published by the Free Software
10 # Foundation; either version 2 of the License, or (at your option) any later
13 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
14 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
15 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License along with
18 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
19 # Suite 330, Boston, MA 02111-1307 USA
24 use C4::Circulation::Main;
25 #use C4::Circulation::Issues;
26 #use C4::Circulation::Returns;
27 #use C4::Circulation::Renewals;
28 #use C4::Circulation::Borrower;
34 # set up environment array
35 # branchcode - logged on branch
36 # usercode - current user
37 # proccode - current or last procedure
38 # borrowernumber - current or last borrowernumber
39 # logintime - time logged on
40 # lasttime - lastime security checked
41 # tempuser - temporary user
43 branchcode => "", usercode => "", proccode => "lgon", borrowernumber => "",
44 logintime => "", lasttime => "", tempuser => "", debug => "9"
47 $env{'branchcode'} = "C";
48 $env{'usercode'} = `whoami`;
53 &startint(\%env,'Circulation');
59 while ($donext ne 'Quit') {
60 if ($donext eq "Circ") {
61 ($reason,$data) = menu(\%env,'console','Circulation',
62 ('Issues','Returns','Select Branch','Select Printer'));
66 if ($data eq 'Issues') {
67 my @args=('issuewrapper.pl',"$env{'branchcode'}","$env{'usercode'}","$env{'telnet'}","$env{'queue'}","$env{'printtype'}","$env{'brdata'}","$env{'lasttime'}");
68 open (FILE,">>/tmp/$<_$$");
69 my $time=localtime(time);
70 print FILE "Start issues $time \n";
73 } elsif ($data eq 'Returns') {
74 my @args=('returnswrapper.pl',"$env{'branchcode'}","$env{'usercode'}","$env{'telnet'}","$env{'queue'}","$env{'printtype'}","$env{'brdata'}");
75 open (FILE,">>/tmp/$<_$$");
76 my $time=localtime(time);
77 print FILE "Start returns $time \n";
80 # $donext=Returns(\%env); #C4::Circulation::Returns
81 } elsif ($data eq 'Select Branch') {
83 } elsif ($data eq 'Select Printer') {
85 # } elsif ($data eq 'Borrower Enquiries') {
86 # $donext=Borenq($env); #C4::Circulation::Borrower - conversion
87 # } elsif ($data eq 'Reserves'){
88 # $donext=EnterReserves(\%env); #C4::Reserves
89 } elsif ($data eq 'Quit') {