Package: invoicepy
invoicepyCLIinvoice tool, store and print invoices aspdf. save companies and
customers for later use.installationpip install invoicepysee troubleshooting section below for common problemsconfigconfigstorescompaniesandcustomersby alias andinvoices.custom_templates_diris available for customising templates.writesample configwith:invoicepy sample-config
# then customize it in $HOME/.invoicepy.confexamplesprint pdf saving it in current directory, result is invoice nr. BAR001invoicepy pdf --company foo --customer bar --line '{"price":10, "qty": 20, "name":"1h services"}' --series BARwhen above is repeated twice, the invoices numers will increase, BAR002, BAR003. this is calculated per series.
see below for more options.below example won't save invoice in config, open in it browser and use custom template specified incustom_templates_dir:invoicepy pdf --company foo --customer bar --line ... -b --no-save --series BAR --number 25 --curency USD --template my_custom_template.htmlcliinvoicepy [OPTIONS] COMMAND [ARGS]...

Options:
  -C, --config PATH
  --help             Show this message and exit.

Commands:
sample-config        generate sample config in home dir
pdf                  prints pdf to given pathpdfOptions:
  -l, --line TEXT       json string of invoice line, can pass multiple. ex:
                        --line '{"price":15, "qty": 100, "name":"1h cleaning
                        services", "vat": 21}' --line ...  [required]

			The fields are as follows:
			`price` - price of product
			`qty` - quantity of product
			`name` - name of product
			`vat` - vat rate %


  -c, --company TEXT    company alias as in configuration.  [required]
  -r, --customer TEXT   customer alias as in configuration.  [required]
  -d, --date TEXT       invoice date, `create_date` field.
  -e, --due-date TEXT   If due date is not provided, `payment_term_days` is
                        used to calculate it.

  -s, --series TEXT     invoice series  [required]
  -n, --number INTEGER  invoice number, if not provided, it will calculated
                        from company config for given series.

  -u, --currency TEXT   currency, default=EUR
  -o, --output PATH     output path, can be new filepath, directory. If it's
                        not provided the invoice pdf will be saved in current
                        directory.

  -t, --template TEXT   template name, ex. simple.html. `custom_templates_dir`
                        will be searched first, then package templates.

  --save / --no-save    decides whether to store invoice in config file.
  -b, --browser         open generated invoice in browser.
  --help                show this message and exit.templatescurrently two templates are available:simple.html- simple english template (default).simple_lt.html- simple lithuanian/english template.you can pass your own template name with-t. seecustom_templates_dir(config section). have a look on schema below in case you want to write your own templates. templates are written in html and usejinja2templating language.schemaschema/invoice.jsonschema/config.jsontroubleshootingProblemSolutioninvoicepy: command not foundYour distro didn't append python bin folder to your PATH. You can check where package lives withpip3 show invoicepyand add appropriate path. Example in your .bashrc:export PATH="$PATH:$HOME/.local/bin"OSError: encoder jpeg2k not availableThis is caused by pillow needing some extra libs, on Ubuntu:sudo apt-get install libjpeg8-devthenpip install --no-cache-dir -I pillow. On other distros findlibjpeg8-devequiavilent or google around for solutions regarding pillow.sample-configsaysAbortingand existsFixed in0.1.1contributingif you written cool new template or improved some features, feel free to fork and PR. Seecontributing guidelines.to-dosuse babel for translations and localeextend testsconsider moving config to yamlbackup copy config on startinvoices should have unique ids (maybe companies and customers too?)view saved invoicesreprint saved invoices (?)package for arch (AUR)CreditsThis package was created withCookiecutterand thejohanvergeer/cookiecutter-poetryproject template.Template taken from here and slightly modified:https://github.com/sparksuite/simple-html-invoice-templateLicenceFree software: MIT license