mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 03:24:09 +00:00
Some improvements
- Fix issue with lunch flow accounts that were imported - Remove the period comparison section from reports
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user