def balance(options={})
      if self.class == Borutus::Account
        raise(NoMethodError, "undefined method 'balance'")
      else
        if self.normal_credit_balance ^ contra
          credits_balance(options) - debits_balance(options)
        else
          debits_balance(options) - credits_balance(options)
        end
      end
    end
def balance(options={})
      if self.class == Borutus::Account
        raise(NoMethodError, "undefined method 'balance'")
      else
        if self.normal_credit_balance ^ contra
          credits_balance(options) - debits_balance(options)
        else
          debits_balance(options) - credits_balance(options)
        end
      end
    end
The balance of the account. This instance method is intended for use only
 on instances of account subclasses.

 If the account has a normal credit balance, the debits are subtracted from the credits
 unless this is a contra account, in which case credits are substracted from debits.

 For a normal debit balance, the credits are subtracted from the debits
 unless this is a contra account, in which case debits are subtracted from credits.

 Takes an optional hash specifying :from_date and :to_date for calculating balances during periods.
 :from_date and :to_date may be strings of the form "yyyy-mm-dd" or Ruby Date objects

 @example
   >> liability.balance({:from_date => "2000-01-01", :to_date => Date.today})
   => #<BigDecimal:103259bb8,'0.1E4',4(12)>

 @example
   >> liability.balance
   => #<BigDecimal:103259bb8,'0.2E4',4(12)>

 @return [BigDecimal] The decimal value balance