Преглед на файлове

round generated commission in form

jose miguel преди 9 години
родител
ревизия
cf3a3c878e
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      app/views/commissions/_form.html.erb

+ 1 - 1
app/views/commissions/_form.html.erb

@@ -57,7 +57,7 @@
                             <% @sellers.each_with_index do |seller, key| %>
                               <tr>
                                 <% sales_by_period = seller.get_sales_by_period(@initial_date, @final_date, 'commission') %>
-                                <% commission_calculated = (@pos_config.commission_percent / 100.0) *sales_by_period.sum(:total) %>
+                                <% commission_calculated = ((@pos_config.commission_percent / 100.0) *sales_by_period.sum(:total)).round(2) %>
                                 <td> <%= key +1 %> </td>
                                 <td> <%= seller.name %> </td>
                                 <td> <%= sales_by_period.count %> </td>