Recording real balances in the presence of virtual transactions

2017-10-08 Thread John Lee
I love ledger and I'm really grateful and happy I found it :-) I've been using virtual transactions for a few months but I'm not yet happy with the way I'm doing it. I have transactions like this: 2017-10-01 * Opening Balance Assets:CurrentAccount $1000 Equity:OpeningBalances 2017-10-

Re: Recording real balances in the presence of virtual transactions

2017-10-10 Thread John Lee
On Mon, 9 Oct 2017, at 02:14, Richard Lawrence wrote: > Is there a reason you need to use a virtual transaction for this? > Why not just use a subaccount, like > > 2017-10-01 * Opening Balance > Assets:CurrentAccount:Savings $100 Assets:CurrentAccount > $900 Equity:OpeningBalances >

Re: Recording real balances in the presence of virtual transactions

2017-10-11 Thread John Lee
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 ever

Debugging assertion failures / printing the value of a value expression

2017-10-19 Thread John Lee
Sometimes the assert expressions I'm adding to my ledger file fail and I don't immediately know why. If I have something like this: assert account("Assets:CurrentAccount").total == $123.45 and I'm wrong about the total, then I'll just be told that I'm wrong, and not what the correct value is. W

Re: Debugging assertion failures / printing the value of a value expression

2017-10-19 Thread John Lee
sets:CurrentAccount' prints $1000. Bug?? How can I see what ledger *thinks* the total is when it evaluates the assert? On Thu, 19 Oct 2017, at 23:13, John Lee wrote: > Sometimes the assert expressions I'm adding to my ledger file fail and I > don't immediately know why. If

Re: Debugging assertion failures / printing the value of a value expression

2017-10-20 Thread John Lee
says it should be ($800), and the difference ($-100). All of these end up > being very useful at different times. > > I leave these in my ledger files. This gives me both a history of > balances, > and also a sort of test suite. If I change the organization of my files, > change

Re: Debugging assertion failures / printing the value of a value expression

2017-10-20 Thread John Lee
like 2017-10-01 the amount that the asset increases by > balances with the amount the budgets increase by. I then have rules to > automatically pair up Expense and Budget transactions. > > On Fri, Oct 20, 2017 at 1:46 PM John Lee wrote: > > > Hi Michael > > >

Re: Debugging assertion failures / printing the value of a value expression

2017-10-21 Thread John Lee
18:05, Simon Michael wrote: > On 10/20/17 1:46 PM, John Lee wrote: > > I guess I should either dust off my very dusty C++ and try to fix it, or > > try one of the ledger spinoffs like beancount... maybe there are > > beancount / hledger people here who can comment re whether thos

Bugzilla down

2017-10-22 Thread John Lee
bugs.ledger-cli.org is not responding for me. It's linked to from this page http://ledger-cli.org/contribute.html -- --- 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 t

Bug fix for total in value expressions; Added print directive (was Re: Debugging assertion failures ...)

2017-10-22 Thread John Lee
'^Assets:CurrentAccount$' I get $800, and ledger b > '^Assets:CurrentAccount:Savings$' prints $200 -- which adds to $1000, > and indeed ledger b '^Assets:CurrentAccount' prints $1000. Bug?? How > can I see what ledger *thinks* the total is when it evaluates th

Re: Budget causes my ledger not to parse file?

2017-12-06 Thread John Lee
Andrew: You can probably create a small file that doesn't have your financial details in it by deleting all of the file except for a first guess at what the relevant part is, then checking you can still reproduce the error. 'Binary search' should get you there if your first guess doesn't work. Th

Re: Budget causes my ledger not to parse file?

2017-12-07 Thread John Lee
It actually causes an assertion failure for me, so I think it is a ledger bug. Error: Assertion failed in "/build/ledger-mvCOg_/ledger-3.1.2~pre1+g3a00e1c+dfsg1/src/textual.cc", line 1433:ledger::post_t* ledger::{anonymous}::instance_t::parse_post(char*, std::streamsize, ledger::account_t*, ledger

Odd interaction of metadata values ending in "d" with bal -X --date-format

2018-12-09 Thread John Lee
Hi I can raise a bug about this, but I'm posting here in the hope of getting a clue re what is going on to cause this and maybe fix it. Given this ledger file: 2018-12-09 * Investment ; food: Assets:Investments:Funds1 GOOG @ $1000 Assets:Investments:Funds1 BL

Re: Odd interaction of metadata values ending in "d" with bal -X --date-format

2018-12-09 Thread John Lee
I can't make much sense of these outputs either! On Sun, 9 Dec 2018, at 14:46, John Lee wrote: > Hi > > I can raise a bug about this, but I'm posting here in the hope of > getting a clue re what is going on to cause this and maybe fix it. > > Given this ledger fil

Balance-like report by commodity, showing values at current price?

2018-12-09 Thread John Lee
I have a ledger with investments like this: 2018-12-09 * Investment Assets:Investments:Funds1 GOOG @ $1000 Assets:Investments:Funds1 BLAH @ $200 Assets:Investments:Cash I'm trying to see current values for all commodities in terms of their monetary value at th

Re: Odd interaction of metadata values ending in "d" with bal -X --date-format

2018-12-09 Thread John Lee
On Sun, 9 Dec 2018, at 15:31, Martin Michlmayr wrote: > * John Lee [2018-12-09 15:13]: > > ./ledger -f > > /home/me/mount/b/me/gtd/reference/issues/2018/12/ledger-value-by-commodity/my.ledger > > b -XGOOG --date-format '%Y-%m-%d' --flat 'Assets:Investme

Re: Balance-like report by commodity, showing values at current price?

2018-12-09 Thread John Lee
Er, where I have pounds sterling '£' below please read that as '$' On Sun, 9 Dec 2018, at 15:34, John Lee wrote: > I have a ledger with investments like this: > > 2018-12-09 * Investment > Assets:Investments:Funds1 GOOG @ $1000 > Assets

Re: Balance-like report by commodity, showing values at current price?

2018-12-09 Thread John Lee
On Sun, 9 Dec 2018, at 15:51, Martin Michlmayr wrote: > * Martin Michlmayr [2018-12-09 17:48]: > > The first is based on an idea from Craig Earls from a few years ago > > and uses automated transactions: > > > > = expr (commodity == 'GOOG') > > (Equities:GOOG) 1.000 > >

Automatic transactions and elided amounts

2021-10-15 Thread John Lee
I seem to be having trouble with automatic transactions involving elided amounts. Possibly the problem is my understanding how this is supposed to work of course. I see in the manual that "One thing you cannot do ... is elide amounts in an automated transaction" -- but the Huququ'llah example

Re: Automatic transactions and elided amounts

2021-10-15 Thread John Lee
On Fri, 15 Oct 2021, at 23:57, John Lee wrote: > 2015-01-01 * Buy VIFSX > Assets:Broker100 VIFSX > Assets:Cash$-1000 > > 2015-01-02 * Adjustment > Assets:Broker