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.
- Journal entries with two or more postings
- Accounts (including subaccounts and groups)
- Tax
- Cost center
- Balance sheet
- Profit and loss statement
- DATEV export
- Ruby 2.5+
- Rails 4.2+ (including Rails 6.0)
Add this line to your application's Gemfile:
gem 'keepr'
And then execute:
$ bundle
Or install it yourself as:
$ gem install keepr
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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- https://github.com/mbulat/plutus
- https://github.com/betterplace/acts_as_account
- https://github.com/steveluscher/bookkeeper
- https://github.com/mstrauss/double-entry-accounting
- https://github.com/logicleague/double_booked
- https://github.com/telent/pacioli
- https://github.com/astrails/deb
- https://github.com/bigfleet/accountable
Copyright (c) 2013-2019 Georg Ledermann, released under the MIT license