Don't choke on reimbursement claims with fractional units

This commit is contained in:
Yingtong Li 2020-10-05 00:11:12 +11:00
parent 066b461769
commit 2dde94483f
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
1 changed files with 1 additions and 1 deletions

View File

@ -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):