Class: BankAccount

Inherits:
ApplicationRecord show all
Defined in:
app/models/bank_account.rb

Instance Method Summary collapse

Instance Method Details

#assign_unlinked_transactionsObject


18
19
20
21
22
23
24
25
26
# File 'app/models/bank_account.rb', line 18

def assign_unlinked_transactions
  count = 0
  bank_transactions.without_financial_link.includes(:supplier, :user).each do |t|
    if t.assign_to_ordergroup || t.assign_to_invoice
      count += 1
    end
  end
  count
end

#find_connectorFunction

Returns Method wich can be called to import transaction from a bank or nil if unsupported.

Returns:

  • (Function)

    Method wich can be called to import transaction from a bank or nil if unsupported


13
14
15
16
# File 'app/models/bank_account.rb', line 13

def find_connector
  klass = BankAccountConnector.find iban
  return klass.new self if klass
end