ez-invoice
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

Ez Invoice

  • A Simple Invoice Generator for starters

How to use

  • Creating an Invoice
const { createInvoice } = require("ez-invoice")
const { createWriteStream } = require("fs")

const options = {
    storeName: "Fruit Store",
    tax: 10,
    currency: "$",
    paymentMode: "Cash",
    location: "XYZ",
    invoiceID: "123456"
}

let items = [
    {
        name: "Apple",
        beforeTax: 2
    },
    {
        name: "Banana",
        beforeTax: 3
    },
]

const invoice = createInvoice(options, items)
invoice.png.pipe(createWriteStream("./invoice.png"))
//or
invoice.jpeg.pipe(createWriteStream("./invoice.jpeg"))

HTML

<head>
<script src="https://cdn.jsdelivr.net/npm/ez-invoice/index.min.js"></script>
<script>
    const options = {
    storeName: "Fruit Store",
    tax: 10,
    currency: "$",
    paymentMode: "Cash",
    location: "XYZ",
    invoiceID: "123456"
}

let items = [
    {
        name: "Apple",
        beforeTax: 2
    },
    {
        name: "Banana",
        beforeTax: 3
    },
]

const invoiceCanvas = createInvoice(options, items)

document.body.appendChild(invoiceCanvas)
</script>
</head>
<body>
</body>

Package Sidebar

Install

npm i ez-invoice

Weekly Downloads

2

Version

2.0.0

License

ISC

Unpacked Size

31.4 kB

Total Files

7

Last publish

Collaborators

  • jenil-dev