Skip to content

📄 Stupid simple invoice generator, because, why not.

License

Notifications You must be signed in to change notification settings

lovethebomb/invoice

Repository files navigation

invoice

Simple JSON-based, HTML invoice generator, with optional custom template.

Screenshot

Requirements

  • Node >= 9 (async / await)

Usage

Configuration file

First, you need to create a configuration file based on config.js.dist.

It can be overriden by the configuration inside the json invoice.

{
    "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

{
    "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.

node index.js create --invoice invoices/sample.json

or

Development

Testing

npm run test

TODO

TODO

License

MIT

About

📄 Stupid simple invoice generator, because, why not.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published