30 lines
757 B
Python
30 lines
757 B
Python
|
from run_test import run
|
||
|
from appPublic.log import debug
|
||
|
from sqlor.dbpools import DBPools
|
||
|
from accounting.openaccount import openAllCustomerAccounts, \
|
||
|
openOwnerAccounts, openAllProviderAccounts, openAllResellerAccounts
|
||
|
|
||
|
async def OpenAccount():
|
||
|
orgid = '_VaV5trl8faujgr7xaE3D'
|
||
|
db = DBPools()
|
||
|
async with db.sqlorContext('sage') as sor:
|
||
|
try:
|
||
|
await openAllCustomerAccounts(sor, orgid)
|
||
|
except Exception as e:
|
||
|
debug(f'{e}')
|
||
|
try:
|
||
|
await openOwnerAccounts(sor, orgid)
|
||
|
except Exception as e:
|
||
|
debug(f'{e}')
|
||
|
try:
|
||
|
await openAllProviderAccounts(sor, orgid)
|
||
|
except Exception as e:
|
||
|
debug(f'{e}')
|
||
|
try:
|
||
|
await openAllResellerAccounts(sor, orgid)
|
||
|
except Exception as e:
|
||
|
debug(f'{e}')
|
||
|
|
||
|
if __name__ == '__main__':
|
||
|
run(OpenAccount)
|