forked from aiolabs/libra
Excludes voided transactions from pending entries
Ensures that voided transactions are not included in the list of pending entries. This prevents displaying transactions that have been cancelled or reversed, providing a more accurate view of truly pending items.
This commit is contained in:
parent
1ebe066773
commit
7f545ea88e
1 changed files with 2 additions and 1 deletions
|
|
@ -381,7 +381,8 @@ async def api_get_pending_entries(
|
|||
pending_entries = []
|
||||
|
||||
for e in all_entries:
|
||||
if e.get("t") == "Transaction" and e.get("flag") == "!":
|
||||
# Only include pending transactions that are NOT voided
|
||||
if e.get("t") == "Transaction" and e.get("flag") == "!" and "voided" not in e.get("tags", []):
|
||||
# Extract entry ID from links field
|
||||
entry_id = None
|
||||
links = e.get("links", [])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue