diff --git a/documentation.md b/documentation.md index 41fe224..fabfb2d 100644 --- a/documentation.md +++ b/documentation.md @@ -273,10 +273,20 @@ gtt report --output=markdown gtt report --output=csv gtt report --output=pdf --file=filename.pdf gtt report --output=xlsx --file=filename.xlsx +gtt report --output=invoice --file=invoice.md ``` - Defaults to `table`. `csv` and `markdown` can be printed to stdout, `pdf` and `xlsx` need the file parameter. +#### Invoice Output + +There are additional options for the invoice output as given in the following example: + +```shell +gtt report --output=invoice --file=invoice.md --from 2021-02-01 --to 2021-02-28 --closed --invoiceCurrencyMaxUnit 1 --invoiceTitle "Rechnung" --invoiceAddress "Firma" "Mr. X" "Strasse" "10000 Ort" "Land" --invoiceCurrency "EUR" --invoiceCurrencyPerHour "50" --invoiceVAT "0.15" --invoiceDate "1.03.2021" +``` + +For paper invoice, further process the output with a css, see the folder preview (styles.css, invoice.pdf) + #### Print the output to a file ```shell @@ -629,6 +639,26 @@ _checkToken: false # Skip parsing the issue/merge_request description for time records _skipDescriptionParsing: false + +# settings for invoice output +invoiceSettings: + from: + - Absender FA + - Name + - Strasse + - PLZ ORT + - + - Weitere Infos + fromShort: absender fenstercouvert + opening: + - Satz 1. + - Satz 2. + positionText: Positionstext + closing: + - Grussformel + - + - Name + bankAccount: "Bitte den Betrag auf unser Konto... IBAN .." ``` ### Time format diff --git a/preview/invoice.pdf b/preview/invoice.pdf new file mode 100644 index 0000000..258f19c Binary files /dev/null and b/preview/invoice.pdf differ diff --git a/preview/styles.css b/preview/styles.css new file mode 100644 index 0000000..4a99463 --- /dev/null +++ b/preview/styles.css @@ -0,0 +1,89 @@ +body { + font-family: "Source Sans Pro"; + font-size: 10pt; + margin-top: 70px; + margin-bottom: 120px; + margin-left: 100px; + margin-right: 100px; +} + +.h1 { + font-family: "Source Serif Pro"; + font-size: 14.3pt; +} + +.h2 { + font-family: "Source Serif Pro"; + font-size: 12.6pt; +} +.h3 { + font-family: "Source Serif Pro"; + font-size: 11.1pt; +} + + +.senderBox { + margin-bottom: 100px; +} + +.addressBox { + width: 30%; + margin-left: 60%; + margin-bottom: 50px; + +} +.addressFrom { + font-size: 8pt; + text-decoration: underline; +} + +.addressTo { + font-size: 10pt; +} + +.dateBox { + text-align: right; +} + +.positionBox { + margin-top: 30px; + margin-bottom: 60px; +} + + +.positionDesc { + display: inline-block; + width: 80%; + margin-top: 5px; + margin-bottom: 5px; +} + + +.positionValue { + display: inline-block; + width: 19%; + margin-top: 5px; + margin-bottom: 5px; + text-align: right; +} + +.positionDescTot { + display: inline-block; + width: 80%; + margin-top: 5px; + margin-bottom: 5px; +} + + +.positionValueTot { + display: inline-block; + width: 19%; + text-decoration: underline; + margin-top: 5px; + margin-bottom: 5px; + text-align: right; +} + + + +