소스 검색

changed the way we get the total of products in sale

Jose Miguel Ledon Nieblas 9 년 전
부모
커밋
1276f416be
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/views/sales/index.html.erb

+ 1 - 1
app/views/sales/index.html.erb

@@ -124,7 +124,7 @@
                           Apartado
                           <% end %>
                         </td>
-                        <td><%= sale.products.count %></td>
+                        <td><%= sale.sales_details.sum(:quantity).round %></td>
                         <td>
                           <% case sale.status %>
                           <% when "paid"%>