fixme corrected, re-indent and adding the marc_breeding table (see commit of marcimpo...
[koha.git] / maninvoice.pl
1 #!/usr/bin/perl
2
3 #wrriten 11/1/2000 by chris@katipo.oc.nz
4 #script to display borrowers account details
5
6
7 # Copyright 2000-2002 Katipo Communications
8 #
9 # This file is part of Koha.
10 #
11 # Koha is free software; you can redistribute it and/or modify it under the
12 # terms of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 #
16 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
17 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
18 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License along with
21 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
22 # Suite 330, Boston, MA  02111-1307 USA
23
24 use strict;
25 use C4::Output;
26 use CGI;
27 use C4::Search;
28 use C4::Accounts2;
29 my $input=new CGI;
30
31
32 my $bornum=$input->param('bornum');
33 #get borrower details
34 my $data=borrdata('',$bornum);
35 my $add=$input->param('add');
36 if ($add){
37 #  print $input->header;
38   my $itemnum=$input->param('itemnum');
39   my $desc=$input->param('desc');
40   my $amount=$input->param('amount');
41   my $type=$input->param('type');
42   manualinvoice($bornum,$itemnum,$desc,$type,$amount);
43   print $input->redirect("/cgi-bin/koha/moremember.pl?bornum=$bornum");
44 } else {
45   print $input->header;
46   print startpage();
47   print startmenu('member');
48 print <<printend
49 <Center><h3>Manual Invoice</h3></center>
50 <form action=/cgi-bin/koha/maninvoice.pl method=post>
51 <table cellpadding=2 cellspacing=0 border=0>
52 <input type=hidden name=bornum value=$bornum>
53 <tr><td><b>Borrowernumber<b></td><td>$bornum</td></tr>
54 <!--<tr><td><b>Cardnumber<b></td><td></td></tr>-->
55 <tr><td><b>Type</b></td><Td>
56 <select name=type>
57 <option value=L>Lost Item</option>
58 <option value=F>Fine</option>
59 <option value=A>Account Management Fee</option>
60 <option value=N>New Card</option>
61 <option value=M>Sundry</option>
62 <option value=REF>Cash Refund</option>
63 </select>
64 </td></tr>
65 <tr><td><b>Itemnumber</b></td><td><input type=text name=itemnum></td></tr>
66 <tr><td><b>Description</b></td><td><input type=text name=desc size=50></td></tr>
67 <tr><td><b>Amount</b></td><td><input type=text name=amount></td></tr>
68 <tr><td><input type=submit name=add value=Add></td></tr>
69 </table>
70 </form>
71 printend
72 ;
73 print endmenu('member');
74 print endpage();
75
76 }