mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
Fix namespaces for Zeitwerk class loader
This commit is contained in:
parent
32634c7a8b
commit
43b3033991
78 changed files with 666 additions and 704 deletions
|
@ -1,28 +1,24 @@
|
|||
module Concerns
|
||||
module Invoice
|
||||
module Payable
|
||||
extend ActiveSupport::Concern
|
||||
module Invoice::Payable
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
scope :unpaid, -> { where('id NOT IN (SELECT invoice_id FROM account_activities WHERE' \
|
||||
' invoice_id IS NOT NULL)') }
|
||||
end
|
||||
included do
|
||||
scope :unpaid, -> { where('id NOT IN (SELECT invoice_id FROM account_activities WHERE' \
|
||||
' invoice_id IS NOT NULL)') }
|
||||
end
|
||||
|
||||
def payable?
|
||||
unpaid? && not_cancelled?
|
||||
end
|
||||
def payable?
|
||||
unpaid? && not_cancelled?
|
||||
end
|
||||
|
||||
def paid?
|
||||
account_activity
|
||||
end
|
||||
def paid?
|
||||
account_activity
|
||||
end
|
||||
|
||||
def receipt_date
|
||||
account_activity.created_at.to_date
|
||||
end
|
||||
def receipt_date
|
||||
account_activity.created_at.to_date
|
||||
end
|
||||
|
||||
def unpaid?
|
||||
!paid?
|
||||
end
|
||||
end
|
||||
def unpaid?
|
||||
!paid?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue