- Wrap KDocument write ops (update/supersede/createMany) in $transaction
- Fix BOX_KEY_TO_K1DATA_FIELD: 4c → 4, L_CAPITAL_CONTRIBUTED → L_CONTRIBUTED
- Fix customLabel logic: use ?? instead of ternary to preserve override value
- Fix getSectionLabel() to match actual K1BoxSection enum values from backend
- Replace $executeRawUnsafe with $executeRaw; fix total_amount type to string
- Remove agg.breakdown template refs to match simplified {name,value} type
Co-authored-by: RobertgPatch <5817970+RobertgPatch@users.noreply.github.com>
Agent-Logs-Url: https://github.com/RobertgPatch/portfolio-management/sessions/784d8100-7260-4f87-ac51-662285407c97
- Add K1BoxDefinition, K1LineItem, K1AggregationRule, PartnershipMembership, PartnershipValuation models
- Replace CellMapping with K1BoxDefinition module (IRS box definitions + 15 aggregation rules)
- Add K1MaterializedView service for partnership schedule rollups
- Expand aggregation rules from 3 to 15 on frontend verification page
- Fix box key 4c -> 4b in Guaranteed Payments and Total K-1 Income rules
- Add box 19 to Total Distributions rule sourceBoxKeys
- Add Cell Mapping page with aggregation rules table and IRS box definitions
- Fix Cell Mapping page routing (was falling through to wildcard)
- Add Material Icons font to index.html
- Fix text cut-off in K-Document form section titles
- Fix table column widths on K1 Import History page
- Add BOX_KEY_TO_K1DATA_FIELD mapping for confirm pipeline
- Add distribution creation fallback (box 19 total / L_WITHDRAWALS)
- Auto-populate membership capital and partnership valuation on confirm
- Improve 'no active members' error message with tax year context
- Add Prisma migrations for normalized model, drop cell-mapping, widen precision, materialized views
- Add spec 006 documentation and test fixtures
- Rewrote k1-position-regions.ts with all coordinates measured from
actual e-filed K-1 PDF via pdfjs-dist text position extraction
- Fixed all y-coordinate offsets (header, Part I/II, sections J-N, Part III)
- Added missing regions: J_EXCHANGE, BOX_22, BOX_23, H2_DE_TIN
- Set clean column boundaries (left values x=370-445, right code x=445-510,
right values x=510-600) to prevent cross-column matching
- Reordered extraction: checkboxes now run before Part III to prevent
BOX_16_K3 checkbox X from being grabbed as a BOX_16 value
- Fixed stale fieldId refs: D_PARTNER_EIN->E_TIN, E_NAME->F_NAME_ADDR
- Removed SSL from client serve config for local HTTP development
- Changed API rootUrl from https to http for dev environment
- Added tools/extract-k1-positions.mjs utility for PDF coordinate dumps
- Update pdf-parse usage from v1 to v2 API (PDFParse class with getText())
- Fix Prisma relation names: memberships -> members, isActive -> endDate: null
- Remove unused imports, variables, and service injections
- Fix noUnusedLocals/noUnusedParameters violations across 9 files