mirror of
https://github.com/internetee/registry.git
synced 2025-07-27 21:16:12 +02:00
Added monthly status to invoices
This commit is contained in:
parent
00b6c3aa49
commit
1ab66e68df
5 changed files with 11 additions and 2 deletions
|
@ -86,9 +86,13 @@ module Admin
|
|||
when 'Paid'
|
||||
Invoice.includes(:account_activity, :buyer).where.not(account_activity: { id: nil })
|
||||
when 'Unpaid'
|
||||
Invoice.includes(:account_activity, :buyer).where(account_activity: { id: nil })
|
||||
Invoice.includes(:account_activity, :buyer).where(account_activity: { id: nil },
|
||||
cancelled_at: nil,
|
||||
monthly_invoice: false)
|
||||
when 'Cancelled'
|
||||
Invoice.includes(:account_activity, :buyer).where.not(cancelled_at: nil)
|
||||
when 'Monthly'
|
||||
Invoice.where(monthly_invoice: true, cancelled_at: nil)
|
||||
else
|
||||
Invoice.includes(:account_activity, :buyer)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue