from com.infinitekind.moneydance.model import * budgetsList = moneydance_data.getBudgets() currentBudget = budgetsList.findCurrentBudget() items = currentBudget.getItemList() allTrans = book.getTransactionSet().getAllTxns() def getAmount(TxnSet, item) : total = 0.0 for txn in TxnSet: if txn.getDateInt() < item.getIntervalStartDate(): continue if txn.getDateInt() > item.getIntervalEndDate(): continue if txn.getAccount() ==item.getTransferAccount(): total = total + txn.getValue()/100.0 return total for item in items: amount = item.getAmount()/ 100 interval = item.getInterval() dateRange = item.getDateRange() actuals=getAmount(allTrans,item) account = item.getTransferAccount() name = account.getAccountName() print 'Amount:'+name+' $' + str(amount)+' Actuals $' + str(actuals) print 'Interval: ' + str(interval) print 'Date Range: ' + str(dateRange)