mirror of
https://github.com/internetee/registry.git
synced 2025-08-17 06:53:53 +02:00
fixed codeclimate errors
This commit is contained in:
parent
24d247f4da
commit
867fbb02a8
1 changed files with 2 additions and 5 deletions
|
@ -40,7 +40,6 @@ module Admin
|
||||||
@q.sorts = 'number desc' if @q.sorts.empty?
|
@q.sorts = 'number desc' if @q.sorts.empty?
|
||||||
@invoices = @q.result.page(params[:page])
|
@invoices = @q.result.page(params[:page])
|
||||||
@invoices = @invoices.per(params[:results_per_page]) if paginate?
|
@invoices = @invoices.per(params[:results_per_page]) if paginate?
|
||||||
|
|
||||||
render_by_format('admin/invoices/index', 'invoices')
|
render_by_format('admin/invoices/index', 'invoices')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -84,10 +83,8 @@ module Admin
|
||||||
Invoice.includes(:account_activity, :buyer).where.not(account_activity: { id: nil })
|
Invoice.includes(:account_activity, :buyer).where.not(account_activity: { id: nil })
|
||||||
when 'Unpaid'
|
when 'Unpaid'
|
||||||
Invoice.includes(:account_activity, :buyer).where(account_activity: { id: nil })
|
Invoice.includes(:account_activity, :buyer).where(account_activity: { id: nil })
|
||||||
when 'Cancelled'
|
when 'Cancelled' then Invoice.includes(:account_activity, :buyer).where.not(cancelled_at: nil)
|
||||||
Invoice.includes(:account_activity, :buyer).where.not(cancelled_at: nil)
|
else Invoice.includes(:account_activity, :buyer)
|
||||||
else
|
|
||||||
Invoice.includes(:account_activity, :buyer)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue