Some improvements

- Fix issue with lunch flow accounts that were imported
- Remove the period comparison section from reports
This commit is contained in:
sokie
2025-11-11 09:42:59 +01:00
parent 7f5cf4c082
commit 1925b4ce39
7 changed files with 6 additions and 319 deletions

View File

@@ -25,9 +25,6 @@ class ReportsController < ApplicationController
# Calculate summary metrics
@summary_metrics = build_summary_metrics
# Build comparison data
@comparison_data = build_comparison_data
# Build trend data (last 6 months)
@trends_data = build_trends_data
@@ -195,25 +192,6 @@ class ReportsController < ApplicationController
nil
end
def build_comparison_data
currency_symbol = Money::Currency.new(Current.family.currency).symbol
# Totals are BigDecimal amounts in dollars - pass directly to Money.new()
{
current: {
income: @current_income_totals.total,
expenses: @current_expense_totals.total,
net: @current_income_totals.total - @current_expense_totals.total
},
previous: {
income: @previous_income_totals.total,
expenses: @previous_expense_totals.total,
net: @previous_income_totals.total - @previous_expense_totals.total
},
currency_symbol: currency_symbol
}
end
def build_trends_data
# Generate month-by-month data based on the current period filter
trends = []