<%= form_tag transactions_credit_notes_path, :method => :get do %>

<% end %>
<% if @sales != 0 %> <% @sales.each do |sale| %> <% end %> <% else %> <% end %>
<%= t("views.right_panel.detail.sale_id") %> <%= t("views.right_panel.detail.receipt_no") %> <%= t("views.right_panel.detail.credit_amount") %> <%= t :cashier %> <%= t :customer %> <%= t("views.right_panel.detail.name") %> <%= t("views.right_panel.detail.receipt_date") %>
<%= link_to sale.sale_id, transactions_sale_path(sale) %> <%= sale.receipt_no %> <%credit = SalePayment.where('sale_id = ? AND payment_method=?', sale.sale_id,"creditnote").first %> <%= credit.payment_amount rescue '-' %> <%= sale.cashier_name rescue '-' %> <%= link_to sale.customer.name, crm_customer_path(sale.customer_id) %> <%= sale.receipt_date.strftime("%d-%m-%Y") %>

<%= t("views.right_panel.detail.no_data_txt") %>....