Class: Search::CreditMemoPresenter
- Inherits:
-
BasePresenter
show all
- Includes:
- Presenters::Timeable
- Defined in:
- app/presenters/search/credit_memo_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
#billing_customer ⇒ Object
14
15
16
17
|
# File 'app/presenters/search/credit_memo_presenter.rb', line 14
def billing_customer
return nil if r.billing_customer_id.nil?
h.link_to(r.billing_customer_name, h.customer_path(r.billing_customer_id))
end
|
#co ⇒ Object
24
25
26
27
|
# File 'app/presenters/search/credit_memo_presenter.rb', line 24
def co
return nil if r.credit_order_id.nil?
h.link_to(r.credit_order_reference_number, h.order_path(r.credit_order_id))
end
|
#created_at ⇒ Object
46
47
48
|
# File 'app/presenters/search/credit_memo_presenter.rb', line 46
def created_at
h.render_date(r.created_at)
end
|
#credit_memo ⇒ Object
6
7
8
|
# File 'app/presenters/search/credit_memo_presenter.rb', line 6
def credit_memo
h.link_to(r.reference_number, h.credit_memo_path(r.id))
end
|
#customer ⇒ Object
10
11
12
|
# File 'app/presenters/search/credit_memo_presenter.rb', line 10
def customer
h.link_to(r.customer_name, h.customer_path(r.customer_id))
end
|
#document_date ⇒ Object
38
39
40
|
# File 'app/presenters/search/credit_memo_presenter.rb', line 38
def document_date
h.render_date(r.document_date)
end
|
#original_order ⇒ Object
29
30
31
32
|
# File 'app/presenters/search/credit_memo_presenter.rb', line 29
def original_order
return nil if r.original_order_id.nil?
h.link_to(r.original_order_reference_number, h.order_path(r.original_order_id))
end
|
#request_date ⇒ Object
42
43
44
|
# File 'app/presenters/search/credit_memo_presenter.rb', line 42
def request_date
h.render_date(r.request_date)
end
|
#rma ⇒ Object
19
20
21
22
|
# File 'app/presenters/search/credit_memo_presenter.rb', line 19
def rma
return nil if r.rma_id.nil?
h.link_to(r.rma_number, h.rma_path(r.rma_id))
end
|
#total ⇒ Object
34
35
36
|
# File 'app/presenters/search/credit_memo_presenter.rb', line 34
def total
h.number_to_currency(r.total, unit: Money::Currency.new(r.currency).symbol)
end
|