create Custom history table
This commit is contained in:
parent
6779b9dac2
commit
a84031405e
2 changed files with 24 additions and 0 deletions
|
|
@ -106,6 +106,10 @@ class Transaction(models.Model):
|
|||
self.destination.save()
|
||||
super().save(*args, **kwargs)
|
||||
|
||||
@property
|
||||
def total(self):
|
||||
return self.amount*self.quantity
|
||||
|
||||
|
||||
class MembershipTransaction(Transaction):
|
||||
membership = models.OneToOneField(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue