Add remittance model
This commit is contained in:
parent
5ac10b58d5
commit
3551568de5
2 changed files with 45 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ from django.urls import reverse
|
|||
from django.utils import timezone
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from polymorphic.models import PolymorphicModel
|
||||
from treasury.models import Remittance
|
||||
|
||||
from .notes import Note, NoteClub, NoteSpecial
|
||||
|
||||
|
|
@ -209,6 +210,13 @@ class SpecialTransaction(Transaction):
|
|||
blank=True,
|
||||
)
|
||||
|
||||
remittance = models.ForeignKey(
|
||||
Remittance,
|
||||
on_delete=models.PROTECT,
|
||||
null=True,
|
||||
verbose_name=_("Remittance"),
|
||||
)
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
return _('Credit') if isinstance(self.source, NoteSpecial) else _("Debit")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue