Repository navigation
feat(core): v0.2 M2 supplier bank account - #16
Merged
Merged
Conversation
Add srm_supplier_bank_account (master_detail to supplier) with the pending_verify -> active verification flow: - buyer-side create lands pending_verify (status/verified_by read-only); key fields are read-only in every state, changes go through M4 - srm_bank_verify screen flow: AP accountants only, pending accounts only, creator cannot verify their own account (four-eyes) - account_no masked to last 4 digits unless the caller holds the new srm_view_bank_account_no capability (srm_finance, srm_supplier_admin) - account name must match the supplier name for domestic suppliers; only active accounts can be default, at most one default per supplier (via new srm_supplier.default_bank_account_count) - views, workbench nav, verify action, en translations, design 02/03/04 The in-flow position gate is a documented stopgap for objectstack-ai/objectstack#25481. Closes #11 Claude-Session: https://claude.ai/code/session_01HeASGpomzEjdVxEzMMXKTR Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeASGpomzEjdVxEzMMXKTR Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by 田騏 · project thread
Closes #11 (overview #7).
改了什么
对象
srm_supplier_bank_account(master_detail → 供应商,OWDcontrolled_by_parent):字段按 02 §4.1。status(pending_verify/active/inactive)与verified_by只读,只由 flow 写入;状态机pending_verify → active ⇄ inactive,active作为初始状态留给 M4 变更单 flow 以系统身份直接建出已审批的新账户。readonlyWhen在任何状态下只读(新建时可填):待核验期间整条锁定,有效后的修改走 M4 信息变更单。active账户能设为默认;每家至多一个默认账户(读新增的srm_supplier.default_bank_account_count汇总)。核验 screen flow
srm_bank_verify+ 详情页/列表的「核验」按钮:拒绝非应付会计、非待核验、新建人自己核验(双人原则),通过后置active并写verified_by。字段级权限(BR-20):
account_no用maskingRule: 'bank_account'+requiredPermissions: ['srm_view_bank_account_no']。新能力由srm_finance与srm_supplier_admin的systemPermissions授予,其他岗位读到只留后 4 位的脱敏值。没有任何权限集给银行账户allowExport。权限集:
srm_internal_base读;srm_supplier_admin读、新建、编辑;srm_finance读。其他:列表视图(全部 / 待核验)、工作台导航、英文翻译、设计 02 §4.1、03 §5、04 §4.2 同步。
平台缺口(按项目规则提给平台)
current_user.positions判断是否应付会计(已在代码注释里写明),平台支持后改为声明。怎么验证的
test/bank-account.test.ts(13 条):新建 → 核验 → 有效全流程;同一人核验被拒;非应付会计被拒;待核验记录改不动;有效账户关键字段改不动但可设默认;默认账户唯一;户名校验(境内 / 境外);应付会计与品类经理读到完整账号、采购员读到脱敏值;应付会计不能直接改;无导出权限。test/permissions.test.ts岗位可见性快照更新(应付会计 R、采购主管 RCE)。pnpm verify(validate、lint、typecheck、i18n:check --strict、test 46/46、build)与governance/scripts/build.py --check全部通过。Generated by Claude Code