Stockor is a ERP system that contains all the tools you'll need to run a small to medium sized business on the internet.
The core gem records business activity for a company to include:
- Invoicing
- Sales Orders
- Purchase Orders
- SKUs
- Multi-Location Inventory management
- Customers
- Vendors
- General Ledger chart of accounts
Read more at stockor.org
Add this line to your application's Gemfile:
gem 'stockor-core'
And then execute:
$ bundle
Or install it yourself as:
$ gem install stockor-core
require 'skr/core'
customer = Customer.find_by_code "MONEYBAGS"
GlTransaction.record( source: invoice, description: "Invoice Example" ) do | transaction |
transaction.location = Location.default # <- could also specify in record's options
Sku.where( code: ['HAT','STRING'] ).each do | sku |
transaction.add_posting( amount: sku.default_price,
debit: sku.gl_asset_account,
credit: customer.gl_receivables_account )
end
end
customer = Customer.find_by_code "VIP1"
so = SalesOrder.new( customer: customer )
Sku.where( code: ['HAT','STRING'] ).each do | sku |
so.lines.build(
sku_loc: sku.sku_locs.default
)
end
so.save
vendor = Vendor.find_by_code "BIGCO"
po = PurchaseOrder.new( vendor: vendor )
Sku.where( code: ['HAT','STRING'] ).each do | sku |
po.lines.build(
sku_vendor: sku.sku_vendors.for_vendor( vendor )
)
end
po.save
invoice = Invoice.new( customer: Customer.find_by_code("ACME")
invoice.lines.build({ sku: Sku.find_by_code('LABOR'), qty: 1, price: 8.27 })
invoice.save
The standard instructions are always good:
- Fork it ( http://github.com/argosity/stockor-core/fork )
- 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
Really though, if you've got a feature you've added we're glad to work with you. Get us the code however you're able to and we can figure it out.