accounting/wwwroot/oca.dspy
2026-04-01 17:56:46 +08:00

12 lines
315 B
Plaintext

iorgid = params_kw.orgid
db = DBPools()
async with db.sqlorContext(dbname) as sor:
recs = await sor.R('organization', {'id': orgid})
if len(recs) == 0:
return f"error: {orgid=} not found"
await openCustomerAccounts(sor, '0', orgid)
return f'{orgid} customer accounts opened'
return f'{db.e_except=}'