| <%=link_to e.login, soft_index_path(:filter_empl => e.id, :filter_month => @date.to_date.month, :filter_year => @date.to_date.year, :filter_status => 2, :filter_weld => params[:filter_weld]), :target => '_blank' %> |
<%= @payroll[:smen_work] if @payroll%> |
<%= @payroll[:smen_disp] if @payroll %> |
<%= @payroll[:rep_count] if @payroll %> |
<%= @payroll[:bonus] if @payroll %> |
<%= reps.select{|i| i.weld != 1}.size %> |
<%= reps.size %> |
<%=link_to reps.select{|i| i.total_sum_get_money.to_i == 0}.count, soft_index_path(:filter_empl => e.id, :filter_month => @date.to_date.month, :filter_year => @date.to_date.year, :filter_status => 2, :sum_works_to => 0), :target => '_blank' %> |
<%=n reps.sum{|i| i.total_sum_get_money.to_f} %> |
<%=n all_money_w=reps.sum{|i| i.total_sum_works.to_f} %> |
<%=n all_money_m=reps.sum{|i| i.total_sum_materials.to_f} %> |
<%=n reps.sum{|i| i.disp_wage.to_f} %> |
<%= cl_w = (reps_only_clients.sum{|i| i.total_sum_works.to_f}/reps_only_clients.select{|i| i.total_sum_works.to_f > 0}.size).to_i if reps_only_clients.select{|i| i.total_sum_works.to_f > 0}.size > 0 %> |
<%= cl_m = (reps_only_clients.sum{|i| i.total_sum_materials.to_f}/reps_only_clients.select{|i| i.total_sum_materials.to_f > 0}.size).to_i if reps_only_clients.select{|i| i.total_sum_materials.to_f > 0}.size > 0 %> |
<%=n (if @payroll then fast = @payroll[:sum] else fast = 0 end)%> |
<%=n sum_for_works.to_f - bonus_for_mats.to_f %> |
<%=n bonus_for_mats + (if @payroll then @payroll[:bonus_sale].to_f else 0 end)%> |
<%=n fast + sum_for_works.to_f + (if @payroll then @payroll[:bonus_sale].to_f + @payroll[:bonus].to_f else 0 end) %> |
<%=n f = ( fines_de.size > 0 ? (fines_de.sum{|i| i.zp_fine_sum.to_f}) : 0) %> |
<% fines += f %>
<% all_cl_w += cl_w.to_f %>
<% all_cl_m += cl_m.to_f %>
<% end -%>
<% all_count_w = @reports.select{|i| i.total_sum_works.to_f > 0}.count%><% all_count_m = @reports.select{|i| i.total_sum_materials.to_f > 0}.count%>
| <%= link_to "Итого", soft_index_path(:filter_month => @date.to_date.month, :filter_year => @date.to_date.year, :filter_status => 2), :target => '_blank'%> |
<%=n @payrolls.map{|i| i[:smen_work]}.sum %> |
<%=n @payrolls.map{|i| i[:smen_disp]}.sum %> |
<%=n @payrolls.map{|i| i[:rep_count]}.sum %> |
<%=n @payrolls.map{|i| i[:bonus]}.sum %> |
<%=n @reports.select{|i| i.weld != 1}.flatten.size%> |
<%=n @reports.size%> |
<%=link_to @reports.select{|i| i.total_sum_get_money.to_i == 0}.count, soft_index_path(:filter_month => @date.to_date.month, :filter_year => @date.to_date.year, :filter_status => 2, :sum_works_to => 0), :target => '_blank'%> |
<%=n @reports.sum{|i| i.total_sum_get_money.to_f} %> |
<%=n all_money_w=@reports.sum{|i| i.total_sum_works.to_f} %> |
<%=n all_money_m=@reports.sum{|i| i.total_sum_materials.to_f} %> |
<%=n @reports.sum{|i| i.disp_wage.to_f} %> |
<%= (all_cl_w.to_f / employees_with_clients_size).to_i if employees_with_clients_size > 0 %> |
<%= (all_cl_m.to_f / employees_with_clients_size).to_i if employees_with_clients_size > 0 %> |
<%=n @payrolls.map{|i| i[:sum]}.sum%> |
<%=n @reports.sum(&:sum) - @reports.map{|i| i.done_materials.map{|i| i.bonus_sale.to_f}}.flatten.sum %> |
<%=n @payrolls.map{|i| i[:bonus_sale]}.sum + @reports.map{|i| i.done_materials.map{|i| i.bonus_sale.to_f}}.flatten.sum %> |
<%=n @reports.sum(&:sum)+@payrolls.map{|i| i[:bonus_sale]}.sum%> |
<%=n fines%> |