2 # WARNING: Not enough context to figure out the correct tabstop size
3 # WARNING: Assume that this file uses 4-character tabs
7 #written 11/1/2000 by chris@katipo.oc.nz
8 #part of the koha library system, script to facilitate paying off fines
11 # Copyright 2000-2002 Katipo Communications
13 # This file is part of Koha.
15 # Koha is free software; you can redistribute it and/or modify it under the
16 # terms of the GNU General Public License as published by the Free Software
17 # Foundation; either version 2 of the License, or (at your option) any later
20 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
21 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
22 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License along with
25 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
26 # Suite 330, Boston, MA 02111-1307 USA
31 use C4::Interface::CGI::Output;
38 #print $input->header;
39 my $bornum=$input->param('bornum');
42 my $data=borrdata('',$bornum);
43 #my $user=C4::Context->preference('defaultbranch');
44 my $amount=$input->param('amount');
45 my $accounttype=$input->param('accounttype');
46 my $desc=$input->param('desc');
48 if ($accounttype eq "FU"){
49 $accounttype="Overdue item";
50 }elsif ($accounttype eq "L"){
51 $accounttype="Very Overdue or Lost item";
53 $accounttype="Miscelenaous Fees";
55 my($template, $loggedinuser, $cookie)
56 = get_template_and_user ({ template_name => "members/payprint.tmpl",
60 flagsrequired => {borrowers => 1},
63 my $user=borrdata('',$loggedinuser);
64 my @datearr = localtime(time());
65 my $todaysdate = (1900+$datearr[5]).'-'.sprintf ("%0.2d", ($datearr[4]+1)).'-'.sprintf ("%0.2d", $datearr[3]);
66 $template->param(firstname => $data->{'firstname'}, date=>format_date($todaysdate),
67 surname => $data->{'surname'},
68 cardnumber => $data->{'cardnumber'},
69 street => $data->{'street'},
70 city => $data->{'city'},
71 phone => $data->{'phone'},
72 email => $data->{'email'},
75 accounttype=> $accounttype,
77 loggeduser=>$user->{'firstname'}.' '.$user->{'surname'},
79 output_html_with_http_headers $input, $cookie, $template->output;