Skip to content

Create good looking invoices for gnucash using latex/koma and python

Notifications You must be signed in to change notification settings

jappeace/gnucash-latex-koma

Repository files navigation

The output file can be imported into KOMA-Script-letters. This works primarily for germany. Internationalization welcome!

Usage :

\code latex_invoice file://testfile \endcode will create file data.lco. \code latex –output-format=pdf Invoice.tex \endcode should run latex on file Invoice.tex and result in Invoice.pdf. Invoice.tex includes data.lco.

Additional information :

Hacking

Finding information about the api can be difficult. So here some aditional sources:

  1. this project export gnucash to json (in a self invented method) https://github.com/cirrax/gnucash-toolset/tree/master/gnucashtoolset
  2. This is an api documentation, however I found inconsistencies with the current api I used: https://piecash.readthedocs.io/en/latest/tutorial/index_existing.html#other-objects

Install

for Ubuntu 14.04:

apt install texlive-latex-base texlive-latex-recommended python-gnucash texlive-lang-german pdflatex ipython

Clone this repo

Change for your needs:

latex_invoices.py: scroll down to ‘def main’ and change input_url = ” to your gnucash connections (file, mysql, etc.) for MySQL it’s mysql://\<USERNAME>:\<PASSWORD>@\<SERVER>/\<DATABASE> Replace Benjamin_Franklein.pdf with your signature (source:https://commons.wikimedia.org/wiki/File:Autograph_of_Benjamin_Franklin.svg) adapt company.lco to fit your needs

Credits to and ideas from

To Do:

  • Propper localization
  • get own contact data from gnucash
  • have own bank information in footline
  • nicer formatting of invoice date and date due
  • is there anything else missing in this invoice ?

Structural

Additional files:

  • Invoice.tex\n

Example template file. Should be modified according to personal needs.

  • rechnung.sty\n

style file for invoices.\n This file is not part of the python-bindings!\n For an example where to get it see section credits below.

About

Create good looking invoices for gnucash using latex/koma and python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published