Skip to content
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 three letter currency codes and commodities #24

Open
tomvojtisek opened this issue Jan 3, 2022 · 4 comments
Open

Support for three letter currency codes and commodities #24

tomvojtisek opened this issue Jan 3, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@tomvojtisek
Copy link

Original ledger.cli protocol supports any number of currencies and commodities.
The obsidian plugin returns a parsing error when a transaction is included where the amounts are not preceeded by one of the major currency symbols. Support for currency codes would be valuable for those of us operating in currencies without a symbol (Czech Crowns, CZK for example) and those who want to keep track of their stock and other commodities.

@tomvojtisek tomvojtisek added the enhancement New feature or request label Jan 3, 2022
@tgrosinger
Copy link
Owner

Can you please give me an example of how a transaction amount would be written in those currencies? An example of how that looks in Ledger would be very helpful too. Thank you.

@tomvojtisek
Copy link
Author

I believe the transaction in ledger would be written as such:

2022-01-03 Lunch in Czech Republic
    Assets:Wallet            -120.00 CZK
    Expenses:Food            120.00 CZK

example adapted from ledger.cli docs, original stands as:

apply fixed
A fixed block is used to set fixated prices (see Fixated prices and costs) for a series of transactions. It’s purely a typing saver, for use when entering many transactions with fixated prices.

Thus, the following:

apply fixed CAD $0.90
 2012-04-10 Lunch in Canada
    Assets:Wallet            -15.50 CAD
    Expenses:Food            15.50 CAD


2012-04-11 Second day Dinner in Canada
    Assets:Wallet            -25.75 CAD
    Expenses:Food            25.75 CAD
end apply fixed

is equivalent to this:

2012-04-10 Lunch in Canada
    Assets:Wallet            -15.50 CAD {=$0.90}
    Expenses:Food            15.50 CAD  {=$0.90}

2012-04-11 Second day Dinner in Canada
    Assets:Wallet            -25.75 CAD  {=$0.90}
    Expenses:Food            25.75 CAD   {=$0.90}

I don't have my own experience with using ledger, in fact I am new to this world of command line tools and scripting, so apologies if my request does not make sense.

@abhuva
Copy link

abhuva commented Jan 24, 2022

It is also great to include this functionality from ledger.cli as it allows to account all kind of things (stock trading, working hours, inventory in an online game)
(There are several of those examples in the ledger.cli docs.

@Xyem
Copy link

Xyem commented Jun 20, 2023

Just had exactly this issue trying to use this to track a characters assets in D&D as I can't use custom commodities (e.g. silver, gold, items)

It is rather confusing to reference ledger-cli so directly when the implementation does not use it for processing and only supports a limited amount of its file format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants