From 3ef122b8f3c89008a56f81ae19ee3160f76ed76b Mon Sep 17 00:00:00 2001 From: phyusin Date: Tue, 12 Dec 2017 16:11:32 +0630 Subject: [PATCH] check card in dashboard --- app/views/home/dashboard.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/home/dashboard.html.erb b/app/views/home/dashboard.html.erb index b6f597ce..d48c0b9f 100755 --- a/app/views/home/dashboard.html.erb +++ b/app/views/home/dashboard.html.erb @@ -161,7 +161,9 @@ <%= t("views.right_panel.detail.card_sale") %> : <% total_card = @sale_data.select { |hash| hash["card"]!=nil }.first %> - <%= total_card["card"].to_f %> + <% if total_card["card"] !=nil %> + <%= total_card["card"].to_f %> + <% end %> <% end %>