I don't understand "Accounts"

rcook's Avatar

rcook

28 Mar, 2019 10:38 AM

I run the following python script in a python window of MoneyDance (2017.10 (1706), Windows 7):

# lists payees and categories

book = moneydance.getCurrentAccountBook()

iter = book.getTransactionSet().iterator()
for i in range(1000):
    txn = next(iter)
    print "%-25s %-50s %10s %s" %(txn.getAccount(), txn.getDescription(), txn.getValue(), txn.getDateInt())

And I get output like this:

perf checking             woodcroft Swim & Tennis                                -17500 20000903
food                      Harris Teeter                                            8690 20150125
perf checking             Southwest Elementary                                     -500 19990601
Checking SECU             Foundation                                               -100 20170612
eout                      Sunflowers Cafe Cater                                    1131 20171015
plant                     Logan Trading                                            2987 20151024
Util:power                Duke Power                                               5729 20040303

Note that sometimes the 'account' is the category in which I put the purchase (food, eout, plant )and sometimes it is the name of the bank account from which I make the payment (perf checking, Checking SECU).

I don't why it's different things for different transactions. It does not appear to be one of these accounting 'double entry' things, because there is no matching amount in a different 'account'. It isn't consistent, sometimes Duke Power shows up as "Util:power" and sometimes under the checking account. Is there some way to write this code (or in Java, I don't care) to get the specific thing I'm looking for? In this case it's what I call a category, i.e., the name of the type of expense, rather than the name of the bank account from which the money was taken.

  1. Support Staff 1 Posted by Sean Reilly on 28 Mar, 2019 10:46 AM

    Sean Reilly's Avatar

    Hello,

    What you're seeing there is the double-entry aspect of Moneydance. In the main transaction set there are at least two entries for every transaction in the interface - one in the account in which it was entered, and one (or more, if it's a multi-split txn) in the category assigned to that transaction. In Moneydance all categories are account objects, just with a different type. So if you call .getAccountType() on one of those accounts you will get an identifier for the type of account (bank, investment, credit card, income, expense, etc). I'd recommend filtering by that identifier if you don't already have a set filter (say, by specific category names).

    Thanks,
    Sean

  2. 2 Posted by rcook on 28 Mar, 2019 11:32 AM

    rcook's Avatar

    Thanks, that did clear that up.

  3. System closed this discussion on 27 Jun, 2019 11:40 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

17 Apr, 2024 09:52 AM
17 Apr, 2024 09:39 AM
17 Apr, 2024 09:29 AM
17 Apr, 2024 08:37 AM
17 Apr, 2024 08:12 AM