X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=odtgen.sh;h=177065a9c9a0fd10f92cba31058aceacc51f1b98;hb=026cd2e0fc6081c19d681a40720f7a70b449f3d8;hp=c0f244825b74fad45a4d4e490c11cee03e5181ef;hpb=1d50621aa549b7a5c673a72de1dc74f368a5c58a;p=invoices
diff --git a/odtgen.sh b/odtgen.sh
index c0f2448..177065a 100755
--- a/odtgen.sh
+++ b/odtgen.sh
@@ -12,7 +12,7 @@ odt_manifest(){
}
odt_stylesheet(){
- local iban="$2" bic="$3"
+ local iban="$1" bic="$2"
cat <<-EOF
@@ -46,8 +46,8 @@ odt_stylesheet(){
Bankverbindung - IBAN:
- ${iban} |
- BIC:
+ ${iban}
+ | BIC:
${bic}
@@ -69,16 +69,19 @@ odt_content(){
-
+
-
+
-
+
-
-
+
+
+
+
+
@@ -92,6 +95,10 @@ odt_content(){
+
+
+
+
@@ -127,16 +134,16 @@ odt_content(){
$(HTML "$sender" |sed -r 's;(
\;)?
\;;;g')$(HTML "$sender" |sed -r 's;(
\;)?
\;|(?[Dd]\;)??[aA]\;|\r?$;;g')
$(HTML "$client" |sed -r 's;(
\;)?
\;;;g')$(HTML "$client" |sed -r 's;(
\;)?
\;|(?[Dd]\;)??[aA]\;|\r?$;;g')
- Rechnung ${issuance}
+ Rechnung ${number}
@@ -152,8 +159,8 @@ odt_content(){
-
-
+
+
@@ -171,16 +178,16 @@ odt_content(){
$(sed 1d "invoices/$id" |while read -r time work hours; do
- time="$(UNSTRING "${time#time=}")"
- work="$(UNSTRING "${work#work=}")"
+ time="$(UNSTRING "${time#time=}" |sed 's;\r;;g')"
+ work="$(UNSTRING "${work#work=}" |sed 's;\r;;g')"
hours="$(UNSTRING "${hours#hours=}")"
cat <<-TROW
- ${time}
+ ${time}
- ${item}
+ ${work}
${hours}
@@ -286,7 +293,7 @@ genodt(){
genpdf(){
local id="$1"
genodt "$id"
- writer --convert-to pdf --outdir "export/" "export/${id}.odt" >/dev/null
+ lowriter --convert-to pdf --outdir "export/" "export/${id}.odt" >/dev/null
rm "export/${id}.odt"
}