Class: ESA::Accounts::Liability
- Inherits:
-
ESA::Account
- Object
- ActiveRecord::Base
- ESA::Account
- ESA::Accounts::Liability
- Defined in:
- app/models/esa/accounts/liability.rb
Overview
The Liability class is an account type used to represents debts owed to outsiders.
Normal Balance
The normal balance on Liability accounts is a Credit.
Instance Method Summary collapse
-
#update_normal_balance ⇒ Object
The normal balance for the account.
Methods inherited from ESA::Account
#balance, namespaced_type, valid_type?
Instance Method Details
#update_normal_balance ⇒ Object
The normal balance for the account. Must be overridden in implementations.
13 14 15 16 17 18 19 |
# File 'app/models/esa/accounts/liability.rb', line 13 def update_normal_balance unless self.contra self.normal_balance = :credit else self.normal_balance = :debit end end |