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

Loses precision on amounts! #37

Open
tbm opened this issue Dec 21, 2022 · 2 comments
Open

Loses precision on amounts! #37

tbm opened this issue Dec 21, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@tbm
Copy link
Collaborator

tbm commented Dec 21, 2022

b2l turns 10.2253 units into 10.22 units, which means the file no longer balances.

It seems the precision is influenced by other transactions. If the transaction is followed by 2 or more with lower precision, that precision is adopted. If there's only 1 other transaction, it's not lost.

2022-12-21 * "Investment"
    Assets:Investments  10.2253 GB00B80QFW04 {2.984917082 GBP}
    Assets:Investments

2022-12-21 * "Investment"
    Assets:Investments   1.12 GB00B80QFW04 {2.984917082 GBP}
    Assets:Investments

2022-12-21 * "Investment"
    Assets:Investments   2.23 GB00B80QFW04 {2.984917082 GBP}
    Assets:Investments

Output:

2022-12-21 * Investment
    Assets:Investments               10.23 "GB00B80QFW04" {2.984917082 GBP}
    Assets:Investments
...
@tbm tbm added the bug Something isn't working label Dec 21, 2022
@tbm
Copy link
Collaborator Author

tbm commented Dec 21, 2022

bean-report print has the right info but I see that bean-query doesn't seem to, so maybe this is a beancount issue. I need to invest another day.

@tbm
Copy link
Collaborator Author

tbm commented Dec 21, 2022

b2l turns 10.2253 units into 10.22 units, which means the file no longer balances.

My original test case (when converted to ledger) no longer balances. It seems ok in beancount. I need to investigate.

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