Merge branch 'main' of git.opencomputing.cn:yumoqing/accounting
This commit is contained in:
commit
905ac8a392
@ -153,8 +153,8 @@ class Accounting:
|
|||||||
acc_balance -= l['amount']
|
acc_balance -= l['amount']
|
||||||
else:
|
else:
|
||||||
acc_balance += l['amount']
|
acc_balance += l['amount']
|
||||||
if acc_balance < 0.000000:
|
if acc_balance < 0.000001:
|
||||||
e = AccountOverDraw(curacc, l['acc'].balance, leg['amount'])
|
e = AccountOverDraw(curacc, l['acc'].balance, l['amount'])
|
||||||
exception(f'{e},{legs=}')
|
exception(f'{e},{legs=}')
|
||||||
raise e
|
raise e
|
||||||
l['new_balance'] = acc_balance
|
l['new_balance'] = acc_balance
|
||||||
|
|||||||
@ -47,11 +47,11 @@ async def getAccountByName(sor, accounting_orgid, orgid, name, org1id):
|
|||||||
|
|
||||||
async def getCustomerBalance(sor, customerid):
|
async def getCustomerBalance(sor, customerid):
|
||||||
name = '客户资金账户'
|
name = '客户资金账户'
|
||||||
get_owner_orgid = get_serverenv('get_owner_orgid')
|
env = ServerEnv()
|
||||||
|
get_owner_orgid = env.get_owner_orgid
|
||||||
if get_owner_orgid is None:
|
if get_owner_orgid is None:
|
||||||
debug('get_owner_orgid function is not a serverenv function')
|
debug('get_owner_orgid function is not a serverenv function')
|
||||||
return None
|
return None
|
||||||
debug(f'{get_owner_orgid=}')
|
|
||||||
orgid = await get_owner_orgid(sor, customerid)
|
orgid = await get_owner_orgid(sor, customerid)
|
||||||
if orgid is None:
|
if orgid is None:
|
||||||
debug(f"{customerid=}'s parent organization not found")
|
debug(f"{customerid=}'s parent organization not found")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user