Display the right amount in soge credit detail
This commit is contained in:
parent
2a2ecb2acc
commit
f190053e84
1 changed files with 2 additions and 1 deletions
|
|
@ -295,7 +295,8 @@ class SogeCredit(models.Model):
|
|||
|
||||
@property
|
||||
def amount(self):
|
||||
return sum(transaction.total for transaction in self.transactions.all()) + 8000
|
||||
return self.credit_transaction.total if self.valid \
|
||||
else sum(transaction.total for transaction in self.transactions.all()) + 8000
|
||||
|
||||
def invalidate(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue