-
Notifications
You must be signed in to change notification settings - Fork 26
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
Support for commodities / units / currencies #124
Comments
I stumbled to Unit library written in scala Squants. It seems to be doing lot of stuff which would be handy with units / currencies. In any case, it would be good to be able support at least following use cases:
|
Agreed @jaa127 My design notes:
Optional
|
How about if there is formal account definition at the begin of parsing process (e.g. begin of ledger file or provided by config-file). This would allow to assing all kind of metadata to accounts (e.g. #108, #60), and define default unit / commodity per account. It would also be handy, if you could mix commodities inside account. For example you could have cash in multiple currencies, and to have multiple cash accounts to be able handle multiple currencies is kind of inconvenient. It should also be desided how mixed commodities (tree) balances are handled in case of different commodities. |
Agreed; though I think we can build this later, once the core support for currencies is in place.
I think all this is handled by my idea of using special account names. Basically, we already have a tree structure, and currencies can be just represented as children. It seems simpler from both user's and developer's point of view. It avoids the need to create a separate structure inside every account. I am not sure why you think it would be inconvenient. If you can give an example in a |
The main reason is that there is need to maintain multiple separate accounts just for commodities. Real example: There is car trip from Finland to Norway via Sweden. Finland is Euro (EUR), Sweden is Krona (SEK) and Norway is Krone (NOK). In each country I byu fuel and some other car related stuff. If this is done without commodities as leaf accounts, then it could be something like this:
If commodities are leaf accounts, then this gets really messy. Especially if I didn't know that I will visit Norway and Sweden by car, when Chart of Accounts was established.... |
Chart of Accounts is a good point. Out of curiosity, how do you define it in abandon currently? Or is it a concern for the future? Perhaps we can make currency accounts exempt from Chart of Account? Hmm, from your example, I have another doubt:
What if
With the currency-as-leaf-account design the answer is |
Answering my own doubt: If
(balance adjustment would be done from EUR currency). This will work with any design (leaf-currency-account or otherwise). |
No description provided.
The text was updated successfully, but these errors were encountered: