Comisión

<%= link_to commissions_path(:filter => @filter, :current_page => @current_page), {:class=>"fr-space btn blue-hoki "} do %> Regresar <% end %>
<% if success %>

<%= success %>

<% elsif warning %>

<%= warning %>

<% end %>
Detalles de comisión
<% @commission.sellerscommissions.each_with_index do |seller_commission, key| %> <% end %>
# Vendedor Ventas Productos vendidos Total de ventas Comisión sugerida Comision pagada
<%= key +1%> <%= seller_commission.seller.name %> <%= seller_commission.num_sales.round %> <%= seller_commission.num_products.round %> <%= number_to_currency(seller_commission.sales_total, precision: 2) %> <%= number_to_currency(seller_commission.commission_calculated, precision: 2) %> <%= number_to_currency(seller_commission.commission_paid, precision: 2) %>
<% @sales.each_with_index do |sale, key| %> <% end %>
# Folio Fecha Total Tipo de venta Vendedor
<%= key + 1 %> <%= sale.sale_code %> <%= l(sale.date_sale, :format => '%d/%m/%Y') %> <%= number_to_currency(sale.total, precision: 2) %> <% if sale.saletype == "credit" && sale.credit_note.blank? %> Crédito <% elsif sale.saletype == "credit" && sale.credit_note.present? %> Crédito/vale <% elsif sale.saletype == "cash"%> Contado <% elsif sale.saletype == "reserved"%> Apartado <% end %> <%= sale.seller.name %>