summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYingtong Li <runassudo@yingtongli.me>2020-10-05 00:11:12 +1100
committerYingtong Li <runassudo@yingtongli.me>2020-10-05 00:11:12 +1100
commit2dde94483fec22691530fb126ae9f54f9c3b7699 (patch)
tree6f17eb5d5156bd72f5611a34e153af0163d46d0c
parent066b461769a15978e6ab842eb29a7117193e2cc0 (diff)
Don't choke on reimbursement claims with fractional units
-rw-r--r--sstreasury/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sstreasury/models.py b/sstreasury/models.py
index 02f2a01..f278dff 100644
--- a/sstreasury/models.py
+++ b/sstreasury/models.py
@@ -240,7 +240,7 @@ class ReimbursementClaim(models.Model):
def get_total(self):
total = Decimal(0)
for item in self.items:
- total += Decimal(item['Unit price']) * item['Units']
+ total += Decimal(item['Unit price']) * Decimal(item['Units'])
return total
def update_state(self, user, state):
Contact (issues, pull requests, etc.) at git@yingtongli.me. Generated by cgit.