Sha256: 1e53aaec844d51ecef5a89a5f8d48cd07d9b3ca57dc3aaf29ccc00d4fde32c00

Contents?: true

Size: 211 Bytes

Versions: 6

Compression:

Stored size: 211 Bytes

Contents

module AccountScopeExtension
  def saldo(selector = Date.today, inclusive = true)
    new_saldo = 0

    for account in all
      new_saldo += account.saldo(selector, inclusive)
    end

    new_saldo
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
has_accounts-3.1.0 app/models/account_scope_extension.rb
has_accounts-3.0.0.beta3 app/models/account_scope_extension.rb
has_accounts-3.0.0.beta2 app/models/account_scope_extension.rb
has_accounts-3.0.0.beta1 app/models/account_scope_extension.rb
has_accounts-3.0.0.beta0 app/models/account_scope_extension.rb
has_accounts-2.1.0 app/models/account_scope_extension.rb