I love the new --dc option, but it fails when combined with -V :
Using the test file and using latest HEAD (ed71421c8a):
--8<---------------cut here---------------start------------->8---
2012/03/09 Test 1
Cash 0.5 hour @ 34 £
Income
2012/03/10 Test 2
Cash 1 hour @ 34 £
Income
--8<---------------cut here---------------end--------------->8---
ledger reg -V reports:
--8<---------------cut here---------------start------------->8---
09 March 2012 Test 1 Cash £17 £17
Income £-17 0
10 March 2012 Test 2 Cash £34 £34
Income £-34 0
--8<---------------cut here---------------end--------------->8---
ledger reg --dc reports :
--8<---------------cut here---------------start------------->8---
09 March 2012 Test 1 Cash 0.5 hour 0 0.5 hour
Income 0 £17 0.5 hour
£-17
10 March 2012 Test 2 Cash 1.0 hour 0 1.5 hour
£-17
Income 0 £34 1.5 hour
£-51
--8<---------------cut here---------------end--------------->8---
ledger reg -V --dc fails with:
--8<---------------cut here---------------start------------->8---
While evaluating value expression:
ansify_if(justify(scrub(abs(get_at(display_amount, 1))), int(amount_width),
(((((((4 + int(meta_width)) + int(date_width)) + int(payee_width)) +
int(account_width)) + int(amount_width)) + int(amount_width)) +
int(prepend_width)), true, color), (should_bold ? (bold : null)))
While taking abs of (null):
While calling function 'abs (null)':
While calling function 'scrub <#EXPR abs(get_at(display_amount, {1}))>':
While calling function 'justify (<#EXPR scrub(abs(get_at(display_amount,
{1})))>, <#EXPR int(amount_width)>, <#EXPR ((((((({4} + int(meta_width)) +
int(date_width)) + int(payee_width)) + int(account_width)) + int(amount_width))
+ int(amount_width)) + int(prepend_width))>, 1, 0)':
While calling function 'ansify_if (<#EXPR
justify(scrub(abs(get_at(display_amount, {1}))), int(amount_width), ((((((({4}
+ int(meta_width)) + int(date_width)) + int(payee_width)) + int(account_width))
+ int(amount_width)) + int(amount_width)) + int(prepend_width)), true, color)>,
(null))':
While handling posting from "/Users/christopher/Desktop/test.lgr", line 2:
> Cash 0.5 hour @ 34 £
Error: Cannot abs an uninitialized value
--8<---------------cut here---------------end--------------->8---
Incidentally, ledger reg -B --dc reports identically to
ledger reg --dc. Bug, or am I misunderstanding what the report should be?
Best, Christopher