From 38b8a028d52596e90a04bcf4d5dac612c2d7c3b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Wed, 5 Apr 2023 09:25:41 +0800 Subject: [PATCH] Reversed the original line items in the original line item selector. --- src/accounting/journal_entry/utils/original_line_items.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/accounting/journal_entry/utils/original_line_items.py b/src/accounting/journal_entry/utils/original_line_items.py index 6328bd6..7f3a974 100644 --- a/src/accounting/journal_entry/utils/original_line_items.py +++ b/src/accounting/journal_entry/utils/original_line_items.py @@ -77,6 +77,7 @@ def get_selectable_original_line_items( .options(selectinload(JournalEntryLineItem.currency), selectinload(JournalEntryLineItem.account), selectinload(JournalEntryLineItem.journal_entry)).all() + line_items.reverse() for line_item in line_items: line_item.net_balance = line_item.amount \ if net_balances[line_item.id] is None \