Skip to content

feat(procurement): fix broken approval role, add 3-way-match signal & vendor risk - #38

Merged
xuyushun441-sys merged 1 commit into
mainfrom
optimize/procurement
Jun 14, 2026
Merged

xuyushun441-sys merged 1 commit into
mainfrom
optimize/procurement

Conversation

@xuyushun441-sys

Copy link
Copy Markdown
Contributor

Why

S2P headline features didn't fully work: the approval flow alerted role:finance_approver — a role that didn't exist (nobody got notified); the charter advertised a 3-way-match rollup hook that isn't there (and can't be — nested writes crash the sandbox); there was no visible match/exception signal; cost_center was dropped during PR→PO conversion; and the dashboard promised "top vendors by spend" with no such widget.

What changed (within the 4-object cap)

  • Add finance_approver role so the existing PR-approval alert actually resolves to a recipient.
  • PO match_status formula (awaiting / partial / matched) — the receiving-exception signal — on the order layout. CHARTER reconciled to describe the real 2-way match + the stored-field constraint.
  • Carry cost_center PR→PO (field + conversion mapping) for spend-by-cost-center reporting.
  • Vendor master: risk_tier + is_preferred.
  • "Top Vendors by Spend" dashboard widget (+ vendor/status dataset dimensions).

en + zh-CN updated.

Verification

typecheck + objectstack build + repo format:check clean. Build: 4 Objects / 49 Fields / 3 Roles.

🤖 Generated with Claude Code

… vendor risk

- pr_approval_required.flow notified `role:finance_approver`, but that role did
  not exist — so on a real deploy nobody was alerted. Add `finance_approver`
  to the role hierarchy.

- Add a PO `match_status` formula (awaiting / partial / matched) — the missing
  receiving-exception signal the procurement lead chases daily — surfaced in
  the order compact layout. Reconcile CHARTER to describe the real 2-way
  (PO↔receipt) match and the stored-field constraint instead of claiming a
  nonexistent rollup hook.

- Carry `cost_center` from PR to PO (added the field + mapped it in
  pr_to_po_convert) so committed spend can be reported by cost center.

- Vendor master depth: add `risk_tier` (low/medium/high) and `is_preferred`,
  surfaced on the vendor compact layout.

- Deliver the dashboard's promised "Top Vendors by Spend" widget (added the
  `vendor`/`status` dataset dimensions + a bar widget).

en + zh-CN updated. typecheck + objectstack build + format:check clean
(4 Objects, 3 Roles).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@xuyushun441-sys
xuyushun441-sys merged commit 64d41b4 into main Jun 14, 2026
3 checks passed
@xuyushun441-sys
xuyushun441-sys deleted the optimize/procurement branch June 14, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants