From fb9705530b3d1b32b3b3659ae1e9ffe24237249b Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Fri, 1 Jun 2012 14:45:13 +0100 Subject: [PATCH] Fix transaction creation for payments --- pacmanager/core/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pacmanager/core/tasks.py b/pacmanager/core/tasks.py index d630d77..ee754fc 100644 --- a/pacmanager/core/tasks.py +++ b/pacmanager/core/tasks.py @@ -92,7 +92,7 @@ def process_pac_wallet(): corp = paymentid[res] logging.info('Payment Found, %s, Ref ID %s, Amount: %s ISK' % (corp.name, record.refID, record.amount)) # Payment found - trans = Transaction.objects.create(corporation=corp, value=record.amount, comment="Wallet Ref ID %s" % record.refID, type=Transaction.TRANSACTION_TYPE_PAYMENT) + trans = Transaction.objects.create(corporation=corp, value=Decimal(str(record.amount)), comment="Wallet Ref ID %s" % record.refID, type=Transaction.TRANSACTION_TYPE_PAYMENT) corp.balance += Decimal(str(record.amount)) corp.save() else: