0.0
No commit activity in last 3 years
No release in over 3 years
Ruby Invoice is a gem special for generating invoices in a simple and fast way.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

= 1.0.0
 Project Readme

Gem Version #Ruby Invoices

Ruby Invoices is a simple library that generate invoices for your business.

To add your company logo you must add a folder img with a logo.png file inside of it (non interlaced image). The log must be 129x75 pixels. This is important.

##Installation

To install do

$ gem install 'invoice'

##Usage

First you must instance the method. The invoice number is an int.

invoice = Invoice.new(invoice_number)

Then you must add your client information (optional):

invoice.set_client_info(client_name, client_address, client_dni, client_phone, economic_activity)

After that you add your company information (mandatory):

invoice.add_company_info(your_company_name, your_address, your_phone, your_dni)

Now you can set the options:

invoice.set_language(language) # Options are "en" and "es"(default)
invoice.set_tax(vat_percentage*100) # Integer. Default is 0
invoice.set_currency(currency) # Default is $

To add items to the invoice you must use the add_item method:

invoice.add_item(item_description, item_quantity, item_price)

Finally to generate you must use the generate method and the output file will be generated in the invoices folder.

invoice.generate