generate pdf invoices from text files
Go to file
2023-10-28 12:37:15 +02:00
.gitlab-ci.yml Configure SAST in .gitlab-ci.yml, creating this file if it does not already exist 2023-10-28 09:02:15 +00:00
generate-invoice.py The Nefastis Machine 2023-10-28 12:15:53 +02:00
generate-invoice.scm The Nefastis Machine 2023-10-28 12:15:53 +02:00
invoice-example.pdf The Nefastis Machine 2023-10-28 12:15:53 +02:00
invoice-example.yaml The Nefastis Machine 2023-10-28 12:15:53 +02:00
invoice-template.tex The Nefastis Machine 2023-10-28 12:15:53 +02:00
LICENSE The Nefastis Machine 2023-10-28 12:15:53 +02:00
logo.png The Nefastis Machine 2023-10-28 12:15:53 +02:00
README.org Maxwell's Demon 2023-10-28 12:37:15 +02:00

Invoice template

A simple script for generating pdf invoices from text files.

The template and workflow is build upon LaTeX Simple Invoice Template by Amy Fare (CC BY 4.0) and invoice-boilerplate by Mattia Tezzele (GPL2)

Requirements

  • an XeLaTeX environment such as TeX Liveor MiKTeX
  • pandoc
  • python or guile (or possibly an other scheme)

Instructions for use

  • copy/edit invoice-example.yaml (invoice file must end in .yaml)
  • generate pdf via ./generate-invoice.py invoice.yaml

Template variables

The source file is text in YAML format. The following variables and their values are substituted into the invoice (note that the from details are hardcoded for now)

invoice-number
invoice-date
invoice-due
invoice-to name of recipient
address-1, address-2, address-3, address-4 address can use up to 4 lines
VAT-id

invoice lines itemizing products or services can be included as part of a service list

description description of the item
quantity
unit-price
vat-rate
total line total including any VAT & discounts
details (not used)

The subtotal, taxes and invoice total

invoice-subtotal
invoice-VAT
invoice-total

If required, the invoice can include a line about intra-community supply (for 0% VAT between EU entities) by setting eu-zero to true or false

inside-eu (unused)
eu-zero will add note about “0% VAT” if set to true

payment details (only configured for SEPA bank transfers)

account-name
IBAN
BIC

Adjust some of the typography and layout settings

seriffont e.g. Hoefler Text
sansfont e.g. Fira Sans
fontsize e.g. 10pt
geometry e.g. left=43mm, right=43mm, top=51mm, bottom=17mm

Example

---
invoice-number: 20-A0091
invoice-date: 2020-11-11
invoice-due: 2030-11-11

invoice-to: Erika Mustermann
address-1: Musterallee 23
address-2: 54321 Musterstadt
address-3: Germany
address-4:
VAT-id: DE837566332

# Products & services rendered
service:
- description: Miscellaneous aerospace supplies
  quantity:    7
  unit-price:  320.33
  vat-rate:    19
  total:       2668.35
  details:
- description: Tristero System installation and callibration
  quantity:    1pc
  unit-price:  7120.00
  vat-rate:    19
  total:       8472.80
  details:

# Invoice totals
invoice-subtotal: 9362.31
invoice-VAT:      1778.84
invoice-total:   11141.15

# payment details
account-name: Yoyodyne Inc
IBAN: EV27183413
BIC: EVXXX4

# inside EU and/or 0% VAT rate notice?
inside-eu: true
eu-zero:   false
---