<% content_for :head do %> <%= stylesheet_link_tag "filters" , :media => "all"%> <%= stylesheet_link_tag "index" , :media => "all"%> <%= javascript_include_tag "table2CSV"%> <%= stylesheet_link_tag "DataTables" , :media => "all"%> <%= javascript_include_tag "jquery.dataTables"%> <%= javascript_include_tag "datatable"%> <%= javascript_include_tag "dataTables.numericComma"%> <%= javascript_include_tag "multiple-select" %> <%= stylesheet_link_tag "multiple-select" , :media => "all" %> <% end %>
<% form_tag do -%> <%= label_tag 'Дата с:' %><%= calendar_field_tag 'date_from', Russian::strftime(@date_from), { :class => 'plaintext', :size=> 9 }, {} %> <%= label_tag 'Дата по:' %><%= calendar_field_tag 'date_to', Russian::strftime(@date_to), { :class => 'plaintext', :size=> 9 }, {} %>
Тип заявки: <%= select_tag(:filter_weld, options_for_select([["Обычная", 0], ["СГ-Фаст", 1]].insert(0, ['--- Все ---', 17]), if params[:filter_weld] then params[:filter_weld].to_i else 17 end)) %> Корпы/Все: <%= select_tag(:filter_corp, options_for_select([["Все корпы", 1], ["Только корпы с деньгами", 2]].insert(0, ['--- Все отчеты---', 17]), if params[:filter_corp] then params[:filter_corp].to_i else 17 end)) %> <%= select_tag("category_ids", options_for_select((Category.soft - (Category.find 26, 27, 93, 106, 107)).map{|i| [i.name, i.id]}, params[:category_ids].to_a.map{|i| i.to_i}), {:multiple => true, :class =>"multiple"}) %>
<%= submit_tag "Выбрать"%>
<% end %>

Повторные обращения клиентов

<% for report in @reports do%> <% end %>
Логин Тип клиента Всего отчётов Из них отчетов с деньгами На сумму
<%=link_to report.name, soft_index_path(:filter_year => 0, :cl_login => report.name), :target => '_blank' %> <%=report.client_type_name %> <%=link_to(report.soft_reps, {:controller => "soft", :action => "search", :s => report.name, :date_from =>(@date_from), :date_to =>@date_to, :division => "soft"}, {'target'=>'_blank'}) %> <%= report.soft_reps_with_money %> <%= report.soft_sum %>