| 1234567891011121314151617181920212223242526 |
- <tr class=<%= (sale.cancelled? ? 'danger' : '') %>>
- <td><%= sale.sale_code %> </td>
- <td> <%= l(sale.date_sale, :format => '%d/%B/%Y') %> </td>
- <td> <%= l(sale.expiration_date, :format => '%d/%B/%Y') %> </td>
- <td> <%= sale.products.count %> </td>
- <td>
- <% if sale.reserve_is_expired? %>
- <span class="label label-warning"> VENCIDO </span>
- <% elsif sale.cancelled? %>
- <span class="label label-danger"> CANCELADO </span>
- <% elsif sale.parcial? %>
- <span class="label label-success"> VIGENTE </span>
- <% elsif sale.paid? %>
- <span class="label label-success"> PAGADO </span>
- <% end %>
- </td>
- <td><%= number_to_currency(sale.total, precision: 2) %></td>
- <td><%= number_to_currency(sale.reserve_debt, precision: 2) %></td>
- <td>
- <% if !sale.cancelled_by_expiration? && sale.parcial? %>
- <%= link_to sale_liquidate_reserve_path(sale), :remote => true, :class=>"btn btn-icon-only green-dark", :title=>"Liquidar apartado" do %>
- <i class="fa fa-dollar"></i>
- <% end %>
- <% end %>
- </td>
- </tr>
|