app/helpers/opportunities_helper.rb
# Opportunity summary for RSS/ATOM feeds.
#----------------------------------------------------------------------------
Opportunity summary for RSS/ATOM feeds.
Opportunity summary for RSS / ATOM feeds .
def opportunity_summary(opportunity)
    summary = []
    amount = []
    summary << (opportunity.stage ? t(opportunity.stage) : t(:other))
    summary << number_to_currency(opportunity.weighted_amount, precision: 0)
    unless %w[won lost].include?(opportunity.stage)
      amount << number_to_currency(opportunity.amount.to_f, precision: 0)
      amount << (opportunity.discount ? t(:discount_number, number_to_currency(opportunity.discount, precision: 0)) : t(:no_discount))
      amount << t(:probability_number, opportunity.probability.to_i.to_s + '%')
      summary << amount.join(' ')
    end
    summary << if opportunity.closes_on
                 t(:closing_date, l(opportunity.closes_on, format: :mmddyy))
               else
                 t(:no_closing_date)
               end
    summary.compact.join(', ')
  end
def opportunity_summary ( opportunity ) summary = [ ] amount = [ ] summary << ( opportunity . stage ? t ( opportunity . stage ) : t ( :other ) ) summary << number_to_currency ( opportunity . weighted_amount , precision : 0 ) unless %w[ won lost ] . include? ( opportunity . stage ) amount << number_to_currency ( opportunity . amount . to_f , precision : 0 ) amount << ( opportunity . discount ? t ( :discount_number , number_to_currency ( opportunity . discount , precision : 0 ) ) : t ( :no_discount ) ) amount << t ( :probability_number , opportunity . probability . to_i . to_s + '%' ) summary << amount . join ( ' ' ) end summary << if opportunity . closes_on t ( :closing_date , l ( opportunity . closes_on , format : :mmddyy ) ) else t ( :no_closing_date ) end summary . compact . join ( ', ' ) end
Opportunity summary for RSS/ATOM feeds.
Opportunity summary for RSS / ATOM feeds .
opportunity