Files
sure/app/models
LPW bbaf7a06cc Add cost basis source tracking with manual override and lock protection (#623)
* Add cost basis tracking and management to holdings

- Added migration to introduce `cost_basis_source` and `cost_basis_locked` fields to `holdings`.
- Implemented backfill for existing holdings to set `cost_basis_source` based on heuristics.
- Introduced `Holding::CostBasisReconciler` to manage cost basis resolution logic.
- Added user interface components for editing and locking cost basis in holdings.
- Updated `materializer` to integrate reconciliation logic and respect locked holdings.
- Extended tests for cost basis-related workflows to ensure accuracy and reliability.

* Fix cost basis calculation in holdings controller

- Ensure `cost_basis` is converted to decimal for accurate arithmetic.
- Fix conditional check to properly validate positive `cost_basis`.

* Improve cost basis validation and error handling in holdings controller

- Allow zero as a valid cost basis for gifted/inherited shares.
- Add error handling with user feedback for invalid cost basis values.

---------

Co-authored-by: Josh Waldrep <joshua.waldrep5+github@gmail.com>
2026-01-12 14:05:46 +01:00
..
2025-03-28 13:08:22 -04:00
2025-10-22 19:14:03 +02:00
2025-12-07 18:11:34 +01:00
2025-11-24 17:54:18 +01:00
2026-01-09 19:38:04 +01:00
2025-11-27 15:24:34 +01:00
2026-01-09 19:38:04 +01:00
2026-01-10 15:43:07 +01:00
2024-02-02 09:05:04 -06:00
2024-10-18 11:26:58 -05:00
2026-01-09 19:38:04 +01:00
2024-10-18 11:26:58 -05:00
2024-11-08 09:58:35 -06:00
2024-08-23 10:06:24 -04:00
2025-05-23 18:58:22 -04:00
2025-11-25 20:21:29 +01:00
2024-08-23 09:33:42 -04:00
2025-11-01 09:12:42 +01:00
2025-10-28 19:32:27 +01:00
2025-11-22 02:14:29 +01:00
2026-01-08 15:20:14 +01:00
2026-01-09 19:38:04 +01:00
2025-11-25 20:21:29 +01:00
2024-05-23 08:09:33 -04:00
2025-03-28 13:08:22 -04:00