Class: Search::InvoiceTextPresenter

Inherits:
InvoicePresenter
  • Object
show all
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

Instance Method Summary collapse

Instance Method Details

Customer name with customer number as plain text.

Returns:

  • (String)


14
# File 'app/presenters/search/invoice_text_presenter.rb', line 14

def customer_link = "#{r.customer_name} (CN#{r.customer_id})"

Invoice reference number as plain text.

Returns:

  • (String)


9
# File 'app/presenters/search/invoice_text_presenter.rb', line 9

def invoice_link = r.reference_number

#msrpBigDecimal

MSRP-priced line total as a raw value.

Returns:

  • (BigDecimal)


24
# File 'app/presenters/search/invoice_text_presenter.rb', line 24

def msrp = r.line_total_msrp

#profit_consolidatedObject

Alias for R#profit_consolidated

Returns:

  • (Object)

    R#profit_consolidated

See Also:



39
# File 'app/presenters/search/invoice_text_presenter.rb', line 39

delegate :profit_consolidated, to: :r

#revenueBigDecimal

Line total as a raw value.

Returns:

  • (BigDecimal)


19
# File 'app/presenters/search/invoice_text_presenter.rb', line 19

def revenue = r.line_total

#revenue_consolidatedBigDecimal

Consolidated revenue as a raw value.

Returns:

  • (BigDecimal)


34
# File 'app/presenters/search/invoice_text_presenter.rb', line 34

def revenue_consolidated = r.line_total

#totalObject

Alias for R#total

Returns:

  • (Object)

    R#total

See Also:



29
# File 'app/presenters/search/invoice_text_presenter.rb', line 29

delegate :total, to: :r