Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 40 lines (32 sloc) 0.884 kb
d0374d0 Initial revision
rangi authored
1 #!/usr/bin/perl
2
3 #script to update charges for overdue in database
4 #updates categoryitem
5 # is called by charges.pl
6 # written 1/1/2000 by chris@katipo.co.nz
7
8 use strict;
9 use CGI;
10 use C4::Output;
11 use C4::Database;
12
13 my $input = new CGI;
14 #print $input->header;
15 #print startpage();
16 #print startmenu('issue');
17
18
19 my $dbh=C4Connect;
20 #print $input->dump;
21 my @names=$input->param();
22
23 foreach my $key (@names){
24
25 my $bor=substr($key,0,1);
26 my $cat=$key;
27 $cat =~ s/[A-Z]//i;
28 my $data=$input->param($key);
29 my @dat=split(',',$data);
30 # print "$bor $cat $dat[0] $dat[1] $dat[2] <br> ";
31 my $sth=$dbh->prepare("Update categoryitem set fine=$dat[0],startcharge=$dat[1],chargeperiod=$dat[2] where
32 categorycode='$bor' and itemtype='$cat'");
33 $sth->execute;
34 $sth->finish;
35 }
36 $dbh->disconnect;
37 print $input->redirect("/cgi-bin/koha/charges.pl");
38 #print endmenu('issue');
39 #print endpage();
Something went wrong with that request. Please try again.