[fava-envelope] Unexpected behaviors with activity and undeclared budget accounts

105 views
Skip to first unread message

Mark Martel

unread,
Jun 23, 2024, 4:16:19 PM (6 days ago) Jun 23
to Beancount
I'm trying to get going with fava-envelope. 

The problem: Budget envelopes show up as expected but I'm not seeing activities show up as I expected they would.
Screen Shot 2024-06-23 at 12.24.00 PM.png
My expectations were:
1. The following ledger entries would show up in the Expenses:Food row as -175, reducing the amount available to 1225. It's clear these transactions are being seen and processed by the extension but the Expense postings aren't being counted as budget activities for reasons that elude me.

2. I did not expect to see a Assets:US:Schwab:Checking row, since I haven't declared it as a budget account.

Here are the only transactions in the ledger:
2024-06-02 * "Groceries"
Assets:US:Schwab:Checking -150 USD
Expenses:Household:Groceries 150 USD
2024-06-04 * "Dining Out"
Assets:US:Schwab:Checking -100 USD
Expenses:Household:DiningOut 100 USD


And here are my fava-envelope declarations:
2020-01-01 custom "envelope" "start date" "2024-06"
2020-01-01 custom "envelope" "months ahead" "12"

2020-01-01 custom "envelope" "budget account" "Expenses:*"

2024-06-01 custom "envelope" "mapping" "Expenses:Household:Groceries" "Expenses:Food"
2024-06-01 custom "envelope" "mapping" "Expenses:Household:DiningOut" "Expenses:Food"
2024-06-01 custom "envelope" "mapping" "Expenses:Household:Automotive:Maintenance" "Expenses:Cars"
2024-06-01 custom "envelope" "mapping" "Expenses:Household:Automotive:Insurance" "Expenses:Cars"
2024-06-01 custom "envelope" "mapping" "Expenses:Household:Automotive:Gas" "Expenses:Cars"

2024-06-01 custom "envelope" "allocate" "Expenses:Food" 1400
2024-06-01 custom "envelope" "allocate" "Expenses:Cars" 500

Can someone please help me correct the unexpected behavior? I'm assuming I'm making mistakes in my declarations.

Thank you!

polarmutex

unread,
Jun 25, 2024, 9:45:12 AM (4 days ago) Jun 25
to Beancount
I don't think anything jumps to mind as to why this is not working. I will look at it when I can and see what is happening. 

polarmutex

Mark Martel

unread,
Jun 25, 2024, 12:13:25 PM (4 days ago) Jun 25
to Beancount
Thank you! Please let me know if I can provide anything that might be helpful in diagnosing/troubleshooting.

polarmutex

unread,
Jun 25, 2024, 3:56:16 PM (4 days ago) Jun 25
to Beancount
pretty easy change to get what you want

```beancount
2020-01-01 custom "envelope" "budget account" "Assets:*"
```
budget accounts need to be the assets/liabilities accounts you want to track and then you map the Income/Expenses

Need to improve the documentation and feel free to create issues for change or new features

hope this works

polarmutex

Mark Martel

unread,
Jun 26, 2024, 7:04:51 AM (3 days ago) Jun 26
to Beancount
I was not clear whether you're suggesting:
A. add the line you've suggested to my declaration of budget accounts
B. replace my existing budget account line with this one

I've tried both A and B and I'm still getting errors with both: "Internal Server Error: The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."

Here is my full beancount file for reference. Perhaps you can tell me what I'm doing wrong?

;; -*- mode: org; mode: beancount; -*-
;; Birth: 1980-05-12
;; Dates: 2021-01-01 - 2023-05-28
;; THIS FILE HAS BEEN AUTO-GENERATED.
* Options

option "title" "Household Forecasting"
option "operating_currency" "USD"

2000-01-01 custom "fava-extension" "fava_envelope" "{}"

* Commodities

1792-01-01 commodity USD
export: "CASH"
name: "US Dollar"
* Equity and Liability Accounts

1980-05-12 open Equity:Opening-Balances
1980-05-12 open Liabilities:AccountsPayable

1980-05-12 open Assets:Home
1980-05-12 open Assets:Car

1980-05-12 open Liabilities:Mortgage
1980-05-12 open Liabilities:CarLoans

* Banking

2023-01-01 open Assets:US:Schwab

2023-01-01 open Assets:US:Schwab:Checking USD

2023-01-01 * "Opening Balance for checking account"
Assets:US:Schwab:Checking 0 USD
Equity:Opening-Balances 0 USD

* Expense Accounts

1980-01-01 open Expenses:Household:Groceries
1980-01-01 open Expenses:Household:DiningOut
1980-01-01 open Expenses:Household:Automotive:Maintenance
1980-01-01 open Expenses:Household:Automotive:Insurance
1980-01-01 open Expenses:Household:Automotive:Gas


* Envelope Budgets


2020-01-01 custom "envelope" "start date" "2024-06"
2020-01-01 custom "envelope" "months ahead" "12"

2020-01-01 custom "envelope" "budget account" "Expenses:*"
2020-01-01 custom "envelope" "budget account" "Assets:*"

2024-06-01 custom "envelope" "mapping" "Expenses:Household:Groceries" "Expenses:Food"
2024-06-01 custom "envelope" "mapping" "Expenses:Household:DiningOut" "Expenses:Food"
2024-06-01 custom "envelope" "mapping" "Expenses:Household:Automotive:Maintenance" "Expenses:Cars"
2024-06-01 custom "envelope" "mapping" "Expenses:Household:Automotive:Insurance" "Expenses:Cars"
2024-06-01 custom "envelope" "mapping" "Expenses:Household:Automotive:Gas" "Expenses:Cars"

2024-06-01 custom "envelope" "allocate" "Expenses:Food" 1400
2024-06-01 custom "envelope" "allocate" "Expenses:Cars" 500

* Transactions

polarmutex

unread,
Jun 26, 2024, 11:38:29 PM (3 days ago) Jun 26
to Beancount
delete this line
2020-01-01 custom "envelope" "budget account" "Expenses:*"

budget accounts should be under Assets/Liabilities
mappings/allocations should be under Income/Expenses

Mark Martel

unread,
Jun 27, 2024, 2:19:40 PM (2 days ago) Jun 27
to Beancount
Thank you for trying to help but I get the exact same Server Error messages when I delete out that line.

Looks like I'll either have to give up or double down walking through your code in debug mode line by line to see where it's failing.

polarmutex

unread,
Jun 28, 2024, 3:44:51 PM (yesterday) Jun 28
to Beancount
I want to help make sure we get past this. started a GitHub discussion where we could more easily go back and forth with the issue

Reply all
Reply to author
Forward
0 new messages