Sha256: 438a8eb9a733a8aa5481307016f00bcd82a531014db5018b41faf7422a0b95c2

Contents?: true

Size: 611 Bytes

Versions: 9

Compression:

Stored size: 611 Bytes

Contents

module ESA
  module Accounts
    # The Revenue class is an account type used to represents increases in owners equity.
    #
    # === Normal Balance
    # The normal balance on Revenue accounts is a *Credit*.
    #
    # @see http://en.wikipedia.org/wiki/Revenue Revenue
    #
    # @author Lenno Nagel
    class Revenue < ESA::Account
      # The normal balance for the account. Must be overridden in implementations.
      def update_normal_balance
        unless self.contra
          self.normal_balance = :credit
        else
          self.normal_balance = :debit
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
event_sourced_accounting-0.2.6 app/models/esa/accounts/revenue.rb
event_sourced_accounting-0.2.4 app/models/esa/accounts/revenue.rb
event_sourced_accounting-0.2.3 app/models/esa/accounts/revenue.rb
event_sourced_accounting-0.2.2 app/models/esa/accounts/revenue.rb
event_sourced_accounting-0.1.6 app/models/esa/accounts/revenue.rb
event_sourced_accounting-0.1.4 app/models/esa/accounts/revenue.rb
event_sourced_accounting-0.1.3 app/models/esa/accounts/revenue.rb
event_sourced_accounting-0.1.1 app/models/esa/accounts/revenue.rb
event_sourced_accounting-0.1.0 app/models/esa/accounts/revenue.rb