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:
parent
11acf299ec
commit
0fac5f73f9
2 changed files with 3 additions and 2 deletions
3
main.py
3
main.py
|
@ -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
|
||||
])
|
||||
|
||||
|
|
|
@ -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 }} \\
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue