Class: Search::LedgerEntryPresenter

Inherits:
BasePresenter
  • Object
show all
Includes:
Presenters::Timeable
Defined in:
app/presenters/search/ledger_entry_presenter.rb

Direct Known Subclasses

LedgerEntryTextPresenter

Instance Attribute Summary

Attributes inherited from BasePresenter

#current_account, #options, #url_helper

Instance Method Summary collapse

Methods inherited from BasePresenter

#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_dateObject



38
39
40
# File 'app/presenters/search/ledger_entry_presenter.rb', line 38

def bank_date
  h.render_date r.bank_date
end

#company_amountObject



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_amountObject



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

#documentObject



22
23
24
# File 'app/presenters/search/ledger_entry_presenter.rb', line 22

def document
  h.entry_resource_link r.ledger_transaction
end

#le_amountObject



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_dateObject



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_typeObject



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

#reconciledObject



34
35
36
# File 'app/presenters/search/ledger_entry_presenter.rb', line 34

def reconciled
  h.y r.reconciled
end


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