A small and easy invoice number generator
Add this line to your application's Gemfile:
gem 'invoice_number'
And then execute:
$ bundle
Or install it yourself as:
$ gem install invoice_number
InvoiceNumber::Builder.new.create # => INVOICE-0000001
InvoiceNumber::Builder.new.create('INVOICE-0000001') # => INVOICE-0000001
Change prefix:
InvoiceNumber::Builder.new(prefix: 'INVOICE_NUMBER').create # => INVOICE_NUMBER-0000001
InvoiceNumber::Builder.new(prefix: 'INVOICE_NUMBER').create('INVOICE_NUMBER-0000001') # => INVOICE_NUMBER-0000002
- Fork it ( http://github.com/aklaiber/invoice_number/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