-
@@ -243,7 +245,11 @@
\ No newline at end of file
diff --git a/app/views/transactions/surveys/index.html.erb b/app/views/transactions/surveys/index.html.erb
index 66defdc0..7e750faa 100644
--- a/app/views/transactions/surveys/index.html.erb
+++ b/app/views/transactions/surveys/index.html.erb
@@ -56,6 +56,7 @@
<% total_female = 0 %>
<% total_local = 0 %>
<% total_customer = 0 %>
+ <% total_foreigner = 0 %>
<% if !@surveys.nil? %>
<% @surveys.each do |survey| %>
<% total_child = total_child.to_i + survey.child.to_i %>
@@ -80,8 +81,11 @@
<% foreigner_lists = foreign.split(",") %>
<% if !foreigner_lists.empty? %>
<% foreigner_lists.each do |fgn| %>
+ <% unless fgn.match(/[^[:digit:]]+/)
+ total_foreigner = total_foreigner.to_i + fgn.to_i
+ end %>
<% if !fgn.scan(/\D/).empty? %>
- <%= fgn %> :<% end %> <%= fgn.to_i unless fgn.match(/[^[:digit:]]+/) %>
+ <%= fgn %> :<% end %> <%= fgn.to_i unless fgn.match(/[^[:digit:]]+/) %>
<% end %>
<% end %>
<% end %>
@@ -97,7 +101,8 @@
<%= total_male %> |
<%= total_female %> |
<%= total_customer %> |
-
<%= total_local %> |
+
<%= total_local %> |
+
<%= total_foreigner %> |