New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Posting dates not displayed separately in hledger-web #1337
Comments
Thanks for the report. It's by design that the register in hledger-web (and hledger-ui) shows one line per transaction, to provide a simple UI that's more like other accounting apps, bank statements, etc. In the general journal view, it shows the transaction date of course. In the account register view, it's supposed to show the date of posting to the account being viewed, for best accuracy. In this case in the Expenses:Food:Groceries register we have multiple posting dates, so what should it show ? Currently it picks the earliest posting date, as you say. (And when you hover over the transaction you can see all dates in the tooltip.) That's not ideal, but seemed to me about equally useful in practice, and marginally more consistent (than switching to showing the transaction date). What do you think ? |
The alternative is to implement and document: "Account registers show the date of posting to that account. Except, when a single transaction contains multiple such postings with different dates, the transaction date is shown." |
Thanks for your quick reply! I see that I've been mixing postings and transactions in my head a bit. Indeed I don't want to see individual postings in hledger-web, that would be confusing. If there's only one posting date I think the current behavior is good. When there are multiple posting dates though, I'd want to see one entry per date of posting to the account being viewed. But then I guess those entries would be neither individual postings nor individual transactions. Is there a way to make that work? The idea I have is that in the account view, if a transaction has multiple postings to that account then they are displayed grouped by date. In the typical case, all postings have the same date so they are displayed as a single entry like they always have. Given
when listing Expenses:Food:Groceries, I expect to see
when listing Assets:Checking, I expect to see (that's the current behaviour)
when listing Assets, I expect to see (that's the current behaviour)
|
Thanks for the mockups. I think the conventional UI in other accounting apps is that registers are transaction-oriented, but you can optionally show/hide the postings ("splits"), either for an individual transaction or for all. |
I see. Do you know of accounting apps that support individual posting dates? I'd be curious to see how they solve this issue. |
Not from memory, sorry.. |
Would you in principle be ok with an option like |
I'm not fully clear on what it would do, I'd be happy to try out your prototype if you make it. |
Cool thanks! Allow me to clarify what I mean: assume we are viewing
Currently, the code first filters the transaction and keeps only the relevant postings:
then it takes the earliest date from the relevant postings:
and finally displays the whole as a single entry:
What I propose, is that when the
now we do something different: we split the transaction into many subtransactions, one for each date present (most of the time this doesn't change anything because individual posting dates are uncommon)
and finally we display one entry for each of those subtransactions:
I investigated a bit, and it doesn't look very hard to implement. I think it would be enough to change this function:
so that between ts4 and ts5 it takes splits the transactions like I described. That should be sound because AccountTransactionsReportItem already supports transactions that carry only a relevant subset of their postings.The main uncertainty I have is how to add a new option and thread it to where I want to use it. Btw, thanks for developing this insanely powerful tool! |
If I make a transaction with individual posting dates, like in this example from the ledger docs:
and if I look in hledger-web for the transactions in
Expenses:Food:Groceries
, hledger-web will show a single entry for the whole transaction, dated 2008/10/01 (which is the smallest of the individual posting dates).I would have expected 6 different entries at the dates specified, like I see in the output of
hledger register Expenses:Food:Groceries
.The reason I think this is a bug and not a feature request is that posting dates are clearly taken into account (otherwise the transaction date would have been used), but weirdly.
Platform: NixOS
Version: 1.18.1
The text was updated successfully, but these errors were encountered: