This commit is contained in:
yumoqing 2025-03-20 10:44:13 +08:00
parent 9b45321569
commit 695bf5a18e

View File

@ -30,7 +30,6 @@ class BizAccounting:
accountset:with accounting attribute and a sub accountsets
accountset:
action:with action can find the accounting_config
variable:contains the variable accounting_config need
participal: found the account to be accounting
async def prepare(sor):
find all the accounting_legs
@ -87,20 +86,20 @@ class BizAccounting:
ac = ArgsConvert('${', '}$')
try:
amtstr = ac.convert(l['amt_pattern'],
accountset.variable.copy()
accountset.copy()
)
debug(f'{l["amt_pattern"]=}, {amtstr=}, {accountset.variable=}')
debug(f'{l["amt_pattern"]=}, {amtstr=}, {accountset=}')
if isinstance(amtstr, str):
l['amount'] = eval(amtstr)
else:
l['amount'] = amtstr
except Exception as e:
exception(f"{e=}, {l['amt_pattern']}, {accountset.variable=}")
exception(f"{e=}, {l['amt_pattern']}, {accountset=}")
raise e
if l['amount'] is None:
debug(f'amount is None:{l["amt_pattern"]}, {accountset.variable=}')
debug(f'amount is None:{l["amt_pattern"]}, {accountset=}')
raise AccountingAmountIsNone(self.caller.billid)
accounting_orgid = await self.get_orgid_by_trans_role(l.accounting_orgtype)
orgid = await self.get_orgid_by_trans_role(l.orgtype)