https://github.com/lovethebomb/invoice
📄 Stupid simple invoice generator, because, why not.
https://github.com/lovethebomb/invoice
generator invoice javascript json pug
Last synced: about 2 months ago
JSON representation
📄 Stupid simple invoice generator, because, why not.
- Host: GitHub
- URL: https://github.com/lovethebomb/invoice
- Owner: lovethebomb
- License: mit
- Created: 2018-07-07T10:09:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-11T20:44:22.000Z (over 7 years ago)
- Last Synced: 2025-06-22T15:47:46.064Z (about 1 year ago)
- Topics: generator, invoice, javascript, json, pug
- Language: JavaScript
- Homepage:
- Size: 85.9 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# invoice
Simple JSON-based, HTML invoice generator, with optional custom template.

## Requirements
* Node >= 9 (async / await)
## Usage
### Configuration file
First, you need to create a configuration file based on [config.js.dist][config].
It can be overriden by the configuration inside the json invoice.
```bash
{
"company": {
"name": "My Company",
"email": "invoice@my-company.tld",
"address": {
"street": "Company Street Name",
"postcode": "Company Post Code",
"city": "Company City",
"country": "Company Country"
},
"vat": "123456789",
"coc": "123456789",
"iban": "123456789",
"swift": "CODE42CODE"
},
"payment_term": "30 days",
"tax": {
"rate": 0.42
},
"currency": {
"code": "EUR",
"text": "€"
}
}
```
### Invoice file
Create an invoice file based on [the sample invoice][invoice-sample]
```bash
{
"id": 10001,
"issued_date": "2018-07-05",
"mode": {
"unit": "Hours",
"rate": "Hourly Rate"
},
"client": {
"id": "great-client",
"name": "Great Client Ltd",
"address": {
"street": "Client Street",
"postcode": "Client Post code",
"city": "Client City",
"country": "Client Country"
},
"vat": "CL123456789",
"coc": {
"name": "CoC",
"value": "123456789"
}
},
"tasks": [
{
"description": "A well executed task",
"rate": 42,
"quantity": 5
}
]
}
```
### Commands
Create an HTML invoice.
```bash
node index.js create --invoice invoices/sample.json
or
```
## Development
## Testing
```bash
npm run test
```
## TODO
[TODO][todo]
## License
[MIT][license]
[config]: config.json.dist
[invoice-sample]: invoices/10001.json
[todo]: TODO.md
[license]: LICENSE.md