mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-12 03:50:22 +00:00
Updating the admin account view to show use the new account_invoice model to display data
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
class Admin::AccountController < Spree::Admin::BaseController
|
||||
|
||||
def show
|
||||
@invoices = spree_current_user.orders.where(distributor_id: Spree::Config[:accounts_distributor_id])
|
||||
@enterprises = Enterprise.where(id: BillablePeriod.where(owner_id: spree_current_user).map(&:enterprise_id))
|
||||
@invoices = spree_current_user.account_invoices
|
||||
# @enterprises = Enterprise.where(id: BillablePeriod.where(owner_id: spree_current_user).map(&:enterprise_id))
|
||||
# .group_by('enterprise.id').joins(:billable_periods)
|
||||
# .select('SUM(billable_periods.turnover) AS turnover').order('turnover DESC')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user