<%= form_tag({}, :data => {:cm_url => context_menu_operations_path}) do -%> <%= hidden_field_tag 'back_url', url_for(params.respond_to?(:to_unsafe_hash) ? params.to_unsafe_hash : params) %> <%= hidden_field_tag 'project_id', @project.id if @project %>
<% previous_balance = @account.total_amount %> <% @operations.each do |operation| %> <% previous_balance = account_current_balance(previous_balance, operation) %> <% end %>
<%= link_to image_tag('toggle_check.png'), {}, :onclick => 'toggleListSelection(this); return false;', :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %> # <%= l(:label_operation_date) %> <%= l(:label_operation_income) %> <%= l(:label_operation_expense) %> <%= l(:label_account_balance) %> <%= l(:label_operation_category) %> <%= l(:field_description) %> <%= l(:label_contact) %>
<%= check_box_tag("ids[]", operation.id, false, :id => nil) %> <%= link_to operation.id, operation_path(operation) %> <%= link_to format_date(operation.operation_date), operation_path(operation) %> <%= operation.amount_to_s if operation.is_income? %> <%= operation.amount_to_s unless operation.is_income? %> <%= price_to_currency(previous_balance, operation.currency) %> <%= operation.category %> <%= link_to truncate(operation.description, :length => 100), operation_path(operation, :project_id => @project) if operation.description %> <%= contact_tag(operation.contact) unless operation.contact.blank? %>
<%= l(:label_finance_total) %>:<%= @account.debit_to_s %><%= @account.credit_to_s %>
<% end %> <%= context_menu %> <%= javascript_tag "$('.operation_list tr.operation.planned-operation:last').addClass('last');" %>