utilities_report.js.erb 663 B

123456789101112131415
  1. var utility_table = $('#utility_report_table').DataTable();
  2. $('#utility_report_table').dataTable().fnClearTable();
  3. <% @sales.each_with_index do |sale, key| %>
  4. var row = $('<%= j render partial: "report_utilities", locals: { sale: sale } %>');
  5. utility_table.row.add(row).draw();
  6. <% end %>
  7. $('#start_date_display').html("<%= l @start_date.to_date, format: :long %>");
  8. $('#end_date_display').html("<%= l @end_date.to_date, format: :long %>");
  9. $('#note_info').removeClass('hidden');
  10. $('#prods_total').html('<%= @total_prods.to_i %>');
  11. $('#sales_quantity').html('<%= @sales.count %>');
  12. $('#total_utility').html(accounting.formatMoney('<%= @total_utility %>'));