>
|
<%= link_to report.id, edit_soft_path(report), :target => 'blank' %>
|
<%= report.department %> |
<%= report.category_name %> |
<%= report.name %> |
<%= link_to_function attr_for_edit(report.pay_name), "new_attr(#{report.id}, 'pay_name')" %> |
<%= link_to_function attr_for_edit(report.inn), "new_attr(#{report.id}, 'inn')" %> |
<%= Russian::strftime(report.date.to_date) %> |
<%= report.done_employees.map{|i| i.empl_name}.join(', ')%> |
<%= report.total_sum_get_money%> |
<%= report.finn_money%> |
<%= if report.get_money_status == 2 then (report.total_sum_get_money.to_f - report.finn_money.to_f) else 0 end %> |
<%= report.get_money_status_form %>
<%= (button_to_remote "Отказались платить", :url => { :action => "change_get_money_status", :id => report.id, :get_money_status => 3}, :confirm => "Сменить статус?") if report.get_money_status.to_i == 1 || report.get_money_status.to_i == 0 %>
<%= (button_to_remote "Остаток это процент", :url => { :action => "change_get_money_status", :id => report.id, :finn_closed => true, :get_money_status => 2}, :confirm => "Поступлений больше не ожидается?") if report.get_money_status.to_i == 4 && report.money_type.to_i == 6 %>
<%= (button_to_remote "Удалить процент", :url => { :action => "change_get_money_status", :id => report.id, :finn_closed => false, :get_money_status => 4}, :confirm => "Процент был указан неверно?") if report.get_money_status.to_i == 2 && report.money_type.to_i == 6 %>
<%= (button_to_remote "Не оплачено", :url => { :action => "change_get_money_status", :id => report.id, :get_money_status => 0}, :confirm => "Сменить статус?") if report.get_money_status.to_i == 3 %>
|
<%= link_to_function (report.com_buh.to_s.blank? ? "Добавить" : report.com_buh.to_s), "new_attr(#{report.id}, 'com_buh')" %> |
<%= link_to_remote "Редактировать", :url => { :action => "edit_payment", :id => report.id}%> |
<% end %>