Limit financial overview items to speed up loading
If a foodcoop does not use the balancing feature the list of unfinished orders will be very long and needs a significant amount of time to load.
This commit is contained in:
parent
b45e48e4c9
commit
3fb3fa409b
1 changed files with 2 additions and 2 deletions
|
@ -3,8 +3,8 @@ class Finance::BaseController < ApplicationController
|
|||
|
||||
def index
|
||||
@financial_transactions = FinancialTransaction.includes(:ordergroup).order('created_on DESC').limit(8)
|
||||
@orders = Order.finished_not_closed.includes(:supplier)
|
||||
@unpaid_invoices = Invoice.unpaid.includes(:supplier)
|
||||
@orders = Order.finished_not_closed.includes(:supplier).limit(8)
|
||||
@unpaid_invoices = Invoice.unpaid.includes(:supplier).limit(8)
|
||||
|
||||
render template: 'finance/index'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue