diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-09-13 10:22:26 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-09-13 10:22:26 +0300 |
commit | 60c8387401ebfd69cbe9f88a2a231f51da11bef0 (patch) | |
tree | 4cf59ed43a5331b528b336c22dd0d79cfae54308 | |
parent | 1b74f19d492885cc136d3e0c56c0fb1bd2ef068b (diff) | |
download | lasku-60c8387401ebfd69cbe9f88a2a231f51da11bef0.tar.gz |
Change: add company VAT back to footer
-rwxr-xr-x | lasku.py | 7 | ||||
-rw-r--r-- | template.tex | 2 |
2 files changed, 5 insertions, 4 deletions
@@ -1,6 +1,7 @@ #!/usr/bin/env python3 +import os import sys import yaml @@ -62,8 +63,6 @@ class Item: total_vat_cents = self['total_vat_cents'] total_cents = self['total_cents'] - debug(self.dict) - assert unit_net_cents * count == total_net_cents, \ '{} * {} != {}'.format(unit_net_cents, count, total_net_cents) @@ -123,7 +122,9 @@ def substitute_all(text, subst): return text -text = cat('template.tex') +dirname = os.path.dirname(__file__) +filename = os.path.join(dirname, 'template.tex') +text = cat(filename) with open(sys.argv[1]) as f: company = yaml.safe_load(f) diff --git a/template.tex b/template.tex index 5f1f4b6..1039e49 100644 --- a/template.tex +++ b/template.tex @@ -152,7 +152,7 @@ } & \parbox[t]{3.25cm}{ Viitenumero: {\tt \mbox{#invoicerefcode#}} \\ -% VAT: {\tt \mbox{#companyvat#}} + VAT: {\tt \mbox{#companyvat#}} } \\ \end{tabular} } |