-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calculated Balance Assertions #923
Comments
This is expected, we don't support those kind of amount expressions. We are thinking about adding them though, see #871 and related PRs. |
Related to that, it would be quite useful to hear more details about real-world use cases where this feature is valuable ("tightly linked accounts" ?) |
I think it would be a really nice feature to have. As for the particular real-world use case, here's my situation; I have a bank which provides me with two accounts:
Every night, money is automatically taken out from the savings account and placed in the transaction account in order to maintain a minimum account balance. I'll also occasionally make manual transfers between these two accounts if I wish to make a larger purchase. As a result, I have a lot of transactions between these two account which I don't really want to keep track of and I really want to treat them as just the one account. |
Thanks for the example. Why are amount expressions useful in this case ?
|
In my case, because I receive statements from both accounts separately. Thus once a month (when interest is paid), I make a balance assertion and sum up the balances from both accounts. So for the case I gave initially:
This says that my transaction account has AUD 200.00, while the other account has AUD 1,000.00 for a combined balance of AUD 1,200.00. Of course I could make an annotation instead:
Though that feels like I'm just doubling things up. |
Furthermore, I can think of one other use-case for having balance assertions in the context of cryptocurrencies. Specifically, some cryptocurrencies (prefer to) use addresses only once (the sequence addresses are generated according to a seed). This means every time a transaction takes place, the source address is completely emptied and new addresses are created to store the change. Here's an example:
Generally, the clients that manage these transactions will automatically sum up the balances of all the owned addresses, but this still gives a good example of "tightly linked accounts". |
Thanks! I think I got the first one. I haven't yet got the second one. I would say I'm not yet seeing significant pain being caused by not having this feature. Nevertheless, it seems quite possible that we may have it soon. I'll close this in favour of #871. |
In
ledger
, it is possible to use calculated values for balance assertions, for example:which is useful if you have tightly linked accounts. When
hledger
tries to parse the file, it raises the error:Is this expected behaviour from
hledger
? Or should this be allowed?The text was updated successfully, but these errors were encountered: