1
0
Fork 0
mirror of https://github.com/Findus23/invoices.git synced 2024-09-19 15:13:47 +02:00

improve minutes and signing

This commit is contained in:
Lukas Winkler 2018-04-02 22:48:46 +02:00
parent 11acf299ec
commit 0fac5f73f9
No known key found for this signature in database
GPG key ID: 94AFBE7C2656A5B5
2 changed files with 3 additions and 2 deletions

View file

@ -63,7 +63,7 @@ def compile_invoice(id):
loader=jinja2.FileSystemLoader(os.path.abspath('.'))
)
if invoice["mode"] == "hourly":
invoice["total"] = invoice["per_hour"] * invoice["hours"]
invoice["total"] = invoice["per_hour"] * (invoice["hours"] + invoice["minutes"] / 60)
data = {
"from": load_yaml("from.yaml"),
"to": load_yaml("recipients/{id}.yaml".format(id=invoice["recipient"])),
@ -131,6 +131,7 @@ def sign_invoice(id):
),
"-b", "LOCAL", # use local Bürgerkarte
"-a", # automatically position signature
"-v", "true" if name == "Rechnung" else "false",
"-s" # save without asking
])

View file

@ -104,7 +104,7 @@
\VAR{invoice.description} &
\EUR{\VAR{invoice.per_hour | formatdigit }} &
\VAR{invoice.hours} &
\VAR{invoice.hours}:\VAR{invoice.minutes} &
\EUR{\VAR{invoice.total | formatdigit }} \\