TPS displays currency and fee now

This commit is contained in:
steffen123 2010-07-11 05:28:43 +02:00
parent ed096b6872
commit 7bf7463705
2 changed files with 16 additions and 12 deletions

View File

@ -75,19 +75,21 @@ class GuiTourneyPlayerStats (threading.Thread):
# ToDo: create popup to adjust column config
# columns to display, keys match column name returned by sql, values in tuple are:
# is column displayed, column heading, xalignment, formatting, celltype
self.columns = [ ["siteName", True, "Site", 0.0, "%s", "str"]
#, ["tourney", False, "Tourney", 0.0, "%s", "str"] # true not allowed for this line
, ["buyIn", True, "BuyIn", 1.0, "%3.2f", "str"]
, ["playerName", False, "Name", 0.0, "%s", "str"] # true not allowed for this line (set in code)
, ["tourneyCount", True, "#", 1.0, "%1.0f", "str"]
, ["itm", True, "ITM%", 1.0, "%3.2f", "str"]
, ["1st", False, "1st", 1.0, "%1.0f", "str"]
self.columns = [ ["siteName", True, "Site", 0.0, "%s", "str"]
#,["tourney", False, "Tourney", 0.0, "%s", "str"] # true not allowed for this line
, ["currency", True, "Curr.", 0.0, "%s", "str"]
, ["buyIn", True, "BuyIn", 1.0, "%3.2f", "str"]
, ["fee", True, "Fee", 1.0, "%3.2f", "str"]
, ["playerName", False, "Name", 0.0, "%s", "str"] # true not allowed for this line (set in code)
, ["tourneyCount", True, "#", 1.0, "%1.0f", "str"]
, ["itm", True, "ITM%", 1.0, "%3.2f", "str"]
, ["1st", False, "1st", 1.0, "%1.0f", "str"]
, ["2nd", True, "2nd", 1.0, "%1.0f", "str"]
, ["3rd", True, "3rd", 1.0, "%1.0f", "str"]
, ["unknownRank", True, "unknown", 1.0, "%1.0f", "str"]
, ["spent", True, "Spent", 1.0, "%3.2f", "str"]
, ["won", True, "Won", 1.0, "%3.2f", "str"]
, ["roi", True, "ROI%", 1.0, "%3.0f", "str"]]
, ["3rd", True, "3rd", 1.0, "%1.0f", "str"]
, ["unknownRank", True, "Rank?", 1.0, "%1.0f", "str"]
, ["spent", True, "Spent", 1.0, "%3.2f", "str"]
, ["won", True, "Won", 1.0, "%3.2f", "str"]
, ["roi", True, "ROI%", 1.0, "%3.0f", "str"]]
self.stats_frame = gtk.Frame()
self.stats_frame.show()

View File

@ -2261,7 +2261,9 @@ class Sql:
self.query['tourneyPlayerDetailedStats'] = """
select s.name AS siteName
,t.tourneyTypeId AS tourneyTypeId
,tt.currency AS currency
,(CASE WHEN tt.currency = "USD" THEN tt.buyIn/100.0 ELSE tt.buyIn END) AS buyIn
,tt.fee/100.0 AS fee
,p.name AS playerName
,COUNT(1) AS tourneyCount
,SUM(CASE WHEN tp.rank > 0 THEN 0 ELSE 1 END) AS unknownRank