summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-29 23:23:49 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-12-29 23:23:49 +0000
commita47c0eef850ee9e5eebdd99600ddc721c0600071 (patch)
tree3c6ab9522834108ad3e9ae84e1470057ac16ac09
parentabeb21a13a06e9084abbf45f2738d0a0b1d095fd (diff)
Applying Lena Brummett's patch for avgcost.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2020 4979c152-3d1c-0410-bac9-87ea11338e46
-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;