reorder point mrp #5
Loading…
Reference in a new issue
No description provided.
Delete branch "d/sp3-mrp"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds material planning profiles and supplier terms with prices, a movement log feeding computed usage, reorder suggestions with moq and package rounding that fire with or without demand, order-by dates, and per-preferred-supplier draft creation with price snapshots.
🤖 Claude AI Code Review
Summary
Adds MRP reorder-point planning (profiles, supplier terms, movement log, priced drafts) with extensive tests. Cohesive, well-documented, and correctly batched.
Code Quality ⭐⭐⭐⭐⭐
Excellent atomicity discipline (single-SaveChanges batching, movement rows written in the same transaction as stock mutations) and thorough test coverage of edge cases.
Issues
🟢
MaterialNeedsService.cs—consumptionMovementsloads the entire Backflush/BackflushUndo history unwindowed into memory before filtering bywindowStart. This is already acknowledged in TODO.md as an upgrade path; fine for now but will grow unbounded over time.🟢
MaterialsPage.razor— InCreateOrderAsync, when the fallback dialog is canceled,stillUnassignedstays >0 and the snackbar reports remaining rows correctly, but a batch that created some grouped drafts plus a canceled fallback still shows a Warning. Minor UX nit, not a bug.Movement-write atomicity, price snapshotting, the preferred-term invariant, and the supplier delete-guard extension are all handled correctly and well-tested. The one known scaling concern is already tracked.
📊 Tokens: 114392 input + 465 output | 💰 Cost: ~$0.5836
Generated by Claude Opus 4.8 via Gitea Actions