Skip to content

Commit c9ad6de

Browse files
author
Andreas Müller
committed
documentation for invoice
1 parent 8904888 commit c9ad6de

File tree

3 files changed

+120
-1
lines changed

3 files changed

+120
-1
lines changed

documentation.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,10 +273,20 @@ gtt report --output=markdown
273273
gtt report --output=csv
274274
gtt report --output=pdf --file=filename.pdf
275275
gtt report --output=xlsx --file=filename.xlsx
276+
gtt report --output=invoice --file=invoice.md
276277
```
277-
278278
Defaults to `table`. `csv` and `markdown` can be printed to stdout, `pdf` and `xlsx` need the file parameter.
279279

280+
#### Invoice Output
281+
282+
There are additional options for the invoice output as given in the following example:
283+
284+
```shell
285+
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"
286+
```
287+
288+
For paper invoice, further process the output with a css, see the folder preview (styles.css, invoice.pdf)
289+
280290
#### Print the output to a file
281291

282292
```shell
@@ -629,6 +639,26 @@ _checkToken: false
629639

630640
# Skip parsing the issue/merge_request description for time records
631641
_skipDescriptionParsing: false
642+
643+
# settings for invoice output
644+
invoiceSettings:
645+
from:
646+
- Absender FA
647+
- Name
648+
- Strasse
649+
- PLZ ORT
650+
-
651+
- Weitere Infos
652+
fromShort: absender fenstercouvert
653+
opening:
654+
- Satz 1.
655+
- Satz 2.
656+
positionText: Positionstext
657+
closing:
658+
- Grussformel
659+
-
660+
- Name
661+
bankAccount: "Bitte den Betrag auf unser Konto... IBAN .."
632662
```
633663
634664
### Time format

preview/invoice.pdf

16.6 KB
Binary file not shown.

preview/styles.css

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
body {
2+
font-family: "Source Sans Pro";
3+
font-size: 10pt;
4+
margin-top: 70px;
5+
margin-bottom: 120px;
6+
margin-left: 100px;
7+
margin-right: 100px;
8+
}
9+
10+
.h1 {
11+
font-family: "Source Serif Pro";
12+
font-size: 14.3pt;
13+
}
14+
15+
.h2 {
16+
font-family: "Source Serif Pro";
17+
font-size: 12.6pt;
18+
}
19+
.h3 {
20+
font-family: "Source Serif Pro";
21+
font-size: 11.1pt;
22+
}
23+
24+
25+
.senderBox {
26+
margin-bottom: 100px;
27+
}
28+
29+
.addressBox {
30+
width: 30%;
31+
margin-left: 60%;
32+
margin-bottom: 50px;
33+
34+
}
35+
.addressFrom {
36+
font-size: 8pt;
37+
text-decoration: underline;
38+
}
39+
40+
.addressTo {
41+
font-size: 10pt;
42+
}
43+
44+
.dateBox {
45+
text-align: right;
46+
}
47+
48+
.positionBox {
49+
margin-top: 30px;
50+
margin-bottom: 60px;
51+
}
52+
53+
54+
.positionDesc {
55+
display: inline-block;
56+
width: 80%;
57+
margin-top: 5px;
58+
margin-bottom: 5px;
59+
}
60+
61+
62+
.positionValue {
63+
display: inline-block;
64+
width: 19%;
65+
margin-top: 5px;
66+
margin-bottom: 5px;
67+
text-align: right;
68+
}
69+
70+
.positionDescTot {
71+
display: inline-block;
72+
width: 80%;
73+
margin-top: 5px;
74+
margin-bottom: 5px;
75+
}
76+
77+
78+
.positionValueTot {
79+
display: inline-block;
80+
width: 19%;
81+
text-decoration: underline;
82+
margin-top: 5px;
83+
margin-bottom: 5px;
84+
text-align: right;
85+
}
86+
87+
88+
89+

0 commit comments

Comments
 (0)