3 #script to display reports
15 $flagsrequired->{circulation}=1;
16 my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired);
20 my $type=$input->param('type');
22 print startmenu('issue');
23 print "Each box needs to be filled in with fine,time to start charging,charging cycle<br>
24 eg 1,7,7 = $1 fine, after 7 days, every 7 days";
27 my $query="Select description,categorycode from categories";
28 my $sth=$dbh->prepare($query);
34 while (my $data=$sth->fetchrow_hashref){
35 $trow[$i]=$data->{'description'};
36 $trow3[$i]=$data->{'categorycode'};
40 print mktablerow(10,'white','',@trow);
41 print "<form action=/cgi-bin/koha/updatecharges.pl method=post>";
42 $query="Select description,itemtype from itemtypes";
43 $sth=$dbh->prepare($query);
47 while (my $data=$sth->fetchrow_hashref){
50 $query="select * from categoryitem where categorycode='$trow3[$i]' and itemtype='$data->{'itemtype'}'";
51 my $sth2=$dbh->prepare($query);
53 my $dat=$sth2->fetchrow_hashref;
55 my $fine=$dat->{'fine'}+0;
56 $trow2[$i]="<input type=text name=\"$trow3[$i]$data->{'itemtype'}\" value=\"$fine,$dat->{'startcharge'},$dat->{'chargeperiod'}\" size=6>";
58 print mktablerow(11,'white',$data->{'description'},@trow2);
65 print "<input type=submit></form>";
66 print endmenu('issue');