/yoyodyne

generate pdf invoices from text files

Primary LanguageTeXGNU General Public License v3.0GPL-3.0

logo.png

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-toname of recipient
address-1, address-2, address-3, address-4address can use up to 4 lines
VAT-id

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

descriptiondescription of the item
quantity
unit-price
vat-rate
totalline 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-zerowill 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

seriffonte.g. Hoefler Text
sansfonte.g. Fira Sans
fontsizee.g. 10pt
geometrye.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
---