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

Lot price must be a simple amount to be compatible with Ledger #143

Open
xkikeg opened this issue Jun 24, 2024 · 0 comments
Open

Lot price must be a simple amount to be compatible with Ledger #143

xkikeg opened this issue Jun 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@xkikeg
Copy link
Owner

xkikeg commented Jun 24, 2024

Currently my program accepts the one below

2023/4/20 stock
    Assets:Brokers                               -10 FOOBAR {(1000.00/10 USD)} @ 110 USD
    Income:Capital Gain                         -100 USD
    Assets:Banks                               1,100 USD

But Ledger doesn't accept this.

While parsing posting:
  Assets:Brokers                               -10 FOOBAR {(1000.00/10 USD)} @ 110 USD
                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: No quantity specified for amount

OTOH, if you remove the parens, Ledger still ignores the expression silently.

> 2023/4/20 stock
>     Assets:Brokers                               -10 FOOBAR {1000.00/10 USD} @ 110 USD
>     Income:Capital Gain                         -100 USD
>     Assets:Banks                               1,100 USD
Unbalanced remainder is:
         -100.00 USD
Amount to balance against:
        1,100.00 USD

So probably we should

  • Make lot price bare amount only, and clearly states expression isn't supported yet
  • (In future, if possible) support expression as a lot price with optional feature guard.
@xkikeg xkikeg changed the title Lot price must be amount to be compatible with Ledger Lot price must be a simple amount to be compatible with Ledger Dec 17, 2024
@xkikeg xkikeg added the bug Something isn't working label Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant