Class: Search::RmaPresenter
- Inherits:
-
BasePresenter
show all
- Includes:
- Presenters::Timeable
- Defined in:
- app/presenters/search/rma_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
#actual_rma_credit ⇒ Object
37
38
39
|
# File 'app/presenters/search/rma_presenter.rb', line 37
def actual_rma_credit
h.number_to_currency(r.actual_rma_credit)
end
|
#created_at ⇒ Object
29
30
31
|
# File 'app/presenters/search/rma_presenter.rb', line 29
def created_at
h.render_date(r.created_at)
end
|
#customer ⇒ Object
10
11
12
13
|
# File 'app/presenters/search/rma_presenter.rb', line 10
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
33
34
35
|
# File 'app/presenters/search/rma_presenter.rb', line 33
def estimated_rma_credit
h.number_to_currency(r.estimated_rma_credit)
end
|
#invoice ⇒ Object
20
21
22
23
|
# File 'app/presenters/search/rma_presenter.rb', line 20
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
15
16
17
18
|
# File 'app/presenters/search/rma_presenter.rb', line 15
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
25
26
27
|
# File 'app/presenters/search/rma_presenter.rb', line 25
def returned_reasons
h.rma_returned_reasons_with_explanations(r.returned_reasons)
end
|
#rma ⇒ Object
6
7
8
|
# File 'app/presenters/search/rma_presenter.rb', line 6
def rma
h.link_to r.rma_number, h.rma_path(r)
end
|