Class: Search::RmaPresenter
- Inherits:
-
BasePresenter
show all
- Includes:
- Presenters::Timeable
- Defined in:
- app/presenters/search/rma_presenter.rb
Overview
Presenter: rma presenter.
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
#actual_rma_credit ⇒ Object
42
43
44
|
# File 'app/presenters/search/rma_presenter.rb', line 42
def actual_rma_credit
h.number_to_currency(r.actual_rma_credit)
end
|
#created_at ⇒ Object
34
35
36
|
# File 'app/presenters/search/rma_presenter.rb', line 34
def created_at
h.render_date(r.created_at)
end
|
#customer ⇒ Object
12
13
14
15
16
|
# File 'app/presenters/search/rma_presenter.rb', line 12
def customer
return unless r.has_columns?(:customer_full_name, :customer_id)
h.link_to r.customer_full_name, h.customer_path(r.customer_id)
end
|
#estimated_rma_credit ⇒ Object
38
39
40
|
# File 'app/presenters/search/rma_presenter.rb', line 38
def estimated_rma_credit
h.number_to_currency(r.estimated_rma_credit)
end
|
#invoice ⇒ Object
24
25
26
27
28
|
# File 'app/presenters/search/rma_presenter.rb', line 24
def invoice
return unless r.has_columns?(:original_invoice_reference_number, :original_invoice_id)
h.link_to r.original_invoice_reference_number, h.invoice_path(r.original_invoice_id)
end
|
#order ⇒ Object
18
19
20
21
22
|
# File 'app/presenters/search/rma_presenter.rb', line 18
def order
return unless r.has_columns?(:original_order_reference_number, :original_order_id)
h.link_to r.original_order_reference_number, h.order_path(r.original_order_id)
end
|
#returned_reasons ⇒ Object
30
31
32
|
# File 'app/presenters/search/rma_presenter.rb', line 30
def returned_reasons
h.rma_returned_reasons_with_explanations(r.returned_reasons)
end
|
#rma ⇒ Object
8
9
10
|
# File 'app/presenters/search/rma_presenter.rb', line 8
def rma
h.link_to r.rma_number, h.rma_path(r)
end
|