summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS2
-rw-r--r--LedgerSMB/IR.pm2
2 files changed, 3 insertions, 1 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index bc2b7168..adbd098d 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -75,6 +75,8 @@ widget system for 1.3.
David Mora contributed the new Payment template/system.
+Lena Brummett contributed a bug fix for avgcost and lastcost updates.
+
Original Authors of SQL-Ledger:
===================================
Dieter Simader <dsimader @ sql-ledger.com>
diff --git a/LedgerSMB/IR.pm b/LedgerSMB/IR.pm
index 939c8c09..249e52d7 100644
--- a/LedgerSMB/IR.pm
+++ b/LedgerSMB/IR.pm
@@ -812,7 +812,7 @@ sub post_invoice {
SET avgcost = avgcost($item),
lastcost = lastcost($item)
WHERE id = $item|;
- $dbh->prepare($query) || $form->dberror($query);
+ $dbh->do($query) || $form->dberror($query);
}
my $rc = $dbh->commit;