module Treasurer::LocalCustomisations

class CodeRunner::Budget

Constants

ACCOUNT_INFO
ASSETS
DEFAULT_CURRENCY
FUTURE_TRANSFERS
REGULAR_TRANSFERS

Public Instance Methods

account_type(account) click to toggle source
# File lib/treasurer/local_customisations.rb, line 53
def account_type(account)
        case account
        when :Food, :Phone, :Rent, :Cash, :Entertainment, :Books, :Insurance
                :Expense
        when :FirstBank, :SecondBank
                :Asset
        when :PersonalLoans
                :Liability
        else
                :Expense
        end
end
in_date(item) click to toggle source
# File lib/treasurer/local_customisations.rb, line 49
def in_date(item)
        (!item[:start] or date >= item[:start]) and (!item[:end] || date <= item[:end])
end
red_line(account, date) click to toggle source
# File lib/treasurer/local_customisations.rb, line 66
def red_line(account, date)
        case account
        when :FirstBank
                -350
        when :SecondBank
                0
        else
                0
        end
end