mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +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?
|
||||
@invoices = @q.result.page(params[:page])
|
||||
@invoices = @invoices.per(params[:results_per_page]) if paginate?
|
||||
|
||||
render_by_format('admin/invoices/index', 'invoices')
|
||||
end
|
||||
|
||||
|
@ -84,10 +83,8 @@ module Admin
|
|||
Invoice.includes(:account_activity, :buyer).where.not(account_activity: { id: nil })
|
||||
when 'Unpaid'
|
||||
Invoice.includes(:account_activity, :buyer).where(account_activity: { id: nil })
|
||||
when 'Cancelled'
|
||||
Invoice.includes(:account_activity, :buyer).where.not(cancelled_at: nil)
|
||||
else
|
||||
Invoice.includes(:account_activity, :buyer)
|
||||
when 'Cancelled' then Invoice.includes(:account_activity, :buyer).where.not(cancelled_at: nil)
|
||||
else Invoice.includes(:account_activity, :buyer)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue