module ErpTxnsAndAccts::Extensions::ActiveRecord::ActsAsFinancialTxnAccount::ClassMethods

Public Instance Methods

acts_as_financial_txn_account() click to toggle source
# File lib/erp_txns_and_accts/extensions/active_record/acts_as_financial_txn_account.rb, line 11
def acts_as_financial_txn_account
  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