Rightly so… the reg query does not list postings when the recurring transaction starts from a future date. My guess is cos ledger does not see any transactions posted from the date it's being invoked. I phrase it this way because I tried using the *--begin DATE* option, but still no report.
To solve this though, use the balance query. The balance query will always give you the balance of your savings account at any point in time when ledger is parsing the transactions against. Unlike the register report, the balance report respects *--begin* and *--end* options. https://asciinema.org/a/343330 is the best way I've seen this done; and I've adopted it for my own forecasts as well On Friday 22 March 2024 at 22:46:46 UTC Bob Wilson wrote: > Also, "balance" gives a different answer than "register" in that example. > > > On Mar 22, 2024, at 3:29 PM, Bob Wilson <mills...@gmail.com> wrote: > > > > > I'm having the same issue. > > Example file: > ~ Monthly from 2024/02/15 > Expenses:Rent $500.00 > Assets > > Command: > $ ledger -f test.dat --forecast "d<[2025]" register Expenses:Rent > 24-Apr-01 Forecast transaction Expenses:Rent > $500.00 $500.00 > 24-May-01 Forecast transaction Expenses:Rent > $500.00 $1000.00 > 24-Jun-01 Forecast transaction Expenses:Rent > $500.00 $1500.00 > 24-Jul-01 Forecast transaction Expenses:Rent > $500.00 $2000.00 > 24-Aug-01 Forecast transaction Expenses:Rent > $500.00 $2500.00 > 24-Sep-01 Forecast transaction Expenses:Rent > $500.00 $3000.00 > 24-Oct-01 Forecast transaction Expenses:Rent > $500.00 $3500.00 > 24-Nov-01 Forecast transaction Expenses:Rent > $500.00 $4000.00 > 24-Dec-01 Forecast transaction Expenses:Rent > $500.00 $4500.00 > > Update example file: > ~ Monthly from 2024/04/15 > Expenses:Rent $500.00 > Assets > > Same command gives empty output. > > The other thing I'm noticing is the periodic expressions don't respect > exact dates. If my rent is due on the 15th, and my period expression > denotes that, I'd expect the forecasted transactions to be on the 15th. > > ledger --version: > Ledger 3.3.2-20230330, the command-line accounting tool > without support for gpg encrypted journals and without Python support > > Copyright (c) 2003-2023, John Wiegley. All rights reserved. > > This program is made available under the terms of the BSD Public License. > See LICENSE file included with the distribution for details and disclaimer. > > On Sunday, September 13, 2020 at 7:01:12 PM UTC-7 Alan Bram wrote: > >> Here's a demo of what I mean. Reading from "sample.dat" produces no >> output; compare to "another.dat." (Data files attached.) >> >> % ledger --version >> Ledger 3.2.1-20200518, the command-line accounting tool >> >> Copyright (c) 2003-2019, John Wiegley. All rights reserved. >> >> This program is made available under the terms of the BSD Public License. >> See LICENSE file included with the distribution for details and >> disclaimer. >> % ledger -f sample.dat --forecast "d<[2022]" reg cash >> % ledger -f another.dat --forecast "d<[2022]" reg cash >> 2020/10/01 Forecast transaction Assets:Cash >> $-500.00 $-500.00 >> 2020/11/01 Forecast transaction Assets:Cash >> $-500.00 $-1000.00 >> 2020/12/01 Forecast transaction Assets:Cash >> $-500.00 $-1500.00 >> 2021/01/01 Forecast transaction Assets:Cash >> $-500.00 $-2000.00 >> 2021/02/01 Forecast transaction Assets:Cash >> $-500.00 $-2500.00 >> 2021/03/01 Forecast transaction Assets:Cash >> $-500.00 $-3000.00 >> 2021/04/01 Forecast transaction Assets:Cash >> $-500.00 $-3500.00 >> % >> >> On Sun, Sep 13, 2020 at 5:53 PM John Wiegley <jwie...@gmail.com> wrote: >> >>> >>>>> "A" == Alan <sf.f...@gmail.com> writes: >>> >>> A> Is it correct to glean from this that it doesn't work to give a >>> "from" date >>> A> in a periodic transaction? I was trying to do so, but I was not able >>> to >>> A> make it work. >>> >>> I would definitely expect periodic transactions to accept date ranges. >>> >>> https://www.ledger-cli.org/3.0/doc/ledger3.html#Period-Expressions >>> >>> John >>> >> -- > > --- > 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 to ledger-cli+...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/ledger-cli/28cce2ba-9e3d-48ae-9096-8c8e6e6f67e2n%40googlegroups.com > > <https://groups.google.com/d/msgid/ledger-cli/28cce2ba-9e3d-48ae-9096-8c8e6e6f67e2n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > -- --- 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 to ledger-cli+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/59233252-6da6-4f7b-93f1-acfb65f5e12dn%40googlegroups.com.