Class: Search::InvoiceTextPresenter
- Inherits:
-
InvoicePresenter
- Object
- InvoicePresenter
- Search::InvoiceTextPresenter
- Defined in:
- app/presenters/search/invoice_text_presenter.rb
Overview
Plain-text variant of InvoicePresenter for exports and
other non-HTML renderings.
Delegated Instance Attributes collapse
-
#profit_consolidated ⇒ Object
Alias for R#profit_consolidated.
-
#total ⇒ Object
Alias for R#total.
Instance Method Summary collapse
-
#customer_link ⇒ String
Customer name with customer number as plain text.
-
#invoice_link ⇒ String
Invoice reference number as plain text.
-
#msrp ⇒ BigDecimal
MSRP-priced line total as a raw value.
-
#revenue ⇒ BigDecimal
Line total as a raw value.
-
#revenue_consolidated ⇒ BigDecimal
Consolidated revenue as a raw value.
Instance Method Details
#customer_link ⇒ String
Customer name with customer number as plain text.
14 |
# File 'app/presenters/search/invoice_text_presenter.rb', line 14 def customer_link = "#{r.customer_name} (CN#{r.customer_id})" |
#invoice_link ⇒ String
Invoice reference number as plain text.
9 |
# File 'app/presenters/search/invoice_text_presenter.rb', line 9 def invoice_link = r.reference_number |
#msrp ⇒ BigDecimal
MSRP-priced line total as a raw value.
24 |
# File 'app/presenters/search/invoice_text_presenter.rb', line 24 def msrp = r.line_total_msrp |
#profit_consolidated ⇒ Object
Alias for R#profit_consolidated
39 |
# File 'app/presenters/search/invoice_text_presenter.rb', line 39 delegate :profit_consolidated, to: :r |
#revenue ⇒ BigDecimal
Line total as a raw value.
19 |
# File 'app/presenters/search/invoice_text_presenter.rb', line 19 def revenue = r.line_total |
#revenue_consolidated ⇒ BigDecimal
Consolidated revenue as a raw value.
34 |
# File 'app/presenters/search/invoice_text_presenter.rb', line 34 def revenue_consolidated = r.line_total |
#total ⇒ Object
Alias for R#total
29 |
# File 'app/presenters/search/invoice_text_presenter.rb', line 29 delegate :total, to: :r |