Fix namespaces for Zeitwerk class loader

This commit is contained in:
Alex Sherman 2021-03-05 18:00:45 +05:00
parent 32634c7a8b
commit 43b3033991
78 changed files with 666 additions and 704 deletions

View file

@ -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