Compare commits
No commits in common. "2969e83afed0b84ee26e964a905d1b044953bf88" and "f29cb00aec2e49c15f1ed232c6db0c93e870ac9d" have entirely different histories.
2969e83afe
...
f29cb00aec
@ -2,14 +2,6 @@ Change Log
|
|||||||
==========
|
==========
|
||||||
|
|
||||||
|
|
||||||
Version 1.5.2
|
|
||||||
-------------
|
|
||||||
|
|
||||||
Released 2023/4/30
|
|
||||||
|
|
||||||
* Fixed the error of the net balance in the unmatched offset list.
|
|
||||||
|
|
||||||
|
|
||||||
Version 1.5.1
|
Version 1.5.1
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ from flask_sqlalchemy import SQLAlchemy
|
|||||||
|
|
||||||
from accounting.utils.user import UserUtilityInterface
|
from accounting.utils.user import UserUtilityInterface
|
||||||
|
|
||||||
VERSION: str = "1.5.2"
|
VERSION: str = "1.5.1"
|
||||||
"""The package version."""
|
"""The package version."""
|
||||||
db: SQLAlchemy = SQLAlchemy()
|
db: SQLAlchemy = SQLAlchemy()
|
||||||
"""The database instance."""
|
"""The database instance."""
|
||||||
|
@ -123,13 +123,15 @@ class OffsetMatcher:
|
|||||||
.options(selectinload(JournalEntryLineItem.currency),
|
.options(selectinload(JournalEntryLineItem.currency),
|
||||||
selectinload(JournalEntryLineItem.journal_entry)).all()
|
selectinload(JournalEntryLineItem.journal_entry)).all()
|
||||||
for line_item in self.line_items:
|
for line_item in self.line_items:
|
||||||
line_item.is_offset = line_item.id not in net_balances
|
line_item.is_offset = line_item.id in net_balances
|
||||||
self.unapplied = [x for x in self.line_items if not x.is_offset]
|
self.unapplied = [x for x in self.line_items
|
||||||
|
if x.is_offset]
|
||||||
for line_item in self.unapplied:
|
for line_item in self.unapplied:
|
||||||
line_item.net_balance = line_item.amount \
|
line_item.net_balance = line_item.amount \
|
||||||
if net_balances[line_item.id] is None \
|
if net_balances[line_item.id] is None \
|
||||||
else net_balances[line_item.id]
|
else net_balances[line_item.id]
|
||||||
self.unmatched = [x for x in self.line_items if x.is_offset]
|
self.unmatched = [x for x in self.line_items
|
||||||
|
if not x.is_offset]
|
||||||
self.__populate_accumulated_balances()
|
self.__populate_accumulated_balances()
|
||||||
|
|
||||||
def __populate_accumulated_balances(self) -> None:
|
def __populate_accumulated_balances(self) -> None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user