<%= form_for(@cash_out, :remote => true, :html => {:class=>"form-horizontal", :id=> "cash_out_form"}) do |f| %>
<%= hidden_field_tag 'open_cash_register_id', @opened_cash_register.id %> <%= hidden_field_tag 'cash_payment_id', @cash_payment_method_id %>
<%= f.label :received_by_id, "Recibe", {:class=>"col-md-3 control-label"} do %> Recibe * <% end %>
<%= f.collection_select :received_by_id, User.where(:pointsale_id => current_user.pointsale_id), :id, :userid, {:prompt => "Seleccione" }, {:class => "form-control select2"} %>

Resumen

  • Efectivo inicial <%= number_to_currency(@initial_cash, precision: 2) %>
  • Ventas de contado <%= number_to_currency(@cash_sales, precision: 2) %>
  • Apartados
    (anticipos, abonos y liquidaciones) <%= number_to_currency(@reserved_sales, precision: 2) %>
  • Abonos a crédito <%= number_to_currency(@credit_sales, precision: 2) %>
  • Total de egresos <%= number_to_currency(@expenses_total, precision: 2) %>
<%= f.label :physical_cash, {:class=>"col-md-4 control-label"} do %>Efectivo en caja* <% end %>
$ <%= f.text_field :physical_cash, {:class=>"form-control mask_decimal"} %>
Es el dinero que se tiene físicamente en caja.
<%= f.label :received_cash, {:class=>"col-md-4 control-label"} do %>Retiro de efectivo* <% end %>
$ <%= f.text_field :received_cash, {:class=>"form-control mask_decimal", :onkeyup => "receivedAndFundCash()", :disabled => true} %>
<%= f.label :cash_fund, {:class=>"col-md-4 control-label"} do %>Fondo de caja* <% end %>
$ <%= text_field_tag :cash_fund_display, '', class: "form-control mask_decimal", disabled: true %> <%= f.hidden_field :cash_fund, {:class=>"form-control mask_decimal"} %>
<%= f.label :observations, {:class=>"col-md-4 control-label"} do %>Observaciones <% end %>
<%= f.text_area :observations, {:class=>"form-control", :rows=>5 } %>
<% @payments.each_with_index do |payment, key| %> <%= f.fields_for :cash_out_details do |ff| %> <%= ff.hidden_field :payment_method_id, :value => payment["payment_method_id"] %> <%= ff.hidden_field :incoming, :value => payment["incoming"] %> <%= ff.hidden_field :outgoing, :value => payment["outgoing"] %> <%= ff.hidden_field :total, :value => payment["total"] %> <% end %> <% end %>
# Método de pago Total de ingresos (ventas) Total de egresos (gastos) Total (ventas y efectivo inicial)
<%= key +1 %> <%= payment["method"] %> <%= number_to_currency(payment["incoming"], precision: 2) %> <%= number_to_currency(payment["outgoing"], precision: 2) %> <%= number_to_currency(payment["total"], precision: 2) %> " id="<%= key + 1 %>">

Ingresos del día

<% @incomings.each_with_index do |move, key| %> > <% end %>
# Folio Caja registradora Método de pago Cantidad Concepto Hora
<%= key += 1 %> <%= move_concept_folio(move) %> <%= move.open_cash_register.cash_register.name %> <%= move.payment_method.method %> <%= number_to_currency(move.quantity, precision: 2) %> <%= cash_move_type(move) %> <%= l(move.created_at, format: '%I:%M %p') %>

Egresos del día

<% @outgoings.each_with_index do |move, key| %> <% end %>
# Folio Caja registradora Método de pago Cantidad Concepto Hora
<%= key + 1 %> <%= move_concept_folio(move) %> <%= move.open_cash_register.cash_register.name %> <%= move.payment_method.method %> <%= number_to_currency(move.quantity, precision: 2) %> <% case move.concept %> <% when "sale" %> <% if move.sale.cash? %> VENTA CANCELADA <% elsif move.sale.reserved? %> APARTADO CANCELADO <% end %> <% when "purchase" %> COMPRA <% when "expense" %> <%= move.expense.expensesconcept.name %>
<%= move.expense.observations %> <% when "credit_payment" %> ABONO CANCELADO <% end %>
<%= l(move.created_at, :format => '%I:%M %p') %>
<%= link_to 'Cancelar', root_path, { class: "btn default" } %>
<% end %>