From 17b3b770227399a17cf6733cb2d9b1d7e67a59be Mon Sep 17 00:00:00 2001 From: steffen123 Date: Sun, 11 Jul 2010 06:08:57 +0200 Subject: [PATCH] TPS: correct spent display for PSFP games --- pyfpdb/SQL.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyfpdb/SQL.py b/pyfpdb/SQL.py index cc2e9cc1..a78fca5f 100644 --- a/pyfpdb/SQL.py +++ b/pyfpdb/SQL.py @@ -2272,7 +2272,7 @@ class Sql: ,SUM(CASE WHEN rank = 2 THEN 1 ELSE 0 END) AS 2nd ,SUM(CASE WHEN rank = 3 THEN 1 ELSE 0 END) AS 3rd ,SUM(tp.winnings)/100.0 AS won - ,SUM(tt.buyin+tt.fee)/100.0 AS spent + ,SUM(CASE WHEN tt.currency = "USD" THEN (tt.buyIn+tt.fee)/100.0 ELSE tt.buyIn END) AS spent ,SUM(tp.winnings)/SUM(tt.buyin+tt.fee)*100.0-100 AS roi ,SUM(tp.winnings-(tt.buyin+tt.fee))/100.0/(COUNT(1)-SUM(CASE WHEN tp.rank > 0 THEN 0 ELSE 1 END)) AS profitPerTourney from TourneysPlayers tp