Class: Api::ReportsController
- Inherits:
-
BaseController
- Object
- BaseController
- Api::ReportsController
- Defined in:
- app/controllers/api/reports_controller.rb
Instance Method Summary collapse
Instance Method Details
#sales_total ⇒ Object
2 3 4 5 6 7 |
# File 'app/controllers/api/reports_controller.rb', line 2 def sales_total @search = Order.(params[:search]) @item_total = @search.sum(:item_total) @adjustment_total = @search.sum(:adjustment_total) @sales_total = @search.sum(:total) end |