Class: Search::LedgerEntryPresenter
- Inherits:
-
BasePresenter
- Object
- SimpleDelegator
- BasePresenter
- Search::LedgerEntryPresenter
show all
- Includes:
- Presenters::Timeable
- Defined in:
- app/presenters/search/ledger_entry_presenter.rb
Instance Attribute Summary
#current_account, #options, #url_helper
Instance Method Summary
collapse
#can?, #capture, #concat, #content_tag, #fa_icon, #h, #initialize, #link_to, #number_to_currency, #present, presents, #r, #safe_present, #simple_format, #u
Constructor Details
This class inherits a constructor from BasePresenter
Instance Method Details
#bank_date ⇒ Object
38
39
40
|
# File 'app/presenters/search/ledger_entry_presenter.rb', line 38
def bank_date
h.render_date r.bank_date
end
|
#company_amount ⇒ Object
26
27
28
|
# File 'app/presenters/search/ledger_entry_presenter.rb', line 26
def company_amount
h.number_to_currency (r.company_amount || 0.00)
end
|
#consolidated_amount ⇒ Object
30
31
32
|
# File 'app/presenters/search/ledger_entry_presenter.rb', line 30
def consolidated_amount
h.number_to_currency (r.consolidated_amount || 0.00)
end
|
#document ⇒ Object
22
23
24
|
# File 'app/presenters/search/ledger_entry_presenter.rb', line 22
def document
h.entry_resource_link r.ledger_transaction
end
|
#le_amount ⇒ Object
18
19
20
|
# File 'app/presenters/search/ledger_entry_presenter.rb', line 18
def le_amount
h.number_to_currency (r.le_amount || 0.00)
end
|
#lt_transaction_date ⇒ Object
14
15
16
|
# File 'app/presenters/search/ledger_entry_presenter.rb', line 14
def lt_transaction_date
h.render_date r.lt_transaction_date
end
|
#lt_transaction_type ⇒ Object
6
7
8
|
# File 'app/presenters/search/ledger_entry_presenter.rb', line 6
def lt_transaction_type
LedgerTransaction::TYPE_ABBREVIATIONS[r.lt_transaction_type] || r_lt_transaction_type
end
|
#reconciled ⇒ Object
34
35
36
|
# File 'app/presenters/search/ledger_entry_presenter.rb', line 34
def reconciled
h.y r.reconciled
end
|
#transaction_number_link ⇒ Object
10
11
12
|
# File 'app/presenters/search/ledger_entry_presenter.rb', line 10
def transaction_number_link
h.link_to r.lt_transaction_number, h.ledger_transaction_path(r.lt_transaction_id)
end
|