Skip to content
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

Set subaccount balances to zero on inclusive assignments of zero #1727

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

la-wu
Copy link
Contributor

@la-wu la-wu commented Sep 28, 2021

Implementation and sample behavioral tests for #1689

@wgslr
Copy link

wgslr commented Oct 16, 2021

Hi! As a hledger user, I wanted to add my input and note that I'm strongly against this change.

  1. This is a breaking change, modifying the history of existing journals. If we want the functionality showed in the first post, it should be new operator. I particularly dislike making a specific number (0) a magic value.
  2. I use subaccounts for budgeting, which raises instances where the behavior described in subaccount-inclusive balance assignments should generate a posting for each subaccount ? #1689 is not what I want. Consider the following balances:
assets:checking           10foo
assets:checking:clothes   200foo
assets:checking:food     -200foo

hledger balance --tree checking will show a total balance of 10foo.
Let's say I look at my bank statement and discover that the checking account balance is in fact 0foo. I will write a balance assignment to correct the value in hledger:

2021-10-16
   assets:checking  ==* 0foo
   equity:reconciliation

In my opinion, the expected behavior is to generate posting in the top-level account to adjust the balance and not touch the subaccounts:

2021-10-16
   assets:checking  -10foo ==* 0foo
   equity:reconciliation

I do not want to loose the sub-account balances, which show that I overspent on food instead of buying clothes.

@simonmichael simonmichael added needs:discussion To unblock: needs more discussion/review/exploration needs:impact-analysis To unblock: needs analysis of interactions with other features, users, ecosystem labels Nov 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:discussion To unblock: needs more discussion/review/exploration needs:impact-analysis To unblock: needs analysis of interactions with other features, users, ecosystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants