fix error on lastincrement.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Ryan Higgins 2008-05-12 05:41:25 -05:00 committed by Joshua Ferraro
parent b54401ac66
commit a9b7e08077
1 changed files with 1 additions and 2 deletions

View File

@ -457,14 +457,13 @@ sub UpdateFine {
my $diff = $amount - $data->{'amount'};
my $out = $data->{'amountoutstanding'} + $diff;
my $increment = -1 * $diff;
my $sth2 = $dbh->prepare(
"UPDATE accountlines SET date=now(), amount=?,
amountoutstanding=?, lastincrement=? , accounttype='FU' WHERE
borrowernumber=? AND itemnumber=?
AND (accounttype='FU' OR accounttype='O') AND description LIKE ?"
);
$sth2->execute( $amount, $out, $increment, $data->{'borrowernumber'},
$sth2->execute( $amount, $out, $diff , $data->{'borrowernumber'},
$data->{'itemnumber'}, "%$due%" );
$sth2->finish;
}