From 9b905836f9b6eafcb1c24de6476e3d7e525bf9dd Mon Sep 17 00:00:00 2001 From: ymq Date: Wed, 26 Aug 2026 17:52:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(openaccount):=20=E5=BC=80=E6=88=B7=E6=97=B6?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=20balance=3D0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit openAccount 建账户时未传 balance,account.balance 落 NULL,记账 leg_accounting 里 account.balance + balance_amount 报 TypeError NoneType+float。开户即记 0 余额。 --- accounting/openaccount.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accounting/openaccount.py b/accounting/openaccount.py index aede1f4..fa7e1b3 100644 --- a/accounting/openaccount.py +++ b/accounting/openaccount.py @@ -19,7 +19,8 @@ async def openAccount(sor, accounting_orgid, orgid, account_config, org1id=None) 'orgid':orgid, 'subjectid':account_config['subjectid'], 'balance_at':account_config['balance_side'], - 'max_detailno':0 + 'max_detailno':0, + 'balance': 0.0 } if org1id: ns['org1id'] = org1id;