Don't choke on reimbursement claims with fractional units
This commit is contained in:
parent
066b461769
commit
2dde94483f
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user