3 #script to update charges for overdue in database
5 # is called by charges.pl
6 # written 1/1/2000 by chris@katipo.co.nz
9 # Copyright 2000-2002 Katipo Communications
11 # This file is part of Koha.
13 # Koha is free software; you can redistribute it and/or modify it under the
14 # terms of the GNU General Public License as published by the Free Software
15 # Foundation; either version 2 of the License, or (at your option) any later
18 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
19 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
20 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License along with
23 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
24 # Suite 330, Boston, MA 02111-1307 USA
32 #print $input->header;
34 #print startmenu('issue');
37 my $dbh = C4::Context->dbh;
39 my @names=$input->param();
41 foreach my $key (@names){
43 my $bor=substr($key,0,1);
46 my $data=$input->param($key);
47 my @dat=split(',',$data);
48 # print "$bor $cat $dat[0] $dat[1] $dat[2] <br> ";
49 my $sth=$dbh->prepare("Update categoryitem set fine=$dat[0],startcharge=$dat[1],chargeperiod=$dat[2] where
50 categorycode='$bor' and itemtype='$cat'");
54 print $input->redirect("/cgi-bin/koha/charges.pl");
55 #print endmenu('issue');