0.0.3 • Published 10 years ago
auto-invoicer v0.0.3
Auto-invoicer
My first node module for creating invoices with json objects
Description
Auto-invoicer creates invoices through json objects and publishes them as a pdf file
Installation
uses npm package manager to install. use the following command to install:
npm install auto-invoicer
Example
var test = require('./test.js');
var write = new test();
//read json file:
var obj;
var fs = require("fs");
var data;
var data = fs.readFileSync("invoice.json", "UTF-8");
//parse to an object
var obj = JSON.parse(data);
write.generate(obj);//send in the json object
write.writer();//write the file
JSON file structure
{
"customer" : {
"name" : "person's name",
"address" : "person's address",
"items": [
{
"description" : "item 1 description",
"price" : 100.0,
"quantity" : 5
},
{
"description" : "item 2 description",
"price" : 200.0,
"quantity" : 9
},
{
"description" : "item 3 description",
"price" : 500.0,
"quantity" : 10
}
],
"vat" : 14.0,
"date" : "2013-12-12"
}
}
Updates may include features such as:
- Editing footers and headers
- Editing photo and adding photo
- User suggestions
Features
- Unlimited entries (automatically extend to more pages as needed)
- PDF output for invoices
- Image in invoice
Thanks
I will be happy to know that people are using this module.
Enjoy.
Contact: dampi05@gmail.com