$sth was redeclared in the same scope. Overwriting its value
with the return from prepare is adequate
removed some tab/space mixed indents from the SQL strings
---
C4/Accounts.pm | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/C4/Accounts.pm b/C4/Accounts.pm
index 7bddd1a..fd834b6 100644
--- a/C4/Accounts.pm
+++ b/C4/Accounts.pm
@@ -169,10 +169,10 @@ sub makepayment {
my $data = $sth->fetchrow_hashref;
$sth->finish;
- my $sth = $dbh->prepare("UPDATE accountlines
- SET amountoutstanding = 0
- WHERE borrowernumber = ?
- AND accountno = ?");
+ $sth = $dbh->prepare('UPDATE accountlines
+ SET amountoutstanding = 0
+ WHERE borrowernumber = ?
+ AND accountno = ?');
$sth->execute($borrowernumber, $accountno);
# print $updquery;
@@ -185,10 +185,10 @@ sub makepayment {
# create new line
my $payment = 0 - $amount;
- my $sth = $dbh->prepare("INSERT INTO accountlines
- (borrowernumber, accountno, date,
amount,
- description, accounttype,
amountoutstanding)
- VALUES (?,?,now(),?,?,'Pay',0)");
+ $sth = $dbh->prepare("INSERT INTO accountlines
+ (borrowernumber, accountno, date, amount,
+ description, accounttype, amountoutstanding)
+ VALUES (?,?,now(),?,?,'Pay',0)");
$sth->execute($borrowernumber, $nextaccntno, $payment, "Payment,thanks -
$user");
# FIXME - The second argument to &UpdateStats is supposed to be the
--
1.7.5.2
_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/