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

Doesn't parse @@ #6

Open
tbm opened this issue Mar 16, 2018 · 2 comments
Open

Doesn't parse @@ #6

tbm opened this issue Mar 16, 2018 · 2 comments

Comments

@tbm
Copy link
Contributor

tbm commented Mar 16, 2018

ledger allows you to specify the total with @@ (rather than the unit price with @). The script
doesn't like this:

2018-01-01 * Opening balance: property
    ; :opening-balance:
    Assets:Property          2 FOO {{ 20.00 EUR}} @@ 20.00 EUR
    Equity:Opening balance
  File "/home/tbm/.local/lib/python3.5/site-packages/ledger_to_beancount/__init__.py", line 160, in translate_file
    (amount, price) = rest.split('@')
@glasserc
Copy link
Owner

I'm not really sure how to handle this. For sales, of course, it's easy to use total price instead of individual price. However, for purchases, I'd want to turn this into a cost basis, and doing so means doing math, which means a semantic, rather than syntactic, change. I've tried to avoid doing anything like that so far in the project.

@tbm
Copy link
Contributor Author

tbm commented May 12, 2018

Right, in ledger2beancount I ended up with an interpretation (aided by a config file that users can edit).

But if you don't want to go the semantic route, you should just transform it into a total price in beancount all the time.

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