This is simple invoice generator, that let's you keep all your invoices as one big json
file, and generate .pdf
from it when needed.
config.js
keeps name oftemplate
path, so you can copydefault
template, and edit it to your needs. There is also a flag calledgenerateAll
, this gives you the possibility to either generate all invoices at once, or only the last one (default isfalse
, which means only last invoice will be generated)default
template is simply a skeleton from which you can create your own templateinvoices.json
is most important file, since it keeps all the invoices to be generated.- if given
item
initems
array for giveninvoice
hassumNetto
sumVat
andsumBrutto
fields, they will not be calculated by the script, this is done for those situations, where for some reason you need to manually edit the values. They will be correctly added to the whole sum in the end
- make proper entries in
invoices.json
and pick the template (or stay ondefault
) - launch
npm run generate
- after finish, folder
generatedPdfs
will contain all generated invoices.
Since in Poland, standard invoices should have "amount in words" field, there is polish amount to words generator
already implemented.
No other languages are supported at the moment (if someone wold like to add them - let me know)