Browse Source

added total of credits, reserved sales and cash dates in ticket and view

Jose Miguel Ledon Nieblas 8 years ago
parent
commit
1fb918552c
2 changed files with 22 additions and 5 deletions
  1. 9 2
      app/controllers/cash_outs_controller.rb
  2. 13 3
      app/views/cash_outs/_form.html.erb

File diff suppressed because it is too large
+ 9 - 2
app/controllers/cash_outs_controller.rb


+ 13 - 3
app/views/cash_outs/_form.html.erb

@@ -19,8 +19,14 @@
         <li class="list-group-item list-group-item"> Efectivo inicial
           <span class="pull-right label label-info"><%= number_to_currency(@initial_cash, precision: 2) %></span>
         </li>
-        <li class="list-group-item list-group-item"> Total de ventas
-          <span class="pull-right label label-info"><%= number_to_currency(@sales_total, precision: 2) %></span>
+        <li class="list-group-item list-group-item"> Ventas de contado
+          <span class="pull-right label label-info"><%= number_to_currency(@cash_sales, precision: 2) %></span>
+        </li>
+        <li class="list-group-item list-group-item"> Apartados<br>(anticipos, abonos y liquidaciones)
+          <span class="pull-right label label-info"><%= number_to_currency(@reserved_sales, precision: 2) %></span>
+        </li>
+        <li class="list-group-item list-group-item"> Abonos a crédito
+          <span class="pull-right label label-info"><%= number_to_currency(@credit_sales, precision: 2) %></span>
         </li>
         <li class="list-group-item list-group-item"> Total de gastos
           <span class="pull-right label label-info"><%= number_to_currency(@expenses_total, precision: 2) %></span>
@@ -124,7 +130,7 @@
           <td><%= key + 1 %></td>
           <td>
             <% case move.concept %>
-              <% when "sale",  "reserved_payment" %>
+              <% when "sale",  "reserved_payment", "reserved_first_payment", "reserved_last_payment" %>
                 <%= move.sale.sale_code %>
               <% when "purchase"%>
                 <%= move.purchase.purchase_code %>
@@ -149,6 +155,10 @@
                 ABONO A CRÉDITO
               <% when "reserved_payment"%>
                 ABONO A APARTADO
+              <% when "reserved_first_payment" %>
+                ANTICIPO DE APARTADO
+              <% when "reserved_last_payment" %>
+                LIQUIDACIÓN DE APARTADO
             <% end %>
           </td>
           <td><%= l(move.created_at, :format => '%I:%M %p') %> </td>