Archiving Previous Years
I am following section 4.9 Archiving Previous Years from documentation. My start file is t14.j: $ ledger --args-only --date-format %Y-%m-%d -f t14.j stats Time period: 1999-01-01 to 2023-10-26 (9064 days) Files these postings came from: /.../t14.j Unique payees:3095 Unique accounts: 381 Number of postings: 40602 (4.5 per day) Uncleared postings: 21710 Days since last post:2 Posts in last 7 days: 12 Posts in last 30 days: 84 Posts seen this month: 72 I am doing first step, hoping to select all entries 2022 and before: $ ledger --args-only --date-format %Y-%m-%d -f t14.j print -e 2023-01-01 print > fi rst $ ledger --args-only --date-format %Y-%m-%d -f first stats Time period: 2004-12-30 to 2007-09-28 (1002 days) Files these postings came from: /mnt/e/Data/Invest/data/ldg-t14/first Unique payees: 45 Unique accounts: 6 Number of postings:220 (0.22 per day) Uncleared postings:111 Days since last post: 5874 Posts in last 7 days:0 Posts in last 30 days: 0 Posts seen this month: 0 Second step, which supposed to be 2022 and 2023 returns nothing $ ledger --args-only --date-format %Y-%m-%d -f t14.j print -b 2023 print > last $ wc -c last 0 last So: - the original jurnal: -Time period: 1999-01-01 to 2023-10-26 (9064 days) - the file which supposed to be 1999-01-01 to end of 2022: -Time period: 2004-12-30 to 2007-09-28 (1002 days) - and the one after 2022 is empty Any idea why is this happening? -- --- 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/28206425-d724-4ff3-9919-37af17bff64en%40googlegroups.com.
Re: Archiving Previous Years
Hello, resurrecting this thread because I think I'm facing a similar issue and found this thread when searching. I use commodities to track inventory of building supplies. So far it's worked ok, though I've had several hiccups to overcome. The latest is in closing the books for the previous year. I want to retain the inventory across the transition. My problem is that out of the equity command comes a posting for each commodity I have. Previously, I had managed to suppress this except when desired, but in the new year I have all hundred-plus commodities as postings in the Opening Balance transaction. I must admit I've gotten my system to work more through trial and error than through a deep understanding of commodities in Ledger. What worked for me up till now was: * using x COMMODITY @ UNIT-PRICE. * always appending `--market` to my ledger command, except when I specifically want to see my materials inventory * always explicitly including the Euro equivalent in the opposite posting. For example, when I 'use' 100 screws, if I don't put the Euro equivalent in the target account posting, I get screws back as a unit from then on. I tried the `--lots` option as mentioned above. However, this doesn't seem to have any effect. I'm at a bit of a loss here. It might help to compare an example transaction as it brought in some of these commodities originally: ``` 2021-06-01 * Purchase supplies Assets:Bank-€ 550 Assets:Inventory5000 "screws4x40_pc" @ €0,01 Assets:Inventory100 "DougFir2x4_m1" @€5,00 ``` But `equity` at the end of the year produces: ``` 2021-12-31 * Opening Balances Assets:Inventory 5000 "Screws4x40_pc" Assets:Inventory 100 "DougFir2x4_m1" Equity:Opening Balances5000 "Screws4x40_pc" Equity:Opening Balances100 "DougFir2x4_m1" ``` Using `--lots` adds the `{€0,01}` syntax. I don't understand whether the different syntax (@ vs {}) is causing this, or something else. I'm currently in the process of trying to remove all those commodities from Opening Balances and replace them with a single posting in Euros, but I'm afraid I can't post my results yet here because I'm being blocked by parsing errors which I don't understand yet. Also, this approach seems like too much work to do every year even if it will work in the end. So I'm wondering if there's some way to tease out an Opening Balance statement that will let me keep seeing Euros in reports in the new year? Or, if someone can explain where I'm misunderstanding the use of commodities that's causing my troubles? Thanks, Hans On Sunday, 10 May 2020 at 08:49:45 UTC+2 jwie...@gmail.com wrote: > > "J" == Joel writes: > > J> Is there a way to do this that carries cost basis forward for > transactions > J> with commodities or currencies where one wants to track the cost basis? > Or > J> must I manually run a report with the lot information and then add that > to > J> the opening balances statement? > > Try using the `--lots` option when generating the equity report. Cost > basis is > tracked as the lot price. It is likely to also generate a lot more > transactions, one for each distinct lot. > > 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/f3792c74-24a5-481a-95b7-a6170d725922n%40googlegroups.com.
Re: Archiving Previous Years
> "J" == Joel writes: J> Is there a way to do this that carries cost basis forward for transactions J> with commodities or currencies where one wants to track the cost basis? Or J> must I manually run a report with the lot information and then add that to J> the opening balances statement? Try using the `--lots` option when generating the equity report. Cost basis is tracked as the lot price. It is likely to also generate a lot more transactions, one for each distinct lot. 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ledger-cli/m2k11ki8ss.fsf%40newartisans.com.
Archiving Previous Years
Hello, In section 4.9 of the Ledger docs it explains how to archive previous years, conveniently generating an opening balances transaction for the new year. Is there a way to do this that carries cost basis forward for transactions with commodities or currencies where one wants to track the cost basis? Or must I manually run a report with the lot information and then add that to the opening balances statement? Thanks, Joel -- --- 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/fca33dc2-9949-4870-9649-4de2150f88e0%40googlegroups.com.
Re: archiving previous years and command directives
On Monday, April 20, 2015 at 6:51:00 AM UTC+2, Gour wrote: Well, I think that print will not help you, and you may have to copy/paste manually those directives. I assume those directives are not required for archived years? If file A contains the directives, and file B does include file A, then using ledger on file B (the header file) will work. -- --- 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. For more options, visit https://groups.google.com/d/optout.
Re: archiving previous years and command directives
On Saturday, April 18, 2015 at 9:48:21 PM UTC+2, thierry wrote: Well, I think that print will not help you, and you may have to copy/paste manually those directives. I assume those directives are not required for archived years? Unless you have a header ledger file, where the directives are, and you include the yearly files. That's also interesting option. Thank you. Sincerely, Gour p.s. For some strange reason, Google is not sending me your replies to my Inbox, so I have to reply from this sucking web UI. :-( -- --- 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. For more options, visit https://groups.google.com/d/optout.