Repository navigation
feat(procurement): fix broken approval role, add 3-way-match signal & vendor risk - #38
Merged
Merged
Conversation
… 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>
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.
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_centerwas dropped during PR→PO conversion; and the dashboard promised "top vendors by spend" with no such widget.What changed (within the 4-object cap)
finance_approverrole so the existing PR-approval alert actually resolves to a recipient.match_statusformula (awaiting / partial / matched) — the receiving-exception signal — on the order layout. CHARTER reconciled to describe the real 2-way match + the stored-field constraint.cost_centerPR→PO (field + conversion mapping) for spend-by-cost-center reporting.risk_tier+is_preferred.vendor/statusdataset dimensions).en + zh-CN updated.
Verification
typecheck+objectstack build+ repoformat:checkclean. Build: 4 Objects / 49 Fields / 3 Roles.🤖 Generated with Claude Code