Sha256: 17c1faa4d309baf8fca27e736ac10a2400fadac50aefe8d18aca3d301f9a3b46

Contents?: true

Size: 535 Bytes

Versions: 22

Compression:

Stored size: 535 Bytes

Contents

module BookingTemplateHelper
  def amount_relations_as_collection
    relations = ['reference_amount', 'reference_balance', 'reference_amount_minus_balance']
    relations.inject({}) do |result, relation|
      result[t(relation, :scope => 'booking_template.relation')] = relation
      result
    end
  end

  def amount_to_s(booking_template)
    if booking_template.amount_relates_to.present?
      return "%.2f%%" % (booking_template.amount.to_f * 100)
    else
      return currency_fmt(booking_template.amount)
    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
has_accounts_engine-3.0.0.beta15 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta14 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta13 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta12 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta11 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta10 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta9 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta8 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta7 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta6 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta5 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta4 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta3 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta2 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta1 app/helpers/booking_template_helper.rb
has_accounts_engine-3.0.0.beta0 app/helpers/booking_template_helper.rb
has_accounts_engine-2.0.1 app/helpers/booking_template_helper.rb
has_accounts_engine-2.0.0 app/helpers/booking_template_helper.rb
has_accounts_engine-1.1.2 app/helpers/booking_template_helper.rb
has_accounts_engine-1.1.1 app/helpers/booking_template_helper.rb