@idot-digital/simple-invoice
v1.1.3
Published
Simple (german) invoice generator
Downloads
5
Readme
Simple Invoice
Simple way to create a pdf invoice.
Example Invoice
How to use it?
Step: 01
Install the package.
yarn add @idot-digital/simple-invoice
Step: 02
import createInvoice from "@idot-digital/simple-invoice";
Step: 03
Store your invoice details into variable and then generate it.
const invoice = {
date: new Date(),
number: "RE12345",
seller: {
name: "Beispielunternehmen",
streetAndNumber: "Musterstraße 69",
zipCode: "12345",
city: "Musterstadt",
phone: "01234/567890",
email: "[email protected]",
UstID: "DE123456789",
TaxID: "12/345/67890",
bankName: "Beispielbank",
iban: "DE11 2222 3333 4444 5555 66",
bic: "BEISPIELXXX",
notesLine1: "Amtsgericht Musterstadt",
notesLine2: "Geschäftsführer: Carl Chef",
},
buyer: {
name: "Max Mustermann",
streetAndNumber: "Musterstrasse 1",
zipCode: "12345",
city: "Musterstadt",
customerNumber: "123456789",
},
items: [
{
name: "Beispielprodukt",
quantity: 1,
price: 18000,
tax: 0.19,
unit: "Stück",
},
{
name: "Anderes Beispielprodukt in mehrfaher Ausführung",
quantity: 5,
price: 5000,
tax: 0.19,
unit: "Stück",
},
{
name: "Produkt mit 7% MwSt.",
quantity: 1,
price: 600,
tax: 0.07,
unit: "Stück",
},
],
};
createInvoice(invoice, "dist/output.pdf");