Class: Search::ItemLedgerEntryTextPresenter
- Inherits:
-
ItemLedgerEntryPresenter
- Object
- ItemLedgerEntryPresenter
- Search::ItemLedgerEntryTextPresenter
- Defined in:
- app/presenters/search/item_ledger_entry_text_presenter.rb
Overview
Plain-text variant of ItemLedgerEntryPresenter for exports
and other non-HTML renderings.
Instance Method Summary collapse
-
#entry_link ⇒ Integer
Item ledger entry id as plain text.
-
#invoice_link ⇒ String?
Invoice number as plain text, or nil when the search row does not include the required columns.
-
#item_link ⇒ String?
Item SKU as plain text, or nil when the search row does not include the required columns.
-
#ledger_transaction_link ⇒ String?
Ledger transaction number as plain text, or nil when the search row does not include the required columns.
-
#po_link ⇒ String?
Purchase order number as plain text, or nil when the search row does not include the required columns.
-
#rma_link ⇒ String?
RMA number as plain text, or nil when the search row does not include the required columns.
Instance Method Details
#entry_link ⇒ Integer
Item ledger entry id as plain text.
9 10 11 |
# File 'app/presenters/search/item_ledger_entry_text_presenter.rb', line 9 def entry_link r.id end |
#invoice_link ⇒ String?
Invoice number as plain text, or nil when the search row does not
include the required columns.
37 38 39 40 41 |
# File 'app/presenters/search/item_ledger_entry_text_presenter.rb', line 37 def invoice_link return unless r.has_columns?(:invoice_number, :invoice_id) r.invoice_number end |
#item_link ⇒ String?
Item SKU as plain text, or nil when the search row does not include
the required columns.
17 18 19 20 21 |
# File 'app/presenters/search/item_ledger_entry_text_presenter.rb', line 17 def item_link return unless r.has_columns?(:item_id, :item_sku) r.item_sku end |
#ledger_transaction_link ⇒ String?
Ledger transaction number as plain text, or nil when the search row
does not include the required columns.
57 58 59 60 61 |
# File 'app/presenters/search/item_ledger_entry_text_presenter.rb', line 57 def ledger_transaction_link return unless r.has_columns?(:ledger_transaction_number, :ledger_transaction_id) r.ledger_transaction_number end |
#po_link ⇒ String?
Purchase order number as plain text, or nil when the search row does
not include the required columns.
27 28 29 30 31 |
# File 'app/presenters/search/item_ledger_entry_text_presenter.rb', line 27 def po_link return unless r.has_columns?(:po_number, :po_id) r.po_number end |
#rma_link ⇒ String?
RMA number as plain text, or nil when the search row does not
include the required columns.
47 48 49 50 51 |
# File 'app/presenters/search/item_ledger_entry_text_presenter.rb', line 47 def rma_link return unless r.has_columns?(:rma_number, :rma_id) r.rma_number end |