Code Monkey home page Code Monkey logo

bank_import's Introduction

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
        

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.