map7 / bank_import

Bank Import system created at RailsCamp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

README

Programmed at RailsCamp 2018 Brisbane, Australia. Not safe for production, this is hacked together in a weekend exercise to learn how to filter bank statements into something useful for expense tracking.

Bank Import feature to read in bank transactions from qif files and assign them to accounts.

Features

  • Read in transactions
  • Store in db
  • Assign to accounts
  • Draw a nice bar graph of expenses
  • Use StimulusJS frontend

Ruby version

2.5.1

Database creation

rake db:create
rake db:schema:load

Database initialization

rake db:seed

How to run the test suite

rake

Deployment instructions

Re-filter

Currently to re-filter you have to do this through the rails console

To re-filter all

  1. Add a new filter to;
    db/seeds.db
        
  2. Optionally add any new accounts to;
    db/chart_of_accounts.csv
        
  3. Run the seed
    rake db:seed
        
  4. Run
    rails c
    Transaction.refilter
        

Look at what’s in sundries

  1. Use rails console
    rails c
        
  2. Get sundries account
    a=Account.find_by_code(999)
        
  3. List all debit transactions
    a.debit_trans
        
  4. List all credit transactions
    a.credit_trans
        
  5. Display it nicely in a table

    Sort by description and pick filters to match the most

    tp a.debit_trans.order(:description), {:date =>{:width=>14}}, {:description =>{:width => 50}}, :amount
        

    Sort by amount and pick filters to match the largest amounts

    tp a.debit_trans.order("amount_cents DESC"), {:date =>{:width=>14}}, {:description =>{:width => 50}}, :amount
        

About

Bank Import system created at RailsCamp


Languages

Language:Ruby 86.2%Language:HTML 9.7%Language:JavaScript 3.0%Language:CSS 1.1%