« BackHledger 1.50github.comSubmitted by olexsmir 2 days ago
  • seabass-labrax 2 days ago

    I used to use GnuCash, but a small yet constant irritation for me was how the entry's date (that is, the date when I authorized the transaction) wouldn't always match the clearing date of the transaction as reported by my bank in their statements.

    hledger, however, has support for adding 'posting dates' as specially formatted comments. What's really clever is how it automatically chooses which date to sort the reports by depending on the query!

    For example, say I have a ledger that exclusively contains entries consisting of credits to a assets account (bank) and debits to an expense account (shopping). The date of the debit is earlier, because I acquired the goods at the shop. The date of the credit is later because it takes a while for the payment to clear between the banks. Some payments take longer to clear than others so the order isn't the same.

    If I ask hledger for a report of all recent transactions that involve expenses, it will sort by the dates on the debit lines. But if I ask hledger for a report of all the recent transactions that involve assets it'll use the credit dates instead! This makes reconciliation with my bank statements so much easier and tidier whilst still keeping an accurate record of when I actually made the transactions.

    • lvass 2 days ago

      Is it like ledger's effective dates? https://ledger-cli.org/doc/ledger3.html#Effective-Dates

      • seabass-labrax a day ago

        Yes, it's very similar! However, hledger's posting dates are a little more flexible, as you can have anything from no additional dates to one date per individual posting (debit or credit) in the transaction. This might perhaps be useful if you have complex split transactions where a balance is settled by multiple payments.

        Just recently I bought an item on sale for 15 Euros with a card in Sterling (my bank did the currency conversion). Pretty much immediately after paying, though, I exchanged it for a different item for 25 Euros, making up the difference in cash. The cash is obviously 'cleared' instantly but the card payment could clear later. That said, in this case it happened to clear the same day anyway so no special posting date was required.

          2025-08-10 Redacted
          Expenses: Redacted  13.03 GBP
          Expenses: Redacted     10 EUR
          Assets: Bank       -13.03 GBP
          Assets: Cash          -10 EUR
        
        I suppose the main question is at what point these splits become complex enough to create a dedicated liabilities account specifically to track the payment of that one expense, à la accounts payable, which you can of course do with any plain text ledger.
        • simonmic a day ago

          They are different - though often tried for the same kinds of use case. Here's https://hledger.org/hledger.html#secondary-dates (hledger's name for effective dates) vs https://hledger.org/hledger.html#posting-dates. (Both features come from Ledger.)

      • faustlast 2 days ago

        I’ve been a long-time user of (h)ledger. I use a custom script to generate a cost basis when computing capital gains for selling transactions. Are there any recent updates or tools that improve cost-basis tracking or capital gains handling in hledger?

      • zipping1549 2 days ago

        I can see how this is _not_ for everybody. It is a lot of work, especially if you're just starting out and there are gazillion things you own(lucky you). But it's worth it. You are always informed and it has changed my perspective on personal finance completely.

        • abhiyerra 2 days ago

          I’ve written a bunch of Python scripts to do my books using hledger. The nice thing is I no longer pay the $75/month for Quickbooks.

          Sure it means I can’t hire a bookkeeper to do my books anymore but it literally takes me like 15 mins to do my books since I can just add rules to my scripts as needed and most of my business now has a standard AR and AP.

          • lvass 2 days ago

            Release notes would make a better submission. https://hledger.org/relnotes.html#hledger-150

            • laurent_du 2 days ago

              I use 0.1% of hledger and that's enough for me. Thank you to the author for providing this powerful tool for free.

              • spiffytech 2 days ago

                To offer another option for a graphical FOSS budgeting app, I switched to https://actualbudget.org a few months back and it's great.

                It's like YNAB, but with less magic. Plus sophisticated features like a rules engine for automatically filling envelopes and cleaning up spare funds at the end of the month.

                I host it on Pikapods for cheap, and connect to my bank accounts with SimpleFINs.

                I've tried a lot of budget apps, and this is the happiest I've been with one in a long time.

                • brisketbbq 2 days ago

                  hledger is not just a budgeting app, but an accounting app to track your finances, debits/credits, investments, etc.

              • euroderf 2 days ago

                Shouldn't it be possible to encapsulate something like this with SQLite and produce an accounting engine that can guarantee consistent numbers and generate key numbers (trial balance, P&L, gearing, ...) ?

                • bevr1337 2 days ago

                  > Shouldn't it be possible to encapsulate something like this with SQLite and produce an accounting engine

                  Indeed! https://www.gnucash.org/

                  > that can guarantee consistent numbers

                  It was consistent, and now it's transparent and user-friendly.

                  > and generate key numbers

                  Yes, hledger generates useful reports including trial balance, p&l

                  • lvass 2 days ago

                    FWIW, GnuCash supports multiple backends, sqlite, a couple of popular sql servers, and I believe the default backend is XML.

                  • warmwaffles 2 days ago

                    It is yes, but this is for Plain Text Accounting which allows you to put your books in version control which is an interesting way to keep track of changes over time.

                    • yencabulator 14 hours ago

                      Also great for "eyeball auditing". When Gnucash did something, I was never sure what actually happened. And sometimes it would crash. Was all my data safe? Hard to tell.

                      With ledger/hledger, I've never felt unsure about the change I'm making, and if something wipes out records I'll notice it before committing.

                • undefined 2 days ago
                  [deleted]
                  • michaelsbradley 2 days ago

                    Book (digital and/or print, free and/or paid) recommendations to learn proper and effective use of this kind of accounting to manage personal/family and self-employment finances.

                    Best resource would assume competency in undergraduate-level math, but assume no financial competency beyond "you have a checking account, maybe a credit card, and are familiar with receiving income and making payments, and you understand the importance of keeping your bank balance above zero".

                    • simonmic 2 days ago

                      You said book, but I wouldn't rule out the docs on hledger.org (and perhaps plaintextaccounting.org); of which https://hledger.org/hledger-by-example.html is book-ish, and https://hledger.org/accounting.html leads to some good general accounting resources.

                      Also, again not what you asked for exactly, but the hledger chat room can be a very useful extra resource, to keep things moving along.

                      And here's one I found useful, though with more of a business flavour: "Accounting Savvy for Business Owners: A Guide to the Bare Essentials" by Philip B. Goodman CPA.

                      • michaelsbradley a day ago

                        Thank you!

                      • ElevenLathe 2 days ago

                        This is a website for posting with other people, but this post sounds like an LLM prompt.

                        • MarkusQ 2 days ago

                          Weird. You're right, but I can totally see the OP's POV as well.

                          This reminds me of the way clickbait/spammy style (or, before that Headline-ese and News-speak) invaded interpersonal communication. LOL. Evolution of language WTF, AIR?

                          • laurent_du 2 days ago

                            I think the person you are answering to was asking for a book recommendation.

                            • michaelsbradley 2 days ago

                              Yes, I was asking for a book recommendation. I forgot to add a question mark, or should have phrased it as "I'm looking for...".

                              My comment was generated with my brain and entered through my keyboard. I've been submitting and commenting on HN with this account since 2012.

                              • lvass 2 days ago

                                LLM prompts tend to be generated like that, though.

                                Here, your question prompted on chatgpt. You're welcome. https://chatgpt.com/share/68b9abc5-ae94-8007-b90e-cf210c3182...

                                • michaelsbradley 2 days ago

                                  It’s just asking a well-formed question, which has been a thing for a while in human history. Lol!

                                  Seriously, the Hledger software looks great, more appealing to me than GNU Cash for various reasons and something I’d be more likely to recommend to others. And I’d like to have a book recommendation/s to go along with it. Learning personal finance through the school of hard knocks can be painful, and even if you learned it that way it may be difficult to communicate what you’ve learned effectively. I imagine someone somewhere sometime has written a nice book that would pair well with Hledger.

                                  Thanks for the link. I have AI accounts and sling prompts all day long some days. In this case I’m looking for recommendations from fellow humans who participate on HN.

                                  • lvass 2 days ago

                                    >I have AI accounts and sling prompts all day long some days

                                    This wasn't hard to guess. Beware of your interactions with LLMs creeping in when talking to humans. Best of luck! And I suggest you take heed of Simon's advice.

                                    • michaelsbradley 2 days ago

                                      Thank you, that’s very special advice, and I will treasure it always.

                                      • undefined 2 days ago
                                        [deleted]
                          • unit149 2 days ago

                            [dead]