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

Display of numbers with zero decimal places #9

Open
redstreet opened this issue Mar 26, 2020 · 1 comment
Open

Display of numbers with zero decimal places #9

redstreet opened this issue Mar 26, 2020 · 1 comment

Comments

@redstreet
Copy link
Owner

We need to be able to display a value of type Decimal in a table, without displaying the decimal point or digits after it. Eg: Decimal(23.92) should display simply as '24' in the table. This helps with several investing reports, since decimal places don't matter, and the display is cleaner without them.

@redstreet
Copy link
Owner Author

I tried inserting Decimal(23.92).to_integral(), but that ended up displaying as '24.00'
How can I get rid of the '.00'? I'd rather not do int() since I'd prefer to respect the locale settings (like commas) for everything else

Looks like fava/core/number.py calls Precision in beancount.core.display_context, but I'm not seeing an existing way to specify the number of decimals displayed.

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

1 participant