Reporting on Ledger Balance

Milo C's Avatar

Milo C

21 Nov, 2025 05:42 PM

Does anyone know if it's possible to create a report, display or otherwise access the current Ledger Balance for every account, in a single place?

I have a bunch of Investment accounts that I want to connect via Plaid (Moneydance+) and their Ledger Balances are up-to-date but the individual positions are quite hard to maintain and, frankly, I'm more interested in the current total value of each account, for reporting purposes.

I would love to have all that information in ONE place. Thanks.

  1. 1 Posted by Stuart Beesley ... on 21 Nov, 2025 05:55 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    What do you mean by ‘ledger balance’? Where in MD can you see this now?

  2. 2 Posted by Milo C on 21 Nov, 2025 06:51 PM

    Milo C's Avatar

    It's the balance provided by the bank from data downloads. It appears in the Balance Box, but I have to browse each account separately to see it.

    Documentation: https://infinitekind.tenderapp.com/kb/register-and-transactions/bal...

  3. 3 Posted by Stuart Beesley ... on 23 Nov, 2025 04:27 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    This may help you. A small python script to report these balances..

    See revised script in post below

    (also attached)

    Menu/Window/Show Developer Console/
    copy / paste the above code into the Python Snippet area, then click Run Snippet.
    OR Open Script, select this attached file, Then run..
    Either way, the results will appear below.
    Let me know if it works for you? It's harmless and readonly.

    I am recommending to IK that this also goes into the Account Balances Report...

  4. 4 Posted by -Kevin N. on 23 Nov, 2025 05:18 PM

    -Kevin N.'s Avatar

    @Milo, Sorry to jump in here. @Stuart, I get the attached error when I run the saved .py

    -Kevin N. (not a member of MD support)

  5. 5 Posted by Milo C on 23 Nov, 2025 05:39 PM

    Milo C's Avatar

    @Stuart - This is awesome. Thanks so much!

    @Kevin - I got the same error, too. Moving this line up above the first reference to ct in the for loop, fixes it:

    ct=acct.getCurrencyType()

    Would be great if IK decides to add this to standard reports...

  6. 6 Posted by -Kevin N. on 23 Nov, 2025 05:52 PM

    -Kevin N.'s Avatar

    @Milo, Bingo! Thanks.
    -Kevin N.

  7. 7 Posted by Stuart Beesley ... on 23 Nov, 2025 06:04 PM

    Stuart Beesley (Mr Toolbox)'s Avatar

    Bugger.. Sorry.. I did test it of course, but because of the way I tested, it remembered that variable.. Here is the fixed script:

    #!/usr/bin/env python
    # -*- coding: UTF-8 -*-
    # author - Stuart Beesley - November 2025 - StuWareSoftSystems
    from com.infinitekind.moneydance.model import AccountUtil, AcctFilter, Account, CurrencyUtil
    from com.infinitekind.util import DateUtil
    from java.util import Date
    m=moneydance
    book=m.getCurrentAccountBook()
    sdf=m.getPreferences().getShortDateFormatter()
    allAccounts=AccountUtil.allMatchesForSearch(book, AcctFilter.ALL_ACCOUNTS_FILTER)
    print("{:<60} {:<15} {:<10} {:>15} {:<15} {:>15} {:<15}".format(
        "Account",
        "Type",
        "Currency",
        "Ledger Balance",
        "Ledger Date",
        "Avail' Balance",
        "Avail' Date"
    ))
    
    for acct in allAccounts:
     at=acct.getAccountType()
     ct=acct.getCurrencyType()
    
     if at not in [Account.AccountType.INVESTMENT, Account.AccountType.BANK, Account.AccountType.CREDIT_CARD]: continue
     if at.isCategory(): continue
     dlTxns=acct.getDownloadedTxns()
     if dlTxns is None: continue
     olLedgerDate = None
     olLedgerBalance = None
     olAvailableDate = None
     olAvailableBalance = None
    
     olDate = dlTxns.getOnlineLedgerBalanceDate()
     if (dlTxns.hasOnlineLedgerBalance() and olDate != 0L):
      olLedgerDate = DateUtil.convertDateToInt(Date(olDate))
      olLedgerBalance = dlTxns.getOnlineLedgerBalance()
     ollb=ct.formatSemiFancy(olLedgerBalance, '.') if olLedgerBalance is not None else ""
     olld=sdf.format(DateUtil.convertDateToInt(Date(olDate))) if olLedgerDate is not None else ""
    
     olDate = dlTxns.getOnlineAvailBalanceDate()
     if (dlTxns.hasOnlineAvailBalance() and olDate != 0L):
       olAvailableDate = DateUtil.convertDateToInt(Date(olDate))
       olAvailableBalance = dlTxns.getOnlineAvailBalance()
     olab=ct.formatSemiFancy(olAvailableBalance, '.') if olAvailableBalance is not None else ""
     olad=sdf.format(DateUtil.convertDateToInt(Date(olDate))) if olAvailableDate is not None else ""
    
     if olLedgerDate is None and olAvailableDate is None: continue
    
     #print acct.getFullAccountName(), ", ", at, ", ", ollb, ", ", olld, ", ", olab, ", ", olad, ", " 
     print("{:<60} {:<15} {:<10} {:>15} {:<15} {:>15} {:<15}".format(
        acct.getFullAccountName(),
        at,
        ct.getIDString(),
        ollb,
        olld,
        olab,
        olad
     ))
    print "\n<END>"
    
  8. 8 Posted by -Kevin N. on 23 Nov, 2025 06:56 PM

    -Kevin N.'s Avatar

    @Stuart,

    .py now runs as expected.

    Thanks for this.

    -Kevin N.

  9. 9 Posted by Stuart Beesley ... on 26 Nov, 2025 07:25 AM

    Stuart Beesley (Mr Toolbox)'s Avatar

    👍

  10. System closed this discussion on 25 Feb, 2026 07:30 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

12 May, 2026 06:40 PM
12 May, 2026 06:17 PM
12 May, 2026 03:21 PM
12 May, 2026 03:00 PM
12 May, 2026 12:23 AM