From 965df82c1c466245f012d239be4a90f3800ec8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BE=9D=E7=91=AA=E8=B2=93?= Date: Thu, 9 Mar 2023 11:55:12 +0800 Subject: [PATCH] Fixed the logic in the __add_owner_s_equity method of the AccountCollector of the balance sheet, that when there is an existing balance, only set the URL when there's amount to be added. --- src/accounting/report/reports/balance_sheet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/accounting/report/reports/balance_sheet.py b/src/accounting/report/reports/balance_sheet.py index e9b9ea0..6d4529c 100644 --- a/src/accounting/report/reports/balance_sheet.py +++ b/src/accounting/report/reports/balance_sheet.py @@ -235,9 +235,9 @@ class AccountCollector: = {x.account.code: x for x in self.accounts} if code in account_balance_by_code: balance: ReportAccount = account_balance_by_code[code] - balance.url = url if amount is not None: balance.amount = balance.amount + amount + balance.url = url return # Add a new balance if amount is None: