feat(master-detail): live Subtotal / Tax / Total stack#1567
Merged
Conversation
When the parent form has a tax-rate field (taxRateField, default 'tax_rate'), MasterDetailForm renders a right-aligned totals stack below the line items — Subtotal (Σ line amounts) → Tax (header rate %) → Total — recomputed live as lines and the rate change. The rate is read via scoped event delegation on the form host (no coupling into ObjectForm internals); the per-grid footer total is subsumed when the stack shows. Live e2e asserts the stack on New Invoice. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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
The last P1 item for the line-item editor: the right-aligned Subtotal / Tax / Total block every invoicing tool shows, computed live during entry.
What
MasterDetailFormrenders a document totals stack under the line items when the parent form has a tax-rate field (taxRateField, defaulttax_rate):The header rate is read live via scoped event delegation on the existing form host (
formHostRef) — no coupling intoObjectForm/FormSchemainternals. When the stack is shown, the per-grid footer total is subsumed. The stack only appears when the tax-rate field is present, so other master-detail forms (e.g. project + tasks) are unaffected.Verification
MasterDetailFormtests pass.🤖 Generated with Claude Code