This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb | |
| index 242e70e..88f0232 100644 | |
| --- a/app/controllers/reports_controller.rb | |
| +++ b/app/controllers/reports_controller.rb | |
| @@ -182,10 +182,11 @@ class ReportsController < ApplicationController | |
| @date = Date.strptime(params[:date], "%m/%d/%Y") rescue Date.today | |
| @stores = current_business.stores | |
| @order_items = OrderItem | |
| - .joins(:order => [:store]) | |
| + .joins("LEFT JOIN orders ON orders.id = order_items.order_id AND orders.active = 1") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/models/order.rb b/app/models/order.rb | |
| index 58e872d..e9a8d79 100644 | |
| --- a/app/models/order.rb | |
| +++ b/app/models/order.rb | |
| @@ -187,7 +187,7 @@ class Order < ActiveRecord::Base | |
| when :daily | |
| completed.group_by_day(:schedule_date, format: "%m/%d/%Y", last: 7).count | |
| when :weekly | |
| - completed.group_by_week(:schedule_date, format: "%m/%d/%Y").count | |
| + completed.group_by_week(:schedule_date, format: "%m/%d/%Y", last: 8).count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb | |
| index 474947a..242e70e 100644 | |
| --- a/app/controllers/reports_controller.rb | |
| +++ b/app/controllers/reports_controller.rb | |
| @@ -182,8 +182,8 @@ class ReportsController < ApplicationController | |
| @date = Date.strptime(params[:date], "%m/%d/%Y") rescue Date.today | |
| @stores = current_business.stores | |
| @order_items = OrderItem | |
| - .joins(:order) | |
| - .select("orders.number, order_items.*") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb | |
| index 474947a..930a57b 100644 | |
| --- a/app/controllers/reports_controller.rb | |
| +++ b/app/controllers/reports_controller.rb | |
| @@ -182,10 +182,10 @@ class ReportsController < ApplicationController | |
| @date = Date.strptime(params[:date], "%m/%d/%Y") rescue Date.today | |
| @stores = current_business.stores | |
| @order_items = OrderItem | |
| - .joins(:order) | |
| - .select("orders.number, order_items.*") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/assets/javascripts/dashboard_map.js b/app/assets/javascripts/dashboard_map.js | |
| index ce5b5c0..daab2c8 100644 | |
| --- a/app/assets/javascripts/dashboard_map.js | |
| +++ b/app/assets/javascripts/dashboard_map.js | |
| @@ -181,5 +181,38 @@ $(document).ready(function(){ | |
| }); | |
| }; | |
| + | |
| + DashboardMap.showpercent = function(sp, d, c) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb | |
| index 842e614..3b69399 100644 | |
| --- a/app/controllers/home_controller.rb | |
| +++ b/app/controllers/home_controller.rb | |
| @@ -39,5 +39,6 @@ class HomeController < ApplicationController | |
| end | |
| @orders = @grouped_orders.collect{|grouped_order| grouped_order[:orders]}.flatten | |
| + @status_percentages = Order.all_status_percentages(@date, params[:q][:store_id_eq]) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/assets/javascripts/dashboard_map.js b/app/assets/javascripts/dashboard_map.js | |
| index ce5b5c0..daab2c8 100644 | |
| --- a/app/assets/javascripts/dashboard_map.js | |
| +++ b/app/assets/javascripts/dashboard_map.js | |
| @@ -181,5 +181,38 @@ $(document).ready(function(){ | |
| }); | |
| }; | |
| + | |
| + DashboardMap.showpercent = function(sp, d, c) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/assets/javascripts/dashboard_map.js b/app/assets/javascripts/dashboard_map.js | |
| index ce5b5c0..daab2c8 100644 | |
| --- a/app/assets/javascripts/dashboard_map.js | |
| +++ b/app/assets/javascripts/dashboard_map.js | |
| @@ -181,5 +181,38 @@ $(document).ready(function(){ | |
| }); | |
| }; | |
| + | |
| + DashboardMap.showpercent = function(sp, d, c) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/app/assets/javascripts/dashboard_map.js b/app/assets/javascripts/dashboard_map.js | |
| index ce5b5c0..daab2c8 100644 | |
| --- a/app/assets/javascripts/dashboard_map.js | |
| +++ b/app/assets/javascripts/dashboard_map.js | |
| @@ -181,5 +181,38 @@ $(document).ready(function(){ | |
| }); | |
| }; | |
| + | |
| + DashboardMap.showpercent = function(sp, d, c) { |