-
-
Notifications
You must be signed in to change notification settings - Fork 316
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
hledger add does not record currency in transactions, even if a default is set #815
Comments
@bertiebaggio, thanks for your hledger bug report back in 2018. I miscategorised it as a wish, but as you said, the docs have been saying all along that this works. Now fixed in master. (And perhaps after next release we'll hear from |
Thanks for following up on this- I haven't interacted with the project on GH or IRC/matrix in a while, but it is good to see development continues, your work is much appreciated :) |
I suspect one use case was people who use a D directive, and don't want currency symbols appearing in their journal. Perhaps it will need to be an |
In fact now that I think about it, wouldn't this be the normal situation ? If you're using D you probably aren't writing symbols in the journal, so why would you expect |
That is a fair point, let me share my view too: the ledger format is excellent because it human-readable, and (to me) that means entries should be denoted with whatever currency symbol[s] the transaction was conducted in. Someone should be able to glance at/grep/extract an entry and have enough information to understand it on its own merits. There is, I think, a minor cognitive load benefit to looking at numbers and knowing, "these numbers are to do with money".† That's my view, I can see someone else thinking "I know all my transactions are denoted in EUR, I don't need the symbol for each one". Presumably real-world physical ledgers elided currency symbols? Not that in itself is a reason to! I don't mind which way you adjudicate this, I leave the decision in your capable hands :) †: Maybe when I was a kid I heard the response "20 what? 20 bananas??" one time too many from physics teachers stressing the importance of units... |
It makes sense to me, so I think I'll revert this and fix the doc instead, with an explanation. |
Just saw your reply @bertiebaggio. I think:
There's a third case where user wants currency symbols everywhere in the journal, but wants to save the effort of typing it repeatedly when using |
I'm not a regular |
…imonmichael#815] Avoid breaking GHC < 9.8.
…per docs, 2 [simonmichael#815]" This reverts commit 87600e5, which had a wrong description.
Currently, the docs for
add
say:However, as of 1.9 this does not seem to be the case:
Thinking aloud, which way
hledger add
works (commodity vs none) is probably an orthogonal issue; though it would be nice to have a way to set if a default currency is recorded inadd
-ed transactions.I could also see an argument for pulling the currency (if set) from the previous transaction / matched transaction; similar to how
hledger add
currently does for account 'default'/autocompletion.For comparison, I have been using vim-ledger, which has been including the currencies in transactions- I would need to check to see if this has been due to a
commodity
directive (Edit: nope, seems I manually setlet g:ledger_default_commodity = '£'
in my.vimrc
).The text was updated successfully, but these errors were encountered: