mirror of
https://github.com/Findus23/invoices.git
synced 2024-09-19 15:13:47 +02:00
minor fixes
This commit is contained in:
parent
6ecc9a0885
commit
e87e980810
3 changed files with 8 additions and 6 deletions
8
main.py
8
main.py
|
@ -129,9 +129,9 @@ def sign_invoice(id):
|
|||
print("Invoice not found")
|
||||
name = ""
|
||||
exit()
|
||||
subprocess.check_call([
|
||||
command = [
|
||||
"java",
|
||||
"-jar", "/usr/local/PDF-Over/lib/pdf-over-gui-4.1.17.jar",
|
||||
"-jar", "/usr/local/PDF-Over/lib/pdf-over-gui-4.1.18.jar",
|
||||
"-i", "{dir}/{name}.pdf".format(dir=directory, name=name),
|
||||
"-o", "{dir}/{name}_{signed}.pdf".format(
|
||||
dir=directory, name=name, signed=("signiert" if name == "Rechnung" else "signed")
|
||||
|
@ -140,7 +140,9 @@ def sign_invoice(id):
|
|||
"-a", # automatically position signature
|
||||
"-v", "true" if name == "Rechnung" else "false",
|
||||
"-s" # save without asking
|
||||
])
|
||||
]
|
||||
print(" ".join(command))
|
||||
subprocess.check_call(command)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
\newcommand{\CityShort}{\VAR{from.cityShort}}
|
||||
|
||||
\setkomavar{fromaddress}{\Address\\\ZIP~\City
|
||||
\BLOCK{if to.country!="Austria"}\\\VAR{from.country}\BLOCK{endif}}
|
||||
\BLOCK{if to.country!="Österreich"}\\\VAR{from.country}\BLOCK{endif}}
|
||||
\setkomavar{fromphone}[]{\VAR{from.phone}}
|
||||
\setkomavar{fromemail}[]{\VAR{from.email}}
|
||||
\setkomavar{fromurl}[]{\VAR{from.url}}
|
||||
|
@ -83,7 +83,7 @@
|
|||
% Begin document
|
||||
\begin{document}
|
||||
\begin{letter}{\VAR{to.name} \\ \VAR{to.address} \\ \VAR{to.plz}~\VAR{to.ort}
|
||||
\BLOCK{if to.country!="Austria"}\\\VAR{to.country}\BLOCK{endif}}
|
||||
\BLOCK{if to.country!="Österreich"}\\\VAR{to.country}\BLOCK{endif}}
|
||||
\setkomavar{title}{\VAR{invoice.title}}
|
||||
\opening{}
|
||||
|
||||
|
|
2
utils.py
2
utils.py
|
@ -41,7 +41,7 @@ def ask(question, validator=None, default=None, set=None):
|
|||
continue
|
||||
if validator == "money":
|
||||
try:
|
||||
answer = int(answer * 100)
|
||||
answer = int(float(answer) * 100)
|
||||
except ValueError:
|
||||
continue
|
||||
if validator == "int":
|
||||
|
|
Loading…
Reference in a new issue