Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hernandezalek/d778750cc8952ad35383cdcc06045c56 to your computer and use it in GitHub Desktop.
Save hernandezalek/d778750cc8952ad35383cdcc06045c56 to your computer and use it in GitHub Desktop.
<table id="ejemplo">
<thead>
<tr>
<th>N° Factura</th>
<th>Tipo Factura</th>
<th>Cliente</th>
<th>Efectivo</th>
<th>Credito</th>
<th>Ejecutivo/a de venta</th>
</tr>
</thead>
<tbody>
<% if @outputs.any? %>
<% @outputs.each do |output| %>
<tr>
<td><%= output.invoice_number %></td>
<td><%= output.invoice_type.name %></td>
<td><%= output.customer.name %></td>
<td><% if output.payment_type.id == 1 %><%= output.total.to_i %><% else %>0<% end %></td> <td><% if output.payment_type.id == 2 %><%= output.total.to_i %><% else %>0<% end %></td>
<td><%= output.employee.name %></td>
</tr>
<% end %>
<% else %>
<tr>
<td>No se ha encontrado ningun registro</td>
</tr>
<% end %>
</tbody>
<tfoot>
<tr>
<th></th>
<th></th>
<th></th>
<th>Total: <span id="totalEfectivo"></span></th>
<th>Total: <span id="totalCredito"></span></th>
<th ><span id="total"></span></th>
</tr>
</tfoot>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment