ledger2beancount v2.1: ledger-to-beancount converter

2020-04-06 Thread Martin Michlmayr
I released version 2.1 of ledger2beancount, a ledger-to-beancount converter. You can get ledger2beancount from GitHub: https://github.com/zacchiro/ledger2beancount Here are the changes in 2.1: * Handle postings with posting dates and comments but no amount * Show transactions with only one posti

assert an account's amount

2020-04-06 Thread Randy Josleyn
Hi list! I'd like to use the `assert` directive to do a balance assertion of an account after `include`ing a journal file. I can't add the balance assertion to the included journal itself. I tried something like this: assert amount account(assets:checking) == 27585.33 CNY It just says that the

assert an account's amount

2020-04-06 Thread Randy Josleyn
Hi list! I'd like to use the `assert` directive to do a balance assertion of an account after `include`ing a journal file. I can't add the balance assertion to the included journal itself. I tried something like this: assert amount account(assets:checking) == 27585.33 CNY It just says that the

Re: assert an account's amount

2020-04-06 Thread Taylor R Campbell
> Date: Tue, 07 Apr 2020 12:47:37 +0800 > From: Randy Josleyn > > I realized I could just add a transaction that assigns the balance > of assets:checking, but that doesn't seem like the best way to do > it. This is exactly what I do. Why wouldn't it be the best way? 2020-04-01 Balance assertio

Re: assert an account's amount

2020-04-06 Thread Martin Michlmayr
* Randy Josleyn [2020-04-07 12:47]: > I'd like to use the `assert` directive to do a balance assertion of > an account after `include`ing a journal file. I can't add the > balance assertion to the included journal itself. I tried something > like this: > > assert amount account(assets:checking) =

Re: assert an account's amount

2020-04-06 Thread Randy Josleyn
Hi Taylor, I knew someone one say this as soon as I hit send :) It does seem a little simpler than what I was trying to do. My beef with that is that it's not *really* a transaction, so I don't want to write it as one. That's really a minor reason. What I did find is that if you have a default

Re: assert an account's amount

2020-04-06 Thread Randy Josleyn
Thanks, Martin. That works exactly as I wanted it to. Randy On April 7, 2020 12:59:13 PM GMT+08:00, Martin Michlmayr wrote: >* Randy Josleyn [2020-04-07 12:47]: >> I'd like to use the `assert` directive to do a balance assertion of >> an account after `include`ing a journal file. I can't add

Re: assert an account's amount

2020-04-06 Thread Michael Cooper
To deal with the default account problem, I make the transaction explicitly 0. To deal with it not being a real transaction, I make it a virtual one. Together it looks like this 2020-04-06 * Reconcile [Assets:Checking] $0 = $123.00 [Assets:Savings] $0 = $456.00 -Mythmon On Mon, Apr 6,

Re: assert an account's amount

2020-04-06 Thread psionl0
On Tuesday, April 7, 2020 at 12:48:41 PM UTC+8, Randy wrote: > > I'd like to use the `assert` directive to do a balance assertion of an > account after `include`ing a journal file. I can't add the balance > assertion to the included journal itself. I tried something like this: > ..