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

Question about the Reports #2

Open
DrakenZA opened this issue Jun 20, 2018 · 1 comment
Open

Question about the Reports #2

DrakenZA opened this issue Jun 20, 2018 · 1 comment

Comments

@DrakenZA
Copy link

In the reports, it looks like the 'cost basis' that displays at the bottom of the reports, seems to be up to 2 decimal places. Some weaker coins are values lower than that many decimal places in value.

I was just wondering, are the calculations done with the full float numbers, and its just the report that is displaying up to 2 decimal places.

If if just the display that is doing it, how would i go about changing it.

Ive tried going through the code to do with the reporting, where its converting values to display in the report to strings, i tried to change the conversation to .format which allows you to state how many decimal points to display, but the reports still have 0.000, when they should be 0.001.

@baxter100
Copy link
Owner

I'm not sure exactly where you are referring to but the calculations are done with full floats, so there's no need to worry about that. Also, I believe the numbers are you are referring to are all GBP amounts so I don't see why you would want more than 2 DP anyway.
In case you do want more DPs the quickest way is described below:
-The outputs for the lists are rounded to two decimal places using round(value, 2). This is done on line 324
-To get more decimal places change 2 to the number of decimal places you require

Hope this helps!
let me know if it works

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