summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sstreasury/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/sstreasury/models.py b/sstreasury/models.py
index f278dff..8651d1e 100644
--- a/sstreasury/models.py
+++ b/sstreasury/models.py
@@ -100,7 +100,7 @@ class BudgetRevision(models.Model):
def get_revenue_total(self):
total = Decimal(0)
for item in self.revenue:
- total += Decimal(item['Unit price']) * item['Units']
+ total += Decimal(item['Unit price']) * Decimal(item['Units'])
if item['IWT'] and item['Unit price'] > 0:
total -= (Decimal(item['Unit price']) - (Decimal(item['Unit price']) - Decimal('0.8133')) / Decimal('1.01884')) * item['Units']
return total
@@ -108,7 +108,7 @@ class BudgetRevision(models.Model):
def get_expense_total(self):
total = Decimal(0)
for item in self.expense:
- total += Decimal(item['Unit price']) * item['Units']
+ total += Decimal(item['Unit price']) * Decimal(item['Units'])
if not self.expense_no_emergency_fund:
total *= Decimal('1.05')
return total
Contact (issues, pull requests, etc.) at git@yingtongli.me. Generated by cgit.