hledger icon indicating copy to clipboard operation
hledger copied to clipboard

Budget fails with comments

Open holmescharles opened this issue 3 years ago • 1 comments

Hledger seems to fail when recurring transactions have comments.

Here is an example. I have a file example.ledger:


~ monthly from 2022-01                                                               
    a                                   10 USD                                       
    b                                                                                
                                                                                     
~ monthly from 2022-01                                                               
    ; foo bar                                                                        
    a                                   10 USD 
    b

The command ledger -f example.ledger bal --budget will fail and print the following message:

Budget performance in -:

hledger: "" (lines 1-1)
could not balance this transaction - can't have more than one real posting with no amount (remember to put 2 or more spaces before amounts)
2022/01/01 Budget transaction
    ; recur: monthly from 2022-01
    ; foo bar
    a                  10 USD
    b

holmescharles avatar Jun 26 '22 00:06 holmescharles

Hi.. not for me:

$ cat b.j
~ monthly from 2022-01                                                               
    a                                   10 USD                                       
    b                                                                                
                                                                                     
~ monthly from 2022-01                                                               
    ; foo bar                                                                        
    a                                   10 USD 
    b
$ hledger-1.26 -f b.j bal --budget
Budget performance in ..:


==++==
--++--

What's your hledger --version ?

simonmichael avatar Jun 26 '22 19:06 simonmichael

Presumed resolved, please reopen if it can be reproduced.

simonmichael avatar Apr 29 '23 03:04 simonmichael

Oh sorry. I think it was a wrong version number. Thank you for closing.

holmescharles avatar May 11 '23 00:05 holmescharles