From 6a1b09269e2544c7d63e8ca45276303c4b6f3e6e Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 4 Jan 2026 16:55:47 +0800 Subject: [PATCH] bugfix --- accounting/init.py | 3 ++- wwwroot/open_customer_accounts.dspy | 7 ++++--- wwwroot/open_owner_accounts.dspy | 4 ++-- wwwroot/open_reseller_accounts.dspy | 7 ++++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/accounting/init.py b/accounting/init.py index ba5a7c2..cf683a1 100644 --- a/accounting/init.py +++ b/accounting/init.py @@ -5,7 +5,7 @@ from ahserver.serverenv import ServerEnv from sqlor.dbpools import get_sor_context from .accounting_config import Accounting from .bill import write_bill -from .openaccount import openOwnerAccounts, openProviderAccounts, openResellerAccounts, openCustomerAccounts +from .openaccount import openOwnerAccounts, openProviderAccounts, openResellerAccounts, openCustomerAccounts, openRetailRelationshipAccounts from .getaccount import getAccountBalance, getCustomerBalance, getAccountByName, get_account_total_amount from .bizaccount import BizAccounting from .recharge import RechargeBiz, recharge_accounting @@ -78,3 +78,4 @@ def load_accounting(): g.recharge_accounting = recharge_accounting g.get_accdetail = get_accdetail g.all_my_accounts = all_my_accounts + g.openRetailRelationshipAccounts = openRetailRelationshipAccounts diff --git a/wwwroot/open_customer_accounts.dspy b/wwwroot/open_customer_accounts.dspy index 255f483..7075db2 100644 --- a/wwwroot/open_customer_accounts.dspy +++ b/wwwroot/open_customer_accounts.dspy @@ -1,7 +1,8 @@ debug(f'{params_kw=}') dbname = get_module_dbname('accounting') +orgid = await get_userorgid() db = DBPools() async with db.sqlorContext(dbname) as sor: - await openCustomerAccounts(sor, '0', params_kw.orgid) - return f'{params_kw.orgid} accounts opened') -return f'{db.e_except=} + await openCustomerAccounts(sor, '0', orgid) + return f'{orgid} customer accounts opened' +return f'{db.e_except=}' diff --git a/wwwroot/open_owner_accounts.dspy b/wwwroot/open_owner_accounts.dspy index f3b9813..c2c28dc 100644 --- a/wwwroot/open_owner_accounts.dspy +++ b/wwwroot/open_owner_accounts.dspy @@ -3,5 +3,5 @@ dbname = get_module_dbname('accounting') db = DBPools() async with db.sqlorContext(dbname) as sor: await openOwnerAccounts(sor, '0') - return f'0 accounts opened') -return f'{db.e_except=} + return f'0 accounts opened' +return f'{db.e_except=}' diff --git a/wwwroot/open_reseller_accounts.dspy b/wwwroot/open_reseller_accounts.dspy index 06e6083..ee5bbc8 100644 --- a/wwwroot/open_reseller_accounts.dspy +++ b/wwwroot/open_reseller_accounts.dspy @@ -1,7 +1,8 @@ debug(f'{params_kw=}') dbname = get_module_dbname('accounting') +orgid = await get_userorgid() db = DBPools() async with db.sqlorContext(dbname) as sor: - await openResellerAccounts(sor, '0', params_kw.orgid) - return f'{params_kw.orgid} accounts opened') -return f'{db.e_except=} + await openResellerAccounts(sor, '0', orgid) + return f'{orgid} reseller accounts opened' +return f'{db.e_except=}'