Replaced expressions of the form "$x = $x <op> $y" with "$x <op>= $y".
[koha.git] / C4 / Circmain.pm
1 package C4::Circmain;
2
3 # $Id$
4
5 #package to deal with circulation
6
7
8 # Copyright 2000-2002 Katipo Communications
9 #
10 # This file is part of Koha.
11 #
12 # Koha is free software; you can redistribute it and/or modify it under the
13 # terms of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
15 # version.
16 #
17 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
18 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
19 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License along with
22 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
23 # Suite 330, Boston, MA  02111-1307 USA
24
25 # FIXME - This module doesn't compile! Then again, it's never used, so
26 # presumably this file is obsolete, right?
27
28 use strict;
29 require Exporter;
30 use DBI;
31 use C4::Circulation::Main;
32 use C4::Circulation::Issues;
33 use C4::Circulation::Returns;
34 use C4::Circulation::Renewals;
35 use C4::Circulation::Borrower;
36 use C4::Reserves;
37 use C4::InterfaceCDK;
38 use C4::Security;
39
40 use vars qw($VERSION @ISA @EXPORT);
41
42 # set the version for version checking
43 $VERSION = 0.01;
44
45 @ISA = qw(Exporter);
46 @EXPORT = qw(&Start_circ);
47
48 sub Start_circ{
49   my ($env)=@_;
50   #connect to database
51   #start interface
52   &startint($env,'Circulation');
53   getbranch($env);
54   getprinter($env);
55   my $donext = 'Circ';
56   my $reason;
57   my $data;
58   while ($donext ne 'Quit') {
59     if ($donext  eq "Circ") {
60       #($reason,$data) = menu($env,'console','Circulation',
61       #  ('Issues','Returns','Borrower Enquiries','Reserves','Log In'));
62       #&startint($env,"Menu");
63       ($reason,$data) = menu($env,'console','Circulation',
64         ('Issues','Returns','Select Branch','Select Printer'));
65     } else {
66       $data = $donext;
67     }
68     if ($data eq 'Issues') {
69       $donext=Issue($env); #C4::Circulation::Issues
70     } elsif ($data eq 'Returns') {
71       $donext=Returns($env); #C4::Circulation::Returns
72     } elsif ($data eq 'Select Branch') {
73       getbranch($env);
74     } elsif ($data eq 'Select Printer') {
75       getprinter($env);
76     } elsif ($data eq 'Borrower Enquiries') {
77       #  $donext=Borenq($env); #C4::Circulation::Borrower - conversion
78     } elsif ($data eq 'Reserves'){
79       $donext=EnterReserves($env); #C4::Reserves
80     } elsif ($data eq 'Quit') {
81       $donext = $data;
82     }
83   }
84   &endint($env)
85 }