On Wed, 11 Oct 2017, at 17:40, Richard Lawrence wrote:
> Hi John,
> > then this balance command tells me I have made $100 out of thin
> > air ($1105 total):
> >
> > ledger b Assets:CurrentAccount
> >
> > That's because in that final txn I'm actually setting not the
> > summed-up total of everything in *or under*
> > Assets:CurrentAccount, as appears in the balance output, but the
> > amount that lives in that *exact* location (which you might
> > write in a balance command as '^Assets:CurrentAccount$'). I'm
> > not sure there's any way to fix that final txn to say that it's
> > actually the *total* "descendant-or-self" value I want to set
> > equal to $1005?
>
> Hmm, I see. I'm surprised by this, but I don't use balance
> assignments myself. If you need balance assignments like this, I
> guess subaccounts are not the way to go. (Unless this is a bug?)
>
> Personally, I want every transaction recorded -- independently, so
> I can check my record against my bank's. Thus, I avoid what
> you're trying to do here: automatic adjustments via balance
> assertions. But I realize that "don't do that" is not very
> helpful advice. :)
For me my *next* (not immediate) goal will be just to import
transactions from my bank. At that point I still won't independently
record the same transactions, but even that is a project that for me is
some time consuming steps away still (of course I hope later that I'll
get those transaction lining up with others in more detail than at
present).
However, even when I do import those txns, I think I'll *still* want to
write down the "ground truth" (total) figure from the bank explicitly in
the ledger regularly, not only transactional amounts (changes).
Perhaps the closest fit to my current "adjust regularly to match bank
balance" practice is to use value expression assertions like this:
2017-10-01 * Opening Balance
Assets:CurrentAccount $1000
Equity:OpeningBalances
2017-10-02 * Savings
Assets:CurrentAccount:Savings $100
Assets:CurrentAccount
2017-10-03 * Adjustment
Assets:CurrentAccount $5
Equity:Adjustments
assert account("Assets:CurrentAccount").total == $1005
Which I took straight from some helpful people who hang out somewhere
called the "ledger-cli mailing list" ;-) who contributed to this:
https://github.com/ledger/ledger/wiki/Notes-from-the-Group#checks-and-assertions
> Can anyone else lend some insights?
Yes please!
--
---
You received this message because you are subscribed to the Google Groups
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.