mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 08:52:04 +02:00
Show real balance in invoices view
This commit is contained in:
parent
8768c0e1d6
commit
99aecc476f
5 changed files with 14 additions and 3 deletions
|
@ -13,6 +13,11 @@ class Invoice < ActiveRecord::Base
|
|||
account_activity.present?
|
||||
end
|
||||
|
||||
def paid_at
|
||||
# TODO: Cache this?
|
||||
account_activity.try(:bank_transaction).try(:paid_at)
|
||||
end
|
||||
|
||||
def to_s
|
||||
I18n.t('invoice_no', no: id)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue