diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a86e374e..1602931c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -110,7 +110,7 @@ module ApplicationHelper private def calculate_total(item, money_method, negate) - items = item.reject { |i| i.respond_to?(:entryable) && i.entryable.transfer? } + items = item.reject { |i| i.respond_to?(:entryable) && i.entryable.transfer.present? } total = items.sum(&money_method) negate ? -total : total end diff --git a/app/models/transaction/transferable.rb b/app/models/transaction/transferable.rb index d839047a..cea7978b 100644 --- a/app/models/transaction/transferable.rb +++ b/app/models/transaction/transferable.rb @@ -14,10 +14,6 @@ module Transaction::Transferable transfer_as_inflow || transfer_as_outflow end - def transfer? - transfer.present? - end - def transfer_match_candidates candidates_scope = if self.entry.amount.negative? family_matches_scope.where("inflow_candidates.entryable_id = ?", self.id) diff --git a/app/views/category/dropdowns/show.html.erb b/app/views/category/dropdowns/show.html.erb index 4329918f..6af8ba45 100644 --- a/app/views/category/dropdowns/show.html.erb +++ b/app/views/category/dropdowns/show.html.erb @@ -9,81 +9,81 @@ class="bg-container placeholder:text-sm placeholder:text-secondary font-normal h-10 relative pl-10 w-full border-none rounded-lg focus:outline-hidden focus:ring-0" data-list-filter-target="input" data-action="list-filter#filter"> - <%= icon("search", class: "absolute inset-0 ml-2 transform top-1/2 -translate-y-1/2") %> + <%= icon("search", class: "absolute inset-0 ml-2 transform top-1/2 -translate-y-1/2") %> + - -