From 60c8387401ebfd69cbe9f88a2a231f51da11bef0 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 13 Sep 2018 10:22:26 +0300 Subject: Change: add company VAT back to footer --- lasku.py | 7 ++++--- template.tex | 2 +- 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} } -- cgit v1.2.1