<%= check_box_tag dom_id(entry, "selection"),
disabled: transaction.transfer.present?,
class: "checkbox checkbox--light",
@@ -91,20 +91,22 @@
<%= render "transactions/transaction_category", transaction: transaction %>
+
<%= content_tag :p,
transaction.transfer? && view_ctx == "global" ? "+/- #{format_money(entry.amount_money.abs)}" : format_money(-entry.amount_money),
class: ["text-green-600": entry.amount.negative?] %>
-
- <% if balance_trend&.trend %>
- <%= tag.p format_money(balance_trend.trend.current),
+ <% if view_ctx != "global" %>
+
+ <% if balance_trend&.trend %>
+ <%= tag.p format_money(balance_trend.trend.current),
class: "font-medium text-sm text-primary" %>
- <% elsif view_ctx != "global" %>
- <%= tag.p "--", class: "font-medium text-sm text-gray-400" %>
- <% end %>
-
+ <% else %>
+ <%= tag.p "--", class: "font-medium text-sm text-gray-400" %>
+ <% end %>
+
+ <% end %>