Added copyright statement to all .pl and .pm files
[koha.git] / C4 / Interface / RenewalsCDK.pm
1 package C4::Interface::RenewalsCDK; #asummes C4/Interface/RenewalsCDK
2
3 #uses Newt
4
5 # Copyright 2000-2002 Katipo Communications
6 #
7 # This file is part of Koha.
8 #
9 # Koha is free software; you can redistribute it and/or modify it under the
10 # terms of the GNU General Public License as published by the Free Software
11 # Foundation; either version 2 of the License, or (at your option) any later
12 # version.
13 #
14 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
15 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
16 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License along with
19 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
20 # Suite 330, Boston, MA  02111-1307 USA
21
22 use strict;
23 use Cdk;
24 use C4::Format;
25 use C4::InterfaceCDK;
26 use Date::Manip;
27 #use C4::Circulation;
28
29 require Exporter;
30 use DBI;
31 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
32   
33 # set the version for version checking
34 $VERSION = 0.01;
35     
36 @ISA = qw(Exporter);
37 @EXPORT = qw(renew_window);
38 %EXPORT_TAGS = ( );     # eg: TAG => [ qw!name1 name2! ],
39                   
40 # your exported package globals go here,
41 # as well as any optionally exported functions
42
43 @EXPORT_OK   = qw($Var1 %Hashit);
44 # non-exported package globals go here
45 use vars qw(@more $stuff);
46         
47 # initalize package globals, first exported ones
48
49 my $Var1   = '';
50 my %Hashit = ();
51                     
52 # then the others (which are still accessible as $Some::Module::stuff)
53 my $stuff  = '';
54 my @more   = ();
55         
56 # all file-scoped lexicals must be created before
57 # the functions below that se them.
58                 
59 # file-private lexicals go here
60 my $priv_var    = '';
61 my %secret_hash = ();
62
63 #defining keystrokes used for screens
64
65 # here's a file-private function as a closure,
66 # callable as &$priv_func;  it cannot be prototyped.
67 my $priv_func = sub {
68   # stuff goes here.
69 };
70                                                     
71 # make all your functions, whether exported or not;
72
73 sub renew_window {
74   my ($env,$issueditems,$borrower,$amountowing,$odues)=@_;
75   my $titlepanel = C4::InterfaceCDK::titlepanel($env,$env->{'sysarea'},"Renewals");
76   my @sel = ("N ","Y ");
77   my $issuelist = new Cdk::Selection ('Title'=>"Renew items",
78     'List'=>\@$issueditems,'Choices'=>\@sel,
79     'Height'=> 14,'Width'=>78,'Ypos'=>8);
80   my $x = 0;
81   my $borrbox = C4::InterfaceCDK::borrowerbox($env,$borrower,$amountowing);
82   $borrbox->draw();
83   my @renews = $issuelist->activate();
84   $issuelist->erase();
85   undef $titlepanel;
86   undef $issuelist;
87   undef $borrbox;
88   return \@renews;
89 }  
90                                
91 END { }       # module clean-up code here (global destructor)
92
93