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

Currency when importing ledger file #179

Open
porjo opened this issue Jan 7, 2022 · 5 comments
Open

Currency when importing ledger file #179

porjo opened this issue Jan 7, 2022 · 5 comments

Comments

@porjo
Copy link

porjo commented Jan 7, 2022

Interesting project, thanks! I have a question and a comment

How to set the currency for data being imported from ledger file? e.g. ./ledger-cli file <filename>

Also, it'd be nice to have an option for reporter to output values in dollars with commas. e.g

$ ./reporter trialbalance

     ACCOUNT   | BALANCE AT 08 JANUARY 2022  |   FORMATTED
---------------+-----------------------------+-------------------------
  acct1        |          1983458.00         |     19,834.58
  acct2        |          -759830.00         |   -  7,598.30
@darcys22
Copy link
Owner

darcys22 commented Jan 9, 2022

Hi Ian!
Thanks for the kind words, appreciate the feedback.

I've merged both #180 and #181 into the dev branch which should allow us to do both of those things. The currency for the ledgercli files defaulted to USD only and to be honest i wasn't sure anyone was using it.

But now you should be able to change the currency with the following:

./ledger-cli file --currency AUD <filename>

In addition the reporter now defaults to a formatted output with dollar signs and commas. Then provides a flag line argument for an unformatted output with the following:

./reporter trialbalance --unformatted

@darcys22
Copy link
Owner

darcys22 commented Jan 9, 2022

Although now im looking at it the ledger-cli importer is definitely importing dollars as cents. So that needs addressing too

@darcys22
Copy link
Owner

darcys22 commented Jan 9, 2022

And done in #182

@porjo
Copy link
Author

porjo commented Jan 10, 2022

Thanks!

Something still isn't quite right. My input ledger file has values in dollars. When I import that using the latest changes, the trialbalance shows output 100x what it should be (cents instead of dollars?).

Something else I noticed is that I can run ./ledger-cli and it completes without error even if godbledger process isn't running. I think it should fail if it can't make the GRPC connection.

@darcys22
Copy link
Owner

Yeah ill need to look i to that some more #182 was ment to resolve that and was working on my local machine.

and yeah it should fail if there is no grpc connection. Might be something to do with the parsing of the ledgercli files.

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

No branches or pull requests

2 participants