Budget.calculate

jrcalzada's Avatar

jrcalzada

07 Dec, 2018 10:03 AM

I'm trying to write a small extension that requires data about budgeted and actual amounts of several categories. Looking through the documentation, I assumed the Budget.calculate method would do the work of calculating actual amounts based on transactions and returning that information. However, it seems to always return nothing. I have the following minimal Python repro:

from com.infinitekind.moneydance.model import *
from com.moneydance.apps.md.controller import *
from java.util import Date
budget = moneydance_data.getBudgets().findCurrentBudget()
start = Util.convertDateToInt(Date(2018,1,1))
end = Util.convertDateToInt(Date(2018,12,31))
items = budget.calculate(start, end, True, True)
print(items.getActualExpensesList())

This results in printing an empty list. I checked and the budget returned is the expected one (2018) which does have several categories and is being tracked correctly in the UI. I can get the budget items from the budget and they contain data as expected. It's only the call to calculate that presents this problem.

Any idea about what might be going on?

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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