5 #script to update charges for overdue in database
7 # is called by charges.pl
8 # written 1/1/2000 by chris@katipo.co.nz
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
34 #print $input->header;
36 #print startmenu('issue');
39 my $dbh = C4
::Context
->dbh;
41 my @names=$input->param();
43 foreach my $key (@names){
45 my $bor=substr($key,0,1);
48 my $data=$input->param($key);
49 my @dat=split(',',$data);
50 # print "$bor $cat $dat[0] $dat[1] $dat[2] <br> ";
51 my $sth=$dbh->prepare("Update categoryitem set fine=$dat[0],startcharge=$dat[1],chargeperiod=$dat[2] where
52 categorycode='$bor' and itemtype='$cat'");
56 print $input->redirect("/cgi-bin/koha/charges.pl");
57 #print endmenu('issue');