Skip to main content

Reporting and Forecasting

Reporting should initially be based on views over normalized operational data, not duplicated reporting tables.

Core reporting sources

SourceRole
bank_transaction_splitsActual classified income and expense lines.
rent_installment_linesExpected rent composition.
expected_expensesExpected cost schedule and forecast base.
utility_billsReceived utility bills.
utility_consumptionsConsumption trends and anomaly detection base.
transaction_categoriesAccounting and fiscal grouping.
ViewPurpose
v_property_income_expense_monthlyMonthly actual income and expenses by property and category.
v_property_cashflow_forecastFuture rent and expense cash-flow forecast.
v_tax_report_italy_yearlyYearly Italian tax reporting source.
v_contract_payment_statusContract-level rent status, paid amounts, overdue installments, and partial payments.
v_expense_expected_vs_actualExpected expenses compared with actual matched bank movements.
v_utility_consumption_trendsConsumption trends by property, service, and period.
v_unclassified_bank_transactionsImported transactions requiring classification.

Forecasting model

Forecasting should combine expected future rent from rent_installments and expected future costs from expected_expenses.

Forecast inputDescription
Contract scheduleRent frequency, due day, start/end dates, and active status.
Rent installment linesExpected income/reimbursement composition.
Expected expensesRecurring or one-off cost forecasts.
Category metadataTax relevance, deductibility, and report groups.
Historical actualsSplit-level historical amounts used for averages and anomaly thresholds.

Alerting scenarios

ScenarioDetection source
Rent installment overduerent_installments.status, due_date, and rent_payment_matches.
Expected expense overdueexpected_expenses.status, due_date, and expense_payment_matches.
Bank transaction not classifiedbank_transactions.classification_status.
Bank transaction not reconciledMissing rent or expense match records.
Utility bill higher than expected toleranceutility_bills.total_amount compared with expected_expenses tolerance fields.
Utility consumption anomalyutility_consumptions compared with historical trend.
Expense category exceeds budgetAggregated bank_transaction_splits by category and period.
Contract expiration approachingcontracts.end_date and contracts.status.
Missing document for active contractActive contracts without linked documents.
Tax payment due soonexpected_expenses with tax categories and due dates.

Future optimization

Start with SQL views because they keep reporting close to source data and avoid synchronization bugs. If views become slow, introduce report snapshots or materialized summaries with explicit refresh rules.

Materialized reporting should not replace operational tables. It should be treated as a performance layer built from bank_transaction_splits, expected schedules, utility data, and category metadata.