From d4bfcfb6f4786b00ee7b2b5d655f204839a6e18f Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Thu, 17 Oct 2024 10:52:04 -0500 Subject: [PATCH] Fix for transaction drawer securities missing prices Fixes #1321 --- app/views/account/trades/show.html.erb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/views/account/trades/show.html.erb b/app/views/account/trades/show.html.erb index 7293f731..0f07e9ad 100644 --- a/app/views/account/trades/show.html.erb +++ b/app/views/account/trades/show.html.erb @@ -41,12 +41,14 @@ <% end %> -
-
<%= t(".current_market_price_label") %>
-
<%= format_money trade.security.current_price %>
-
+ <% if trade.security.current_price.present? %> +
+
<%= t(".current_market_price_label") %>
+
<%= format_money trade.security.current_price %>
+
+ <% end %> - <% if trade.buy? %> + <% if trade.buy? && trade.unrealized_gain_loss.present? %>
<%= t(".total_return_label") %>