CATEGORIAS

<% total_outsourcing = 0 utility_factor = @quotation.utility_factor.nil? ? 0 : (@quotation.utility_factor / 100) @list_categories.each_with_index do |category, index| total_outsourcing = total_outsourcing + (category[:cost_client][:subtotal] * category[:quantity]) %> <% end commission_total = total_outsourcing * utility_factor subtotal = total_outsourcing + commission_total iva = subtotal * 0.16 total = subtotal + iva %>
No. Categoria Cantidad Clase IMSS SDI IMMS SALARIO NETO A PAGAR COSTO TOTAL
<%= index + 1 %> <%= category[:name] %> <%= category[:quantity] %> <%= category[:occupational_risk] %> <%= number_to_currency(category[:sdi], unit: '$', format: "%u %n") %> <%= number_to_currency(category[:total_salary], unit: '$', format: "%u %n") %> <%= number_to_currency((category[:quantity] * category[:cost_client][:subtotal]), unit: '$', format: "%u %n") %>

COSTOS TOTALES

COSTO TOTAL SUBCONTRATACIÓN <%= number_to_currency(total_outsourcing, unit: '$', format: "%u %n") %>
COMISIÓN <%= @quotation.utility_factor.nil? ? 0 : @quotation.utility_factor %> %
COMISIÓN FINANCIAMIENTO <%= number_to_currency((commission_total), unit: '$', format: "%u %n") %>
SUBTOTAL <%= number_to_currency(subtotal, unit: '$', format: "%u %n") %>
IVA (16%) <%= number_to_currency(iva, unit: '$', format: "%u %n") %>
TOTAL <%= number_to_currency(total, unit: '$', format: "%u %n") %>