Skip to content
forked from ledermann/keepr

Double entry bookkeeping with Ruby on Rails

License

Notifications You must be signed in to change notification settings

devhackery/keepr

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Keepr

This Ruby gem provides a double entry accounting system for use in any Rails application. It stores all the data via ActiveRecord in the SQL database.

Build Status Code Climate Coverage Status

Features

  • Journal entries with two or more postings
  • Accounts (including subaccounts and groups)
  • Tax
  • Cost center
  • Balance sheet
  • Profit and loss statement
  • DATEV export

Dependencies

  • Ruby 2.5+
  • Rails 4.2+ (including Rails 6.0)

Installation

Add this line to your application's Gemfile:

gem 'keepr'

And then execute:

$ bundle

Or install it yourself as:

$ gem install keepr

Usage

Create Graoups from text file:

```$ rails c 
    $ Keepr::GroupsCreator.new(:balance).run 
    $ Keepr::GroupsCreator.new(:profit_and_loss).run
```

Create Group

Keepr::Group.new(is_result: true, target: :asset, name: 'foo')
Keepr::Group.new(is_result: true, target: :profit_and_loss, name: 'foo')
Keepr::Group.new(is_result: true, target: :liability, name: 'foo')

Create Account

Keepr::Account.new(number: 999)
Keepr::Account.new(number: 27, name: 'Software')

Jurnel Entry


Keepr::Journal.create keepr_postings_attributes: [
      { keepr_account: account_4920, amount: 8.40, side: 'debit' },
      { keepr_account: account_1576, amount: 1.60, side: 'debit' },
      { keepr_account: account_1600, amount: 10.00, side: 'credit' }
    ]
 Keepr::Journal.create! date: Date.yesterday,
                           permanent: true,
                           keepr_postings_attributes: [
                             { keepr_account: account_1000, amount: 20, side: 'debit' },
                             { keepr_account: account_1200, amount: 20, side: 'credit' }
                           ]
Keepr::Posting.create!(amount: 10, side: 'debit', keepr_account: account_1000, keepr_journal_id: 42

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Similar projects

Copyright (c) 2013-2019 Georg Ledermann, released under the MIT license

About

Double entry bookkeeping with Ruby on Rails

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%