summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2018-09-13 10:22:26 +0300
committerLars Wirzenius <liw@liw.fi>2018-09-13 10:22:26 +0300
commit60c8387401ebfd69cbe9f88a2a231f51da11bef0 (patch)
tree4cf59ed43a5331b528b336c22dd0d79cfae54308
parent1b74f19d492885cc136d3e0c56c0fb1bd2ef068b (diff)
downloadlasku-60c8387401ebfd69cbe9f88a2a231f51da11bef0.tar.gz
Change: add company VAT back to footer
-rwxr-xr-xlasku.py7
-rw-r--r--template.tex2
2 files changed, 5 insertions, 4 deletions
diff --git a/lasku.py b/lasku.py
index 110c636..c4fa355 100755
--- a/lasku.py
+++ b/lasku.py
@@ -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}
}