diff --git a/app/views/reports/_breakdown_table.html.erb b/app/views/reports/_breakdown_table.html.erb index 4d456317f..e312465ae 100644 --- a/app/views/reports/_breakdown_table.html.erb +++ b/app/views/reports/_breakdown_table.html.erb @@ -51,8 +51,8 @@ %> <% end %> <% if idx < group.size - 1 %> - <%= render "shared/ruler", classes: "mx-3 lg:mx-4" %> - <% end %> + <%= render "shared/ruler", classes: "mx-3 lg:mx-4" %> + <% end %> <% end %> <% end %> diff --git a/app/views/reports/_trends_insights.html.erb b/app/views/reports/_trends_insights.html.erb index 9ad002c94..bcd2de789 100644 --- a/app/views/reports/_trends_insights.html.erb +++ b/app/views/reports/_trends_insights.html.erb @@ -6,43 +6,44 @@ <% if trends_data.any? %> -
- - - - - - - - - - - - <% trends_data.each do |trend| %> - "> - - - - - - + + + <% if idx < trends_data.size - 1 %> + <%= render "shared/ruler", classes: "mx-3 lg:mx-4" %> + <% end %> <% end %> - -
<%= t("reports.trends.month") %><%= t("reports.trends.income") %><%= t("reports.trends.expenses") %><%= t("reports.trends.net") %><%= t("reports.trends.savings_rate") %>
+
+
+
+
<%= t("reports.trends.month") %>
+
<%= t("reports.trends.income") %>
+
<%= t("reports.trends.expenses") %>
+
<%= t("reports.trends.net") %>
+
<%= t("reports.trends.savings_rate") %>
+
+
+ <% trends_data.each_with_index do |trend, idx| %> +
+
"> <%= trend[:month] %> <% if trend[:is_current_month] %> - (<%= t("reports.trends.current") %>) + (<%= t("reports.trends.current") %>) <% end %> -
+ +
<%= Money.new(trend[:income], Current.family.currency).format %> -
+ +
<%= Money.new(trend[:expenses], Current.family.currency).format %> -
"> + +
"> <%= Money.new(trend[:net], Current.family.currency).format %> -
"> + +
"> <% savings_rate = trend[:income] > 0 ? ((trend[:net].to_f / trend[:income].to_f) * 100).round(1) : 0 %> <%= savings_rate %>% -
+
+ <%# Trend Insights %>