Compare commits
2 Commits
45ea640ca1
...
76acdb6a3b
| Author | SHA1 | Date | |
|---|---|---|---|
| 76acdb6a3b | |||
| 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=}'
|
||||
|
||||
9
wwwroot/open_reseller_provider_accounts.dspy
Normal file
9
wwwroot/open_reseller_provider_accounts.dspy
Normal file
@ -0,0 +1,9 @@
|
||||
debug(f'{params_kw=}')
|
||||
dbname = get_module_dbname('accounting')
|
||||
assert params_kw.providerid
|
||||
assert params_kw.resellerid
|
||||
db = DBPools()
|
||||
async with db.sqlorContext(dbname) as sor:
|
||||
await openRetailRelationshipAccounts(sor, '0', params_kw.providerid, params_kw.resellerid)
|
||||
return f'{orgid} reseller accounts opened'
|
||||
return f'{db.e_except=}'
|
||||
Loading…
x
Reference in New Issue
Block a user