Skip to content

gayanhewa/invoicer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SensioLabsInsight

Invoicer

This is a simple invoice generator for developers / freelancer who are lazy to use some software to manage the invoices.

The solution works basically by taking in json file with the relavent data and spiting out a html file that can be viewed by the browser and printed to a PDF or Paper.

Installation

You have the option to clone this repo and build the phar. Or download the phar directly.

	wget https://github.com/gayanhewa/invoicer/blob/master/bin/invoicer.phar

If you decide to build it your self , you need to have Box installed. You can run the below steps :

	box build -c manifest.json

This command will generate the invoicer.phar to bin directory. You can alternatively move add it to your $PATH.

Useage

	Usage:
	  command [options] [arguments]

	Options:
	  -h, --help            Display this help message
	  -q, --quiet           Do not output any message
	  -V, --version         Display this application version
	      --ansi            Force ANSI output
	      --no-ansi         Disable ANSI output
	  -n, --no-interaction  Do not ask any interactive question
	  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

	Available commands:
	  help            Displays help for a command
	  list            Lists commands
	 invoice
	  invoice:create  Create Invoice
	  invoice:sample  Show Sample Json File

invoice:sample

This command will print out how a sample json file looks. You can save it locally and change and use it as an argument for the invoice:create.

	./bin/invoicer.phar invoice:sample > sample.json

Sample JSON file :

	{
	  "owner": {
	    "name" : "Gayan Hewa",
	    "email": "gayanhewa@gmail.com",
	    "address1": "#19-291, Block 622C",
	    "address2": "Punggol Central, 823622",
	    "address3": "Singapore",
	    "logo": "http://gayanhewa.info/invoicer/asset/logo.png"
	  },
	  "receiver": {
	    "name": "Invoicee Company Pte Ltd",
	    "contact_name": "Pearl R. Vest",
	    "email": "PearlRVest@dayrep.com",
	    "address1": "4349 Eagles Nest Drive",
	    "address2": "Sacramento, CA 95814",
	    "address3": "United States"
	  },
	  "items":[
	    {
	      "description": "Invoice for 1st - 15th Oct",
	      "qty": 15,
	      "unit-price": 40,
	      "total": 600
	    },
	    {
	      "description": "Invoice for 16th- 30th Oct",
	      "qty": 10,
	      "unit-price": 40,
	      "total": 400
	    }
	  ],
	  "due_date": "21st, Oct 2015",
	  "created_date": "15th, Oct 2015"
	}

invoice:create

The invoice:crate will take in a input file as the first argument and then return the invoice in html format.

	./bin/invoicer.phar invoice:create ./sample.json

Or even a URL , you can have your invoice json files in a S3 bucket may be for archival sake.

	./bin/invoicer.phar invoice:create https://raw.githubusercontent.com/gayanhewa/invoicer/master/src/templates/invoice-sample.json

The generated invoice will look like below :

Preview

TODO

  • Unit testing

Credits

About

Simple invoicing for developers. Generate invoices with a simple json file from a cloud storage or local storage.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages