Re: Outputting note associated with accounts

2018-01-24 Thread Michael Budde
On Thu, 25 Jan 2018 at 08:17 John Wiegley wrote: > Should be about a half-hour's work to code, test, and add a test to the > test > suite. No documentation needed. > I would like to give this a go :-) I might even have time to look at it tonight. -- --- You received this message because you

Re: Outputting note associated with accounts

2018-01-24 Thread John Wiegley
> Colin Dean writes: > What would it take for accounts to have an option that did this? Sure, I just meant it could do this, but alas it does not. report_accounts::flush(), in output.cc, would need to declare a bound_scope with the current report and the account object. Then, if report.HAN

Re: What's the difference between account(...).total and account(...).amount?

2018-01-24 Thread John Wiegley
> "c" == cpitclaudel writes: c> If not, can someone explain the difference between ".amount" and ".total"? If you have: Expenses $100 Expenses:Food $50 It was intended that Expenses.amount would be $100, and Expenses.total would be $150. John -- --- You received this me

Re: Outputting note associated with accounts

2018-01-24 Thread Colin Dean
> "CD" == Colin Dean writes: CD> Is there a quick way to make the accounts command also output the note for CD> each account if I’ve defined the accounts using the account directive? I don't believe that's currently possible with the 'accounts' report just now. No reason why --prepend-format

Re: Outputting note associated with accounts

2018-01-24 Thread John Wiegley
> "CD" == Colin Dean writes: CD> Is there a quick way to make the accounts command also output the note for CD> each account if I’ve defined the accounts using the account directive? I don't believe that's currently possible with the 'accounts' report just now. No reason why --prepend-format

Re: Forcing output of timekeeping in one unit with --amount-data or --total-data

2018-01-24 Thread Colin Dean
That's close enough! I can do the math to make it hours with awk: ledger -f "$(t timelog)" reg --daily --no-total --base -j | awk '{print $1 " " $2/3600}' Thanks! Now, to figure out how to make gnuplot's output not look so… spartan. Colin Dean http://cad.cx On Wed, Jan 24, 2018 at 7:16 PM, Clém

Re: Forcing output of timekeeping in one unit with --amount-data or --total-data

2018-01-24 Thread James A. Robinson
Thank you! I think --base would certainly work for the OP, who wanted something consistent to graph. Looking again at the manual page I had failed to see that there is --time-colon - Display the value for commodities based on seconds as hours and minutes. Thus 8100s will be displayed as 2:15h i

Re: Forcing output of timekeeping in one unit with --amount-data or --total-data

2018-01-24 Thread Clément Pit-Claudel
On 2018-01-24 18:37, Jim Robinson wrote: > I'm very interested in the answer to this, I was just poking around in the > documentation trying to see if this was addressed an unable to spot it on my > first pass. > > I was looking to see if I could either always produce minutes, or produce > " h

Re: Forcing output of timekeeping in one unit with --amount-data or --total-data

2018-01-24 Thread Jim Robinson
I'm very interested in the answer to this, I was just poking around in the documentation trying to see if this was addressed an unable to spot it on my first pass. I was looking to see if I could either always produce minutes, or produce " h m" instead of fractional hours. -- --- You recei

How does roundto work? (and what's the difference between $0 and -$0.00?)

2018-01-24 Thread Clément Pit-Claudel
Hi all, I'm having trouble using the roundto function. In particular, I don't understand the following results: $ ledger eval '(roundto($0.31 / 2, 2))' $0.16 $ ledger eval '(roundto($0.31 / 2, 2) == $0.16) ? "equal" : "not equal"' not equal $ ledger eval '(roundto($0.31 /

What's the difference between account(...).total and account(...).amount?

2018-01-24 Thread cpitclaudel
Hi all, I'm trying to write assertions about account totals, but I ran into an issue demonstrated in the following ledger file: 2017-01-01 * Test Expenses $3 Income eval print("Income total: " + account("Income

Forcing output of timekeeping in one unit with --amount-data or --total-data

2018-01-24 Thread Colin Dean
I'm attempting to output timekeeping data with the intention of graphing it. $ ledger -f "$(t timelog)" reg -p 'this week' --daily 18-Jan-22 - 18-Jan-22 (N:Development) 8.19h8.19h (N:Email) 15.0m8.44h