Wednesday, February 3, 2010

BucketWise Housekeeping

There's probably some better way for this, but the following works for me.

I reconcile my BucketWise accounts frequently. I also fairly regularly make minor errors in transactions.

Unfortunately, changing an already reconciled AcountItem whacks the statement reference from the object. We end up with leftover transactions in the reconciliation windows.

Solution:

Find the relevant statement.
s = Statement.find(...)
Find the relevant account item.
a = AccountItem.find_by_amount_and_statement_id(-1234, nil)
Set the statement for the account item and save
a.statement = s
a.save

done!