Reportes

Reporte por factura


<% if @collection %> <% @collection.each do |invoice| %> <% year = invoice.created_at.year month = "%02d" % invoice.created_at.month day = "%02d" % invoice.created_at.day hour = "%02d" % invoice.created_at.hour mins = "%02d" % invoice.created_at.min secs = "%02d" % invoice.created_at.sec %> <% litrostotales = (invoice.subtotal.to_f / invoice.price.to_f).round() %> <%end%> <%end%>
Fecha Hora Cliente Serie Folio UUID Fiscal Litros facturados Precio p/litro Descuento p/litro ยข Descuento total Subtotal IVA Total Estado de la factura Estado de pago Ver
<%= "#{year}-#{month}-#{day}" %> <%= "#{hour}:#{mins}:#{secs}" %> <%= invoice.debtor.name %> <%= invoice.serie %> <%= invoice.folio %> <%= invoice.uuid %><%= litrostotales %> <%= '%.6f' % invoice.price %> <%= invoice.discount.to_i %> <%= '%.2f' % ((litrostotales)*(invoice.discount/100)).to_f %> <%= '%.2f' % invoice.subtotal %> <%= '%.2f' % invoice.iva %> <%= '%.2f' % invoice.total %> <%= getInvoiceStatus invoice.invoice_status %> <%= getPaymentStatus invoice.paid_status %> <%= getInvoiceNumberWithId invoice.id %> - <%= getPdfWithId invoice.id %> - <%= getXMLWithId invoice.id %>