bugfix
This commit is contained in:
parent
45ea640ca1
commit
6a1b09269e
@ -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
|
||||
|
||||
@ -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=}'
|
||||
|
||||
@ -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=}'
|
||||
|
||||
@ -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=}'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user