ensignlee / ssbook

ssbook
5 stars 3 forks source link

Format the numbers on the view bets page #120

Closed ensignlee closed 12 years ago

ensignlee commented 13 years ago

For any dollar values (ex: For the bet history table and the W-L-T Grouped by values for winnings),

have the Risk and Winnings column values show dollar signs. And show parenthesis and change font color to red when negative.

ensignlee commented 13 years ago

And while we're at it, can we have the username and password text fields be the same size and aligned? :)

camerondavison commented 12 years ago

i am ignoring the comment which i think has nothing to do with this ticket.

this is requesting that no negative '-' signs exists correct. Basically be consistent and us "red" and parans for every dollar value on that page.

chrisacheson commented 12 years ago

Should this be applied to only the "W-L-T Grouped by" and bet history tables, or to all dollar values on the page?

ensignlee commented 12 years ago

To all dollar values

ensignlee commented 12 years ago

Can I have my dollar signs back, and commas separating thousands back? (i.e. 1,000 not 1000).

Also, this formatting was not applied to "Average Amount Bet Per Bet" I assume, since it looks diff than all other nos?

ensignlee commented 12 years ago

Also, how hard would it be to only add decimals where they are needed (i.e. don't show 100.00, show 100. But show 100.25)

chrisacheson commented 12 years ago

I'd used php's money_format function for this. It displays dollar signs and commas properly for me, but it is locale-dependent, so check the settings on your machine. I didn't change how "average amount bet per bet" is displayed, since it can't be negative. Didn't notice the decimal display inconsistency. I can add a workaround to suppress ".00" decimals.

chrisacheson commented 12 years ago

Cameron, can you verify that money_format works on the production server? It looks like we've already got the currency locale set to US in config/bootstrap.php, so that shouldn't be the issue. If it works on production, this issue can be closed.

ensignlee commented 12 years ago

I'm using the default settings in chrome, firefox, and internet explorer and I did a fresh reformat not too long ago. This issue persists across multiple computers as well. I'd imagine that most of our users would be in the same boat?

Why would it display currency with no commas and no dollar symbols?

camerondavison commented 12 years ago

Sorry Chris, I am not really sure why I put that locale statement in the code in the first place, but it was not a supported locale on the debian system. I have changed it to something that is supported.