]> git.plutz.net Git - invoices/blobdiff - odtgen.sh
bugfix: include issuance number and work items
[invoices] / odtgen.sh
index c0f244825b74fad45a4d4e490c11cee03e5181ef..9ed1e22bbc7c57e3ecf9f9793da49f9cc88120c9 100755 (executable)
--- 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
        <?xml version="1.0" encoding="UTF-8"?>
@@ -46,8 +46,8 @@ odt_stylesheet(){
              <style:footer>
                <text:p text:style-name="MP1">
                  <text:span text:style-name="MT1">Bankverbindung - IBAN:</text:span>
-                 <text:span>${iban} |</text:span>
-                 <text:span text:style-name="MT1">BIC:</text:span>
+                 <text:span>${iban}</text:span>
+                 <text:span text:style-name="MT1">BIC:</text:span>
                  <text:span>${bic}</text:span>
                </text:p>
              </style:footer>
@@ -136,7 +136,7 @@ odt_content(){
                    -->$(HTML "$client" |sed -r 's;(&#13\;)?&#10\;;<text:line-break/>;g')<!--
                   --></text:p>
                  </draw:text-box>
-               </draw:frame><text:span text:style-name="T3">Rechnung ${issuance}</text:span>
+               </draw:frame><text:span text:style-name="T3">Rechnung ${number}</text:span>
              </text:p>
              <text:p text:style-name="P3"/>
              <text:p text:style-name="P3"/>
@@ -180,7 +180,7 @@ odt_content(){
                            <text:p text:style-name="P3">${time}</text:p>
                          </table:table-cell>
                          <table:table-cell table:style-name="Table1.2" office:value-type="string">
-                           <text:p text:style-name="P3">${item}</text:p>
+                           <text:p text:style-name="P3">${work}</text:p>
                          </table:table-cell>
                          <table:table-cell table:style-name="Table1.2" office:value-type="string">
                            <text:p text:style-name="P5">${hours}</text:p>
@@ -286,7 +286,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"
 }