[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Average and Last cost patch



Seems the last and average costs in the Parts report wasn't getting
updated when a vendor invoice gets posted in release 1.2.10.  And it
doesn't look like it's fixed in svn trunk as of this morning, either.
This one-line patch fixes the problem:

Index: LedgerSMB/IR.pm
===================================================================
--- LedgerSMB/IR.pm     (revision 2018)
+++ LedgerSMB/IR.pm     (working copy)
@@ -812,7 +812,7 @@
                           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;


-- 
Start your own business for $10, ask me how today!!!
www.youravon.com/lanabrummett
Having a party? Need a cake?  Look no further,  ask for details!!!!
www.creativecakecreations.com
Call Today (847)687-5794