% content_for :head do %> <%= javascript_include_tag "table2CSV"%> <% end %> <% form_tag "" do %> <%= stylesheet_link_tag "filters" , :media => "all"%>
| Сотрудник | Должность | Оклад в месяц | Стоимость смены | Количество смен | За смены/Оклад | Количество отчетов | По отчетам за работы (руб.) | Итого |
|---|---|---|---|---|---|---|---|---|
| <%=e.nic%> | <%=e.position_name%> | <%=c=e.oklad%> | <%=n_c e.shift_wage if e.static_sum != 1%> | <%= e.shifts_size %> | ><%=n_c a = (if e.static_sum == 1 then e.oklad else e.shift_wage.to_f * e.shifts_size end) %> | <%=e.report_size.to_s%> | <%=e.sum.to_f.round()%> | <%=(e.sum.to_f + a.to_f).round()%> |
| Итого: | <%=@d_employees.sum{|i| i.oklad.to_f}.round %> | <%=@d_employees.sum{|i| i.shift_wage.to_f}.round %> | <%=@d_employees.sum{|i| i.shifts_size.to_i}.round %> | <%=all_oklad.round %> | <%=@d_employees.sum{|i| i.report_size.to_i}.round %> | <%=all_sum = @d_employees.sum{|i| i.sum.to_f}.round %> | <%=(all_oklad.to_i + all_sum).round %> | |