Lines 169-178
sub makepayment {
Link Here
|
169 |
my $data = $sth->fetchrow_hashref; |
169 |
my $data = $sth->fetchrow_hashref; |
170 |
$sth->finish; |
170 |
$sth->finish; |
171 |
|
171 |
|
172 |
my $sth = $dbh->prepare("UPDATE accountlines |
172 |
$sth = $dbh->prepare('UPDATE accountlines |
173 |
SET amountoutstanding = 0 |
173 |
SET amountoutstanding = 0 |
174 |
WHERE borrowernumber = ? |
174 |
WHERE borrowernumber = ? |
175 |
AND accountno = ?"); |
175 |
AND accountno = ?'); |
176 |
$sth->execute($borrowernumber, $accountno); |
176 |
$sth->execute($borrowernumber, $accountno); |
177 |
|
177 |
|
178 |
# print $updquery; |
178 |
# print $updquery; |
Lines 185-194
sub makepayment {
Link Here
|
185 |
|
185 |
|
186 |
# create new line |
186 |
# create new line |
187 |
my $payment = 0 - $amount; |
187 |
my $payment = 0 - $amount; |
188 |
my $sth = $dbh->prepare("INSERT INTO accountlines |
188 |
$sth = $dbh->prepare("INSERT INTO accountlines |
189 |
(borrowernumber, accountno, date, amount, |
189 |
(borrowernumber, accountno, date, amount, |
190 |
description, accounttype, amountoutstanding) |
190 |
description, accounttype, amountoutstanding) |
191 |
VALUES (?,?,now(),?,?,'Pay',0)"); |
191 |
VALUES (?,?,now(),?,?,'Pay',0)"); |
192 |
$sth->execute($borrowernumber, $nextaccntno, $payment, "Payment,thanks - $user"); |
192 |
$sth->execute($borrowernumber, $nextaccntno, $payment, "Payment,thanks - $user"); |
193 |
|
193 |
|
194 |
# FIXME - The second argument to &UpdateStats is supposed to be the |
194 |
# FIXME - The second argument to &UpdateStats is supposed to be the |
195 |
- |
|
|