Sha256: bac2d12eceee66e7b9711e800ad96b726573004091662de552b2a1bd28746d7b

Contents?: true

Size: 370 Bytes

Versions: 20

Compression:

Stored size: 370 Bytes

Contents

class BankAccount < Account
  belongs_to :bank

  # Standard methods
  def to_s(value_range = Date.today, format = :default)
    case format
    when :short
      "#{code}: CHF #{sprintf('%0.2f', saldo(value_range).currency_round)}"
    else
      "#{title} (#{code}) #{bank.to_s} #{number}: CHF #{sprintf('%0.2f', saldo(value_range).currency_round)}"
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
has_accounts-0.9.2 app/models/bank_account.rb
has_accounts-0.9.1 app/models/bank_account.rb
has_accounts-0.9.0 app/models/bank_account.rb
has_accounts-0.8.3 app/models/bank_account.rb
has_accounts-0.8.2 app/models/bank_account.rb
has_accounts-0.8.1 app/models/bank_account.rb
has_accounts-0.8.0 app/models/bank_account.rb
has_accounts-0.7.1 app/models/bank_account.rb
has_accounts-0.7.0 app/models/bank_account.rb
has_accounts-0.6.1 app/models/bank_account.rb
has_accounts-0.6.0 app/models/bank_account.rb
has_accounts-0.5.0 app/models/bank_account.rb
has_accounts-0.4.1 app/models/bank_account.rb
has_accounts-0.4.0 app/models/bank_account.rb
has_accounts-0.3.0 app/models/bank_account.rb
has_accounts-0.2.2 app/models/bank_account.rb
has_accounts-0.2.1 app/models/bank_account.rb
has_accounts-0.2.0 app/models/bank_account.rb
has_accounts-0.1.1 app/models/bank_account.rb
has_accounts-0.1.0 app/models/bank_account.rb