Class: Search::RmaTextPresenter
- Inherits:
-
RmaPresenter
- Object
- RmaPresenter
- Search::RmaTextPresenter
- Defined in:
- app/presenters/search/rma_text_presenter.rb
Instance Method Summary collapse
Instance Method Details
#customer_link ⇒ Object
7 8 9 10 |
# File 'app/presenters/search/rma_text_presenter.rb', line 7 def customer_link return unless r.has_columns?(:customer_full_name, :customer_id) "#{r.customer_full_name} (CN#{r.customer_id})" end |
#order_link ⇒ Object
12 13 14 15 |
# File 'app/presenters/search/rma_text_presenter.rb', line 12 def order_link return unless r.has_columns?(:original_order_reference_number, :original_order_id) r.original_order_reference_number end |
#returned_reasons ⇒ Object
17 18 19 |
# File 'app/presenters/search/rma_text_presenter.rb', line 17 def returned_reasons RmaReasonCode.where(code: r.returned_reasons).order(:code).map{|rrc| "#{rrc.code} - #{rrc.description}" }.join(';') end |
#rma_link ⇒ Object
3 4 5 |
# File 'app/presenters/search/rma_text_presenter.rb', line 3 def rma_link r.rma_number end |