feat: 发起审批时拒绝不属于发起人的收款账户
直接发起和草稿提交都走 start_instance,因此只在这一处核对账户归属。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
41e8d6f7c4
commit
f76ef8a6e5
1 file changed
+12
@@ -1890,6 +1890,18 @@ def start_instance(
|
||||
if recv_errs:
|
||||
raise OaEngineError(recv_errs[0])
|
||||
|
||||
from app.services.oa_receive_account import validate_receive_account_ownership
|
||||
|
||||
own_errs = validate_receive_account_ownership(
|
||||
db,
|
||||
schema,
|
||||
data,
|
||||
tenant_no=tenant_no,
|
||||
initiator_user_id=initiator_user_id,
|
||||
)
|
||||
if own_errs:
|
||||
raise OaEngineError(own_errs[0])
|
||||
|
||||
now = datetime.now()
|
||||
title_text = (title or app.app_name or "").strip()
|
||||
normalized_select = _normalize_initiator_select_by_node(initiator_select_by_node)
|
||||
|
||||
Reference in new issue
Block a user