Double entry accounting milestone 8 - #89
Merged
chongfun merged 2 commits intoAug 24, 2026
Merged
Conversation
…views - Add database composite reporting indexes on postings and journal_entries for performant multidimensional queries - Replace legacy domain queries with immutable double-entry ledger queries (deprecating Properties::FinancialItemsQuery and Properties::ActiveYearsQuery) - Implement core accounting reporting primitives: * Accounting::DateRange with range_mode parameter handling, single-year resolution, and bounded from-only queries * Accounting::NaturalBalance for normal-balance conversions across asset, liability, equity, income, and expense accounts * Accounting::AccountBalanceQuery for multidimensional point-in-time balance calculations * Accounting::ActiveYearsQuery deriving active reporting years from journal entries - Implement operational reporting queries and projectors: * Accounting::ActivityRow and Accounting::ActivityProjector for projecting journal entries into domain-rich activity rows with as-of lifecycle awareness (distinguishing charge waivers from bookkeeping corrections) * Accounting::PropertySummaryQuery for property financial summaries with exact Net Cash Movement and signed income/expense recognition * Accounting::PropertyLedgerQuery for property-level chronological ledger activity * Accounting::TenantReceivableActivityQuery for tenant receivable subledger statements with running balances * Accounting::TenancyActivityQuery for full tenancy financial activity including security deposit custody events * Accounting::RecentTenantReceivableActivityQuery for bounded O(1) memory recent activity rendering * Accounting::AccountActivityQuery with eager loading to prevent N+1 queries across row associations - Build and update reporting views and controllers: * Chart of Accounts index and show pages (AccountsController, views/accounts) with point-in-time balances and dimension filtering * Journal Entry audit page (JournalEntriesController, views/journal_entries/show) with two-way reversal navigation * Property financial dashboard partial (views/properties/_financials) with Net Cash Movement, valid date range guards, and Schedule E links * Tenancy statement page (views/tenancies/statement) with tabbed switching between Tenant Receivable Statement and All Financial Activity * Recent activity cards on Tenancy and Property show pages
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.
Replace operational reporting like this:
with:
The ledger answers:
The domain source still answers:
That is the PRD's intended boundary: domain records explain why, ledger records explain the financial effect.