Reordered the methods in the JournalEntryLineItem data model.
This commit is contained in:
parent
a3507494e5
commit
a8f318b0bb
@ -722,14 +722,6 @@ class JournalEntryLineItem(db.Model):
|
||||
"""
|
||||
return self.account.code
|
||||
|
||||
@property
|
||||
def debit(self) -> Decimal | None:
|
||||
"""Returns the debit amount.
|
||||
|
||||
:return: The debit amount, or None if this is not a debit line item.
|
||||
"""
|
||||
return self.amount if self.is_debit else None
|
||||
|
||||
@property
|
||||
def is_need_offset(self) -> bool:
|
||||
"""Returns whether the line item needs offset.
|
||||
@ -744,6 +736,14 @@ class JournalEntryLineItem(db.Model):
|
||||
return False
|
||||
return True
|
||||
|
||||
@property
|
||||
def debit(self) -> Decimal | None:
|
||||
"""Returns the debit amount.
|
||||
|
||||
:return: The debit amount, or None if this is not a debit line item.
|
||||
"""
|
||||
return self.amount if self.is_debit else None
|
||||
|
||||
@property
|
||||
def credit(self) -> Decimal | None:
|
||||
"""Returns the credit amount.
|
||||
|
Loading…
Reference in New Issue
Block a user