changing DB structure to calculate next issue number.
[koha.git] / tidyaccounts.pl
1 #!/usr/bin/perl
2
3 # $Id$
4
5 #
6 # written 31/5/00 by chris@katipo.co.nz to make a way to fix account mistakes
7 #
8
9
10 # Copyright 2000-2002 Katipo Communications
11 #
12 # This file is part of Koha.
13 #
14 # Koha is free software; you can redistribute it and/or modify it under the
15 # terms of the GNU General Public License as published by the Free Software
16 # Foundation; either version 2 of the License, or (at your option) any later
17 # version.
18 #
19 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
20 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
21 # A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License along with
24 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
25 # Suite 330, Boston, MA  02111-1307 USA
26
27 use strict;
28 use CGI;
29 use C4::Accounts2;
30
31 my $input=new CGI;
32
33 #print $input->header();
34 #print $input->dump;
35
36 my $bornum=$input->param('bornum');
37
38 my @name=$input->param;
39
40 foreach my $key (@name){
41   if ($key ne 'bornum'){
42     my $temp=$input->param($key);
43
44 #    print $temp,$key;
45     if ($temp ne ''){
46       fixaccounts($bornum,$key,$temp);
47
48     }
49   }
50 }
51
52 print $input->redirect("boraccount.pl?bornum=$bornum");