Make the total match the submitted line items
Three items at 19.99 sometimes display extra decimal digits. Finance also found a preview total that differed from the payload after a quantity edit.
- Focused work estimate
- 2h + prerequisites
- Priority in the scenario
- High
- Engineering practice
- Money arithmetic · Data modeling · Boundary testing
Estimated field mix
- Frontend100%
Field percentages are editorial estimates of the ticket's engineering focus. They total 100%; they are not measured time, proficiency scores, or ownership evidence.
Review it, then add it to your workspace.
The board opens an editable draft; nothing is saved until you confirm it. Sign-in and workspace permissions apply, and Demo boards remain ephemeral.
Project context
The fictional Beacon operations team buys equipment through a browser form. Finance checks totals, departments, and quotes. Scope is one currency per request and an approval API contract; payments and accounting integration are excluded.
Setup prerequisites
- Synthetic department and cost-center directory
- Draft, submission, and approval API fixtures
Preceding work
No earlier ticket is required. Complete the project setup above.
Acceptance criteria
- One calculation path derives display and payload totals from integer minor units.
- Fractional quantities, negative prices, overflow, and mixed currencies are rejected.
- Editing or removing a line immediately updates the same total.
Implementation constraints
- Document the fixed two-decimal practice currency and rounding rule; conversion is excluded.
Verification to include
- Enter three units at 19.99 and compare preview and payload at 59.97.
- Try overflow and negative amounts; submission is blocked with field errors.
Deliverables
- Pure total calculator and boundary fixtures
Rollout and recovery
Compare old and new totals on synthetic requests; block submission rather than use inaccurate arithmetic on mismatch.
Value of the work
For the engineer: Practice form modeling, exact totals, revision handling, and collaboration under failure.
For the team: Inspect whether a developer protects business workflows from duplicate, lost, or misleading submissions.
Evidence boundaries
Outcome Evidence: Tests, patches, and runbooks are requested deliverables. They become Outcome Evidence only through a qualified Mission and immutable Evidence IDs.
Ownership Evidence: Independent adaptation must be observed under a declared verification policy and cite immutable Evidence IDs. Completing a planning ticket establishes no Ownership Evidence.