From 574a286e0c89adf06c23fb8245c0328ea0d7187f Mon Sep 17 00:00:00 2001 From: Matt Turnbull Date: Mon, 15 Jun 2009 22:30:58 +0100 Subject: [PATCH] round amounts to 2 dp --- pyfpdb/Hand.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pyfpdb/Hand.py b/pyfpdb/Hand.py index 05be0520..46bd55e7 100644 --- a/pyfpdb/Hand.py +++ b/pyfpdb/Hand.py @@ -1115,10 +1115,10 @@ select g.type, g.limitType, g.hilo, - g.smallBlind / 100.0, - g.bigBlind / 100.0 , - g.smallBet / 100.0, - g.bigBet / 100.0, + round(g.smallBlind / 100.0,2), + round(g.bigBlind / 100.0,2), + round(g.smallBet / 100.0,2), + round(g.bigBet / 100.0,2), s.currency, bc.card1value, bc.card1suit, @@ -1185,7 +1185,7 @@ WHERE h.id = %(handid)s c.execute(""" SELECT hp.seatno, - hp.winnings / 100.0 as winnings, + round(hp.winnings / 100.0,2) as winnings, p.name, round(hp.startcash / 100.0,2) as chips, hp.card1,hp.card2 @@ -1210,7 +1210,7 @@ SELECT ha.street, ha.action, ha.allin, - ha.amount / 100.0 + round(ha.amount / 100.0,2) FROM handsplayers as hp, handsactions as ha,