work inprogrogress

This commit is contained in:
chris 2000-01-11 10:17:52 +00:00
parent b9fec7ca1d
commit 84e395e88b
3 changed files with 15 additions and 8 deletions

View file

@ -753,8 +753,8 @@ sub getboracctrecord {
my @acctlines;
my $numlines;
my $query = "Select * from accountlines
where borrowernumber = $params->{'borrowernumber'} and amountoutstanding
<>0";
where borrowernumber = $params->{'borrowernumber'}
order by date desc";
my $sth=$dbh->prepare($query);
# print $query;
$sth->execute;

View file

@ -80,26 +80,31 @@ $data->{'borrowernotes'}</a>
<img src="/images/holder.gif" width=16 height=800 align=left>
<TABLE CELLSPACING=0 CELLPADDING=5 border=1 >
<TR VALIGN=TOP>
<td bgcolor="99cc33" background="/images/background-mem.gif" colspan=3><B>FINES & CHARGES</TD></TR>
<td bgcolor="99cc33" background="/images/background-mem.gif" colspan=4><B>FINES & CHARGES</TD></TR>
printend
;
my %bor;
$bor{'borrowernumber'}=$bornum;
my ($numaccts,$accts,$total)=getboracctrecord('',\%bor);
if ($numaccts > 10){
$numaccts=10;
}
for (my$i=0;$i<$numaccts;$i++){
if ($accts->[$i]{'accounttype'} ne 'Pay'){
my $amount= $accts->[$i]{'amountoutstanding'} + 0.00;
#if ($accts->[$i]{'accounttype'} ne 'Pay'){
my $amount= $accts->[$i]{'amount'} + 0.00;
my $amount2= $accts->[$i]{'amountoutstanding'} + 0.00;
print "<tr VALIGN=TOP >";
my $item=" &nbsp; ";
if ($accts->[$i]{'accounttype'} ne 'Res'){
#get item data
#$item=
}
print "<TD>$item</td>";
print "<td>$accts->[$i]{'date'}</td>";
# print "<TD>$accts->[$i]{'accounttype'}</td>";
print "<TD>$accts->[$i]{'description'}</td>
<TD>$amount</td>
<TD>$amount</td><td>$amount2</td>
</tr>";
}
#}
}
print <<printend

2
pay.pl
View file

@ -49,6 +49,7 @@ print <<printend
printend
;
for (my $i=0;$i<$numaccts;$i++){
if ($accts->[$i]{'amountoutstanding'} > 0){
print <<printend
<tr VALIGN=TOP >
<TD><input type=radio name=payfine$i value=no checked>Unpaid
@ -69,6 +70,7 @@ print <<printend
printend
;
}
}
print <<printend
<tr VALIGN=TOP >
<TD></td>