Module: ErpTxnsAndAccts::Extensions::ActiveRecord::ActsAsFinancialTxnAccount::ClassMethods

Defined in:
lib/erp_txns_and_accts/extensions/active_record/acts_as_financial_txn_account.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_financial_txn_account ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/erp_txns_and_accts/extensions/active_record/acts_as_financial_txn_account.rb', line 11

def 
  extend ActsAsFinancialTxnAccount::SingletonMethods
  include ActsAsFinancialTxnAccount::InstanceMethods

  after_initialize :initialize_financial_txn_account
  after_create :save_financial_txn_account
  after_update :save_financial_txn_account
  after_destroy :destroy_financial_txn_account

  has_one :financial_txn_account, :as => :financial_account

  [
    :biz_txn_acct_type,
    :biz_txn_events,
    :biz_txn_acct_party_roles,
    :txn_events,:txns,
    :biz_txn_acct_root,:biz_txn_acct_root=,
    :account_type,
    :agreement,:agreement=,
    :balance,:balance=,
    :account_number,:account_number=,
    :calculate_balance,:calculate_balance=,
    :balance_date,:balance_date=,
    :due_date,:due_date=,
    :account_root,
    :external_id_source,:external_id_source=,
    :external_identifier,:external_identifier=,
    :add_party_with_role,:find_parties_by_role,
    :created_at,:updated_at,
    :payment_due,:payment_due=,
    :description,:description=,
    :account_delinquent?,:financial_txns,
    :authorize_payment_txn,:finalize_payment_txn,:rollback_last_txn,
    :financial_txns,:financial_txns=
  ].each do |m| delegate m, :to => :financial_txn_account end
end