Extra currency symbol added when entering transactions #138

Closed
markokocic opened this Issue Sep 20, 2013 · 3 comments

Projects

None yet

2 participants

@markokocic
Collaborator

When entering new transaction using hledger add command interactively, the extra symbol is added to each transaction, although I didn't explicitly type it.. The problem is that it is not really needed, since I already have specified as a default commodity in my hledger file.

Note that adding amount without a commodity in hledger-web doesn't add it automatically.

@simonmichael
Owner

Hm, do you mean you're ending up with a double € ? Could you paste a quick example/transcript ?

@markokocic
Collaborator

No, I don't end up with double €. I end up with one €, which is still one more than needed, since € is my default currency for the file.

hledger-web doesn't add currency symbol if I don't explicitly type it, which is IMHO correct behaviour.

@simonmichael
Owner

Ah, I see. I guess that makes sense.

I think the fix will be somewhere in https://github.com/simonmichael/hledger/blob/master/hledger/Hledger/Cli/Add.hs#L190 - 225.

The corresponding hledger-web code is around https://github.com/simonmichael/hledger/blob/master/hledger-web/Handler/Post.hs#L31 .

Let me know (or send a pull request) if you can see what's needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment