mirror of
https://gitlab.crans.org/bde/nk20
synced 2024-11-26 18:37:12 +00:00
[note] Added type property to transactions
This commit is contained in:
parent
5d15b8c613
commit
49952355e6
@ -157,6 +157,10 @@ class Transaction(PolymorphicModel):
|
|||||||
def total(self):
|
def total(self):
|
||||||
return self.amount * self.quantity
|
return self.amount * self.quantity
|
||||||
|
|
||||||
|
@property
|
||||||
|
def type(self):
|
||||||
|
return _('transfert')
|
||||||
|
|
||||||
|
|
||||||
class TemplateTransaction(Transaction):
|
class TemplateTransaction(Transaction):
|
||||||
"""
|
"""
|
||||||
@ -174,6 +178,10 @@ class TemplateTransaction(Transaction):
|
|||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def type(self):
|
||||||
|
return _('template')
|
||||||
|
|
||||||
|
|
||||||
class MembershipTransaction(Transaction):
|
class MembershipTransaction(Transaction):
|
||||||
"""
|
"""
|
||||||
@ -190,3 +198,7 @@ class MembershipTransaction(Transaction):
|
|||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("membership transaction")
|
verbose_name = _("membership transaction")
|
||||||
verbose_name_plural = _("membership transactions")
|
verbose_name_plural = _("membership transactions")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def type(self):
|
||||||
|
return _('membership')
|
||||||
|
Loading…
Reference in New Issue
Block a user