Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3d229eb9

Von Marei Peischl vor mehr als 3 Jahren hinzugefügt

  • ID 3d229eb932520febe9d8147cf3413c7b13a23b4b
  • Vorgänger 4ec81d44
  • Nachfolger 424ee46d

marei: adjust indentation using latexindent according to kivitendo regulations 2 spaces instead of 1 tab

Unterschiede anzeigen:

templates/print/marei/bin_list.tex
13 13
\setkomavar{title}{\lagerliste}
14 14

  
15 15
\setkomavar{firsthead}{
16
	\normalsize
17
	\noindent\begin{tabular}[t]{@{}l@{}}
18
		<%company%>\strut\\
19
		<%address%>
20
	\end{tabular}
21
	\hfill
22
 \begin{tabular}[t]{rr@{}}
23
		Tel & <%tel%>\\
24
		Fax & <%fax%>%
25
	\end{tabular}
26
	\rule{\linewidth}{\heavyrulewidth}
16
  \normalsize
17
  \noindent\begin{tabular}[t]{@{}l@{}}
18
    <%company%>\strut\\
19
    <%address%>
20
  \end{tabular}
21
  \hfill
22
  \begin{tabular}[t]{rr@{}}
23
    Tel & < %tel%>\\
24
    Fax & < %fax%>%
25
  \end{tabular}
26
  \rule{\linewidth}{\heavyrulewidth}
27 27
}
28 28

  
29 29
\makeatletter
30 30
\setkomavar{location}{
31
		\backaddr@format{\scriptsize\usekomafont{backaddress}%
32
			\strut\lieferanschrift
33
		}
34
		\par\medskip\setlength{\parskip}{\z@}
35
		\normalsize
36
		<%shiptoname%>\par
37
		<%if shiptocontact%> <%shiptocontact%><%end if%>\par
38
		<%shiptodepartment_1%>\par
39
		<%shiptodepartment_2%>\par
40
		<%shiptostreet%>\par
41
		<%shiptozipcode%> <%shiptocity%>%
42
	}
31
  \backaddr@format{\scriptsize\usekomafont{backaddress}%
32
    \strut\lieferanschrift
33
  }
34
  \par\medskip\setlength{\parskip}{\z@}
35
  \normalsize
36
  <%shiptoname%>\par
37
  <%if shiptocontact%> <%shiptocontact%><%end if%>\par
38
  <%shiptodepartment_1%>\par
39
  <%shiptodepartment_2%>\par
40
  <%shiptostreet%>\par
41
  <%shiptozipcode%> <%shiptocity%>%
42
}
43 43
\makeatother
44 44

  
45 45
\begin{letter}{
46
		<%name%>\ifhmode\\\fi
47
		<%street%>\ifhmode\\\fi
48
		<%zipcode%> <%city%>\ifhmode\\\fi
49
		<%country%>
50
	}
46
<%name%>\ifhmode\\\fi
47
<%street%>\ifhmode\\\fi
48
<%zipcode%> <%city%>\ifhmode\\\fi
49
<%country%>
50
}
51 51

  
52 52
\opening{}
53 53

  
54 54
\begin{SimpleTabular}[colspec=*6X,headline={\bfseries\bestellnummer&\bfseries\datum&\bfseries\kontakt
55
  <%if warehouse%>%
56
  &\bfseries\lager%
57
  <%end warehouse%>%
58
  &\bfseries\lagerplatz&\bfseries\lieferungMit}]
55
        <%if warehouse%>%
56
        &\bfseries\lager%
57
        <%end warehouse%>%
58
        &\bfseries\lagerplatz&\bfseries\lieferungMit}]
59 59

  
60 60
  <%ordnumber%>%
61 61
  &%
62 62
  <%if shippingdate%>%
63
	<%shippingdate%>%
63
  <%shippingdate%>%
64 64
  <%end shippingdate%>%
65 65
  <%if not shippingdate%>%
66
	<%orddate%>%
66
  <%orddate%>%
67 67
  <%end shippingdate%>%
68 68
  & <%employee%>%
69 69
  <%if warehouse%>%
......
75 75
\bigskip
76 76

  
77 77
\begin{SimpleTabular}[colspec=rlXllrrll,headline={\bfseries\position&\bfseries\nummer&\bfseries\beschreibung&\bfseries\seriennummer & &\bfseries\menge&\bfseries\erh&&\bfseries\lagerplatz}]
78
<%foreach number%>%
78
  <%foreach number%>%
79 79
  <%runningnumber%> & <%number%> & <%description%> & <%serialnumber%> &
80 80
  <%deliverydate%> & <%qty%> & <%ship%> & <%unit%> & <%bin%> \\
81
<%end number%>%
81
  <%end number%>%
82 82
\end{SimpleTabular}
83 83

  
84 84
\end{letter}
templates/print/marei/check.tex
31 31
\begin{document}
32 32

  
33 33
\begin{letter}{
34
		<%name%>\ifhmode\\\fi
35
		<%street%>\ifhmode\\\fi
36
		<%zipcode%> <%city%>\ifhmode\\\fi
37
		<%country%>%
38
	}
34
<%name%>\ifhmode\\\fi
35
<%street%>\ifhmode\\\fi
36
<%zipcode%> <%city%>\ifhmode\\\fi
37
<%country%>%
38
}
39 39

  
40 40
\opening{<%company%>}
41 41
\pagestyle{empty}
......
43 43
<%name%> \hfill <%datepaid%> \hfill <%source%>%
44 44

  
45 45
\begin{SimpleTabular}[colspec=lXrr,headline={\bfseries\rechnung&\bfseries\ausgestellt&\bfseries\faellig&\bfseries\verrechnet}]
46
<%foreach invnumber%>%
47
<%invnumber%> & <%invdate%> & <%due%> & <%paid%> \\
48
<%end invnumber%>%
46
  <%foreach invnumber%>%
47
  <%invnumber%> & <%invdate%> & <%due%> & <%paid%> \\
48
  <%end invnumber%>%
49 49
\end{SimpleTabular}
50 50

  
51 51
\end{letter}
templates/print/marei/credit_note.tex
58 58
\begin{document}
59 59

  
60 60
\begin{letter}{
61
		<%name%>\strut\\
62
		<%if department_1%><%department_1%>\\<%end if%>%
63
		<%if department_2%><%department_2%>\\<%end if%>%
64
		<%cp_givenname%> <%cp_name%>\strut\\
65
		<%street%>\strut\\
66
		<%zipcode%> <%city%>\strut\\
67
		<%country%> \strut
68
	}
61
<%name%>\strut\\
62
<%if department_1%><%department_1%>\\<%end if%>%
63
<%if department_2%><%department_2%>\\<%end if%>%
64
<%cp_givenname%> <%cp_name%>\strut\\
65
<%street%>\strut\\
66
<%zipcode%> <%city%>\strut\\
67
<%country%> \strut
68
}
69 69

  
70 70
% Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
71 71
% Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
72 72
\opening{
73
	\Ifstr{<%cp_name%>}{}
74
		{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
75
		{
76
			\Ifstr{<%cp_gender%>}{f}
77
				{\anredefrau}
78
				{\anredeherr}
79
				<%cp_title%> <%cp_name%>,
80
		}
81
	}
73
\Ifstr{<%cp_name%>}{}
74
{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
75
  {
76
    \Ifstr{<%cp_gender%>}{f}
77
        {\anredefrau}
78
        {\anredeherr}
79
      <%cp_title%> <%cp_name%>,
80
    }
81
  }
82 82
\thispagestyle{kivitendo.letter.first}
83 83

  
84 84

  
85 85
\gutschriftformel
86 86

  
87 87
\begin{PricingTabular*}%
88
% eigentliche Tabelle%
89
\FakeTable{%
90
	<%foreach number%>%
91
		<%runningnumber%> &%
92
		<%number%> &%
93
		\textbf{<%description%>}%
94
		<%if longdescription%>\ExtraDescription{<%longdescription%>}<%end longdescription%>%
95
		<%if serialnumber%>\ExtraDescription{\seriennummer: <%serialnumber%>}<%end serialnumber%>%
96
		<%if ean%>\ExtraDescription{\ean: <%ean%>}<%end ean%>%
97
		<%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>%
98
		&%
99
		<%qty%> <%unit%> &%
100
		<%sellprice%>&%
101
		\Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
102
		<%linetotal%>\tabularnewline%
103
	<%end number%>%
104
	}%
105
	\begin{PricingTotal}%
106
		% Tabellenende letzte Seite
107
		\nettobetrag & <%subtotal%>\\%
108
		<%foreach tax%>%
109
		<%taxdescription%> & <%tax%>\\%
110
		<%end tax%>%
111
		\bfseries\schlussbetrag &  \bfseries <%ordtotal%>\\%
112
	\end{PricingTotal}%
88
  % eigentliche Tabelle%
89
  \FakeTable{%
90
  <%foreach number%>%
91
  <%runningnumber%> &%
92
  <%number%> &%
93
  \textbf{<%description%>}%
94
  <%if longdescription%>\ExtraDescription{<%longdescription%>}<%end longdescription%>%
95
  <%if serialnumber%>\ExtraDescription{\seriennummer: <%serialnumber%>}<%end serialnumber%>%
96
  <%if ean%>\ExtraDescription{\ean: <%ean%>}<%end ean%>%
97
  <%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>%
98
  &%
99
  <%qty%> <%unit%> &%
100
  <%sellprice%>&%
101
  \Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
102
    <%linetotal%>\tabularnewline%
103
    <%end number%>%
104
  }%
105
  \begin{PricingTotal}%
106
    % Tabellenende letzte Seite
107
    \nettobetrag & <%subtotal%>\\%
108
    <%foreach tax%>%
109
    <%taxdescription%> & <%tax%>\\%
110
    <%end tax%>%
111
    \bfseries\schlussbetrag &  \bfseries <%ordtotal%>\\%
112
  \end{PricingTotal}%
113 113
\end{PricingTabular*}
114 114

  
115 115
<%if notes%>%
templates/print/marei/ic_supply.tex
23 23
\vspace{0.4cm}
24 24

  
25 25
{\color{purple} Bitte unterschreiben und faxen/mailen an:
26
  \begin{center} <%employee_fax%> / <%employee_email%> \end{center}}
26
\begin{center} <%employee_fax%> / <%employee_email%> \end{center}}
27 27
\normalsize
28 28
\vspace{0.4cm}
29 29
<%name%>, <%street%>, <%zipcode%> <%city%>, <%country%>\hspace*{\fill}\\
......
45 45
im\\
46 46

  
47 47
\uline{ \StrGobbleLeft{<%reqdate%>}{3} \hspace*{\fill}}\\
48
{\color{gray}(Monat und Jahr des Erhalts des Liefergegenstands im Mitgliedstaat, in den der Liefergegenstand gelangt ist, wenn der liefernde Unternehmer den Liefergegenstand befördert oder versendet hat oder wenn der Abnehmer den Liefergegenstand versendet hat)}\\
48
  {\color{gray}(Monat und Jahr des Erhalts des Liefergegenstands im Mitgliedstaat, in den der Liefergegenstand gelangt ist, wenn der liefernde Unternehmer den Liefergegenstand befördert oder versendet hat oder wenn der Abnehmer den Liefergegenstand versendet hat)}\\
49 49

  
50 50

  
51 51
\TextField[name=delivery, bordercolor=gray, width=\linewidth]{}\\
......
55 55

  
56 56

  
57 57
\uline{<%country%>\hspace*{\fill}}\\
58
{\color{gray}(Mitgliedstaat und Ort, wohin der Liefergegenstand im Rahmen einer Beförderung oder Versendung gelangt ist)}\\
58
  {\color{gray}(Mitgliedstaat und Ort, wohin der Liefergegenstand im Rahmen einer Beförderung oder Versendung gelangt ist)}\\
59 59

  
60 60
erhalten habe / gelangt ist.
61 61

  
templates/print/marei/ic_supply_EN.tex
23 23
\vspace{0.4cm}
24 24

  
25 25
{\color{purple} Please sign below and send back to fax-number/mail-address:
26
  \begin{center} <%employee_fax%> / <%employee_email%> \end{center}}
26
\begin{center} <%employee_fax%> / <%employee_email%> \end{center}}
27 27

  
28 28
\normalsize
29 29
\vspace{0.4cm}
......
44 44
in\\
45 45

  
46 46
\uline{ \StrGobbleLeft{<%reqdate%>}{3} \hspace*{\fill}}\\
47
{\color{gray}(Month and year the object of the supply was received in the Member State of entry if the supplying trader transported or dispatched the object of the supply or if the customer dispatched the object of the supply)}\\
47
  {\color{gray}(Month and year the object of the supply was received in the Member State of entry if the supplying trader transported or dispatched the object of the supply or if the customer dispatched the object of the supply)}\\
48 48

  
49 49
\TextField[name=delivery, bordercolor=gray, width=\linewidth]{}\\
50 50
{\color{gray}(Month and year the transportation ended if the customer transported the object of the supply himself or herself)}\\
......
52 52
in / at \textsuperscript{1)}\\
53 53

  
54 54
\uline{<%country%>\hspace*{\fill}}\\
55
{\color{gray}(Member State and place of entry as part of the transport or dispatch of the object)}\\
55
  {\color{gray}(Member State and place of entry as part of the transport or dispatch of the object)}\\
56 56

  
57 57

  
58 58
% X\TextField[name=delivery, bordercolor=gray, width=\linewidth]{}\\
templates/print/marei/insettings.tex
6 6

  
7 7
\makeatletter
8 8
\Ifstr{\lxlangcode}{EN}{
9
	\main@language{english}
10
	\input{english.tex}}{
11
	\Ifstr{\lxlangcode}{DE}{
12
		\main@language{ngerman}
13
		\input{deutsch.tex}}{\input{deutsch.tex}}
9
  \main@language{english}
10
  \input{english.tex}}{
11
  \Ifstr{\lxlangcode}{DE}{
12
    \main@language{ngerman}
13
    \input{deutsch.tex}}{\input{deutsch.tex}}
14 14
} % Ende EN
15 15

  
16 16
% Mandanten-/Firmenabhängigkeiten
......
37 37
% \identpath/<euro/chf/usd/default>_account.tex
38 38

  
39 39
\@ifundefined{lxcurrency}{}{
40
	\setupCurrencyConfig{\identpath}{\lxcurrency}
40
  \setupCurrencyConfig{\identpath}{\lxcurrency}
41 41
}
42 42

  
43 43

  
44 44
% Befehl f. normale Schriftart und -größe
45 45

  
46 46
\KOMAoptions{
47
	fontsize=10pt,
48
	parskip=half-,% Absatzkennzeichnung durch Abstand statt Einzug
47
  fontsize=10pt,
48
  parskip=half-,% Absatzkennzeichnung durch Abstand statt Einzug
49 49
}
50 50
% Hier ist es auch möglich zusätzliche Schriftarten zu laden.
51 51
% 
......
76 76
% % \ifoot{<inhalt innen/links>}\cfoot{<inhalt zentriert>}\ofoot{<inhalt außen/rechts>}
77 77
% dann sollte jedoch darauf geachtet werden, dass das Makro in den einzelnen Vorlagen aufgerufen wird und daher definiert sein sollte. 
78 78
\newcommand{\ourhead}[5] {
79
	\chead{
80
	  \makebox[\textwidth]{
81
	  \Ifstr{#1}{}{}{#1: #2 \hspace{0.7cm}}
82
	  #3
83
	  \Ifstr{#4}{}{}{~\nr: #4}
84
	  \Ifstr{#5}{}{}{\vom ~ #5}
85
	  \hspace{0.7cm} - \seite ~ \thepage/\letterlastpage  ~-%
86
	  }
87
	}
79
  \chead{
80
    \makebox[\textwidth]{
81
      \Ifstr{#1}{}{}{#1: #2 \hspace{0.7cm}}
82
      #3
83
      \Ifstr{#4}{}{}{~\nr: #4}
84
      \Ifstr{#5}{}{}{\vom ~ #5}
85
      \hspace{0.7cm} - \seite ~ \thepage/\letterlastpage  ~-%
86
    }
87
  }
88 88
}
89 89

  
90 90
%Ende Anpassungen der Kopfzeile
......
100 100
%Box generieren, um die Höhe des Fußes zu kennen, damit ist eine automatische Anpassung des unteren Randes möglich
101 101
\if@kivi@footer
102 102

  
103
\newsavebox\footerbox
104
\begin{lrbox}\footerbox
105
	\usekomafont{pagefoot}%
106
	% Anfang des eigentlichen Inhaltes der Fußzeile
107
     \begin{tabular*}{\textwidth}[t]{@{\extracolsep{\fill}}p{.25\linewidth}p{.25\linewidth}r@{\extracolsep{0pt}\hspace{2\tabcolsep}}l@{}}%
108
	\firma                 & \email              & \textKontonummer			 & \kontonummer \\
109
	\strasse               & \homepage           & \textBank        		 & \bank \\
110
	\ort                   & \textUstid\ \ustid  & \textIban        		 & \iban \\
111
	\textTelefon~\telefon  & \finanzamt          & \textBic         		 & \bic \\
112
	\Ifstr{\fax}{}{}{\textFax~\fax} & 			 &\textBankleitzahl			 & \bankleitzahl
113
	\end{tabular*}
114
	% Ende des Fußzeileninhaltes.
115
\end{lrbox}
116

  
117
%Box in den Fuß eintragen, durch die zusätzliche Angabe in der eckigen Klammer, wird die Fußzeile auch auf der ersten Seite verwendet, falls für die erste Seite eine unterschiedliche Fußzeile verwendet werden soll, ist es möglich den obigen Mechanismus mit einem anderen Makronamen als footerbox zu kopieren
118
\cfoot[\usebox\footerbox]{\usebox\footerbox}
119

  
120
%Fußhöhe auf Höhe der Box
121
%Automatische Anpassung des unteren Randes
122
\setlength{\footheight}{\dimexpr\ht\footerbox+\dp\footerbox}
123
\setlength{\footskip}{\dimexpr\footheight+\baselineskip}
124
\geometry{
125
	includefoot,
126
%	bottom=1cm,% Falls der untere Rand kleiner sein soll, als die Seitenränder.
127
% 	Weitere Anpassungen der Ränder sind hier ebenfalls möglich
128
}
103
  \newsavebox\footerbox
104
  \begin{lrbox}\footerbox
105
    \usekomafont{pagefoot}%
106
    % Anfang des eigentlichen Inhaltes der Fußzeile
107
    \begin{tabular*}{\textwidth}[t]{@{\extracolsep{\fill}}p{.25\linewidth}p{.25\linewidth}r@{\extracolsep{0pt}\hspace{2\tabcolsep}}l@{}}%
108
      \firma                 & \email              & \textKontonummer			 & \kontonummer \\
109
      \strasse               & \homepage           & \textBank        		 & \bank \\
110
      \ort                   & \textUstid\ \ustid  & \textIban        		 & \iban \\
111
      \textTelefon~\telefon  & \finanzamt          & \textBic         		 & \bic \\
112
      \Ifstr{\fax}{}{}{\textFax~\fax} & 			 &\textBankleitzahl			 & \bankleitzahl
113
    \end{tabular*}
114
    % Ende des Fußzeileninhaltes.
115
  \end{lrbox}
116

  
117
  %Box in den Fuß eintragen, durch die zusätzliche Angabe in der eckigen Klammer, wird die Fußzeile auch auf der ersten Seite verwendet, falls für die erste Seite eine unterschiedliche Fußzeile verwendet werden soll, ist es möglich den obigen Mechanismus mit einem anderen Makronamen als footerbox zu kopieren
118
  \cfoot[\usebox\footerbox]{\usebox\footerbox}
119

  
120
  %Fußhöhe auf Höhe der Box
121
  %Automatische Anpassung des unteren Randes
122
  \setlength{\footheight}{\dimexpr\ht\footerbox+\dp\footerbox}
123
  \setlength{\footskip}{\dimexpr\footheight+\baselineskip}
124
  \geometry{
125
    includefoot,
126
    %	bottom=1cm,% Falls der untere Rand kleiner sein soll, als die Seitenränder.
127
    % 	Weitere Anpassungen der Ränder sind hier ebenfalls möglich
128
  }
129 129

  
130 130
\fi
131 131
% Ende Anpassungen der Fußzeile
templates/print/marei/invoice.tex
65 65
\begin{document}
66 66

  
67 67
\begin{letter}{
68
		<%name%>\strut\\
69
		<%if department_1%><%department_1%>\\<%end if%>%
70
		<%if department_2%><%department_2%>\\<%end if%>%
71
		<%cp_givenname%> <%cp_name%>\strut\\
72
		<%street%>\strut\\
73
		<%zipcode%> <%city%>\strut\\
74
		<%country%> \strut
75
	}
68
<%name%>\strut\\
69
<%if department_1%><%department_1%>\\<%end if%>%
70
<%if department_2%><%department_2%>\\<%end if%>%
71
<%cp_givenname%> <%cp_name%>\strut\\
72
<%street%>\strut\\
73
<%zipcode%> <%city%>\strut\\
74
<%country%> \strut
75
}
76 76

  
77 77
% Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
78 78
% Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
79 79
\opening{
80
	\Ifstr{<%cp_name%>}{}
81
		{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
82
		{
83
			\Ifstr{<%cp_gender%>}{f}
84
				{\anredefrau}
85
				{\anredeherr}
86
				<%cp_title%> <%cp_name%>,
87
		}
88
	}
80
\Ifstr{<%cp_name%>}{}
81
{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
82
  {
83
    \Ifstr{<%cp_gender%>}{f}
84
        {\anredefrau}
85
        {\anredeherr}
86
      <%cp_title%> <%cp_name%>,
87
    }
88
  }
89 89
\thispagestyle{kivitendo.letter.first}
90 90

  
91 91
<%if notes%>%
92
        <%notes%>%
93
        \vspace{0.5cm}
92
<%notes%>%
93
\vspace{0.5cm}
94 94
<%end if%>%
95 95

  
96 96

  
......
108 108
% amount = 1cm, % Setzt die Breite der Mengenspalte auf 1cm
109 109
% desc/header = Artikelbeschreibung, %Ändert die Überschrift der Bezeichnunsspalte in „Artikelbeschreibung”
110 110
\begin{PricingTabular*}%
111
	% eigentliche Tabelle
112
	\FakeTable{%
113
	<%foreach number%>%
114
		<%runningnumber%> &%
115
		<%number%> &%
116
		\textbf{<%description%>}%
117
		<%if longdescription%>\ExtraDescription{<%longdescription%>}<%end longdescription%>%
118
		<%if serialnumber%>\ExtraDescription{\seriennummer: <%serialnumber%>}<%end serialnumber%>%
119
		<%if ean%>\ExtraDescription{\ean: <%ean%>}<%end ean%>%
120
		<%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>%
121
		&%
122
		<%qty%> <%unit%> &%
123
		<%sellprice%>&%
124
		\Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
125
		<%linetotal%>\tabularnewline%
126
	<%end number%>%
127
	}%
128
	\begin{PricingTotal}%
129
		% Tabellenende letzte Seite
130
		\nettobetrag & <%subtotal%>\\%
131
		<%foreach tax%>%
132
		<%taxdescription%> & <%tax%>\\%
133
		<%end tax%>%
134
		\bfseries\schlussbetrag &  \bfseries <%invtotal%>\\%
135
	\end{PricingTotal}%
111
  % eigentliche Tabelle
112
  \FakeTable{%
113
  <%foreach number%>%
114
  <%runningnumber%> &%
115
  <%number%> &%
116
  \textbf{<%description%>}%
117
  <%if longdescription%>\ExtraDescription{<%longdescription%>}<%end longdescription%>%
118
  <%if serialnumber%>\ExtraDescription{\seriennummer: <%serialnumber%>}<%end serialnumber%>%
119
  <%if ean%>\ExtraDescription{\ean: <%ean%>}<%end ean%>%
120
  <%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>%
121
  &%
122
  <%qty%> <%unit%> &%
123
  <%sellprice%>&%
124
  \Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
125
    <%linetotal%>\tabularnewline%
126
    <%end number%>%
127
  }%
128
  \begin{PricingTotal}%
129
    % Tabellenende letzte Seite
130
    \nettobetrag & <%subtotal%>\\%
131
    <%foreach tax%>%
132
    <%taxdescription%> & <%tax%>\\%
133
    <%end tax%>%
134
    \bfseries\schlussbetrag &  \bfseries <%invtotal%>\\%
135
  \end{PricingTotal}%
136 136
\end{PricingTabular*}
137 137

  
138 138
\vspace{0.2cm}
139 139

  
140 140
\Ifstr{<%deliverydate%>}{}{}{%
141
	\leistungsdatumGleichRechnungsdatum%
141
  \leistungsdatumGleichRechnungsdatum%
142 142
}{
143
	\lieferungErfolgtAm ~<%deliverydate%>.
143
  \lieferungErfolgtAm ~<%deliverydate%>.
144 144
}\\
145 145

  
146 146
<%if payment_terms%>%
147
  \zahlung ~<%payment_terms%>\\
147
\zahlung ~<%payment_terms%>\\
148 148
<%end payment_terms%>%
149 149

  
150 150
<%if delivery_term%>%
151
  \lieferung ~<%delivery_term.description_long%>\\
151
\lieferung ~<%delivery_term.description_long%>\\
152 152
<%end delivery_term%>%
153 153

  
154 154
<%if ustid%>\ihreustid ~<%ustid%>.\\<%end if%>%
155 155

  
156 156
\ifnum<%taxzone_id%>=1
157
    \steuerfreiEU\\  % EU mit USt-ID Nummer
157
\steuerfreiEU\\  % EU mit USt-ID Nummer
158 158
\else
159
	\ifnum<%taxzone_id%>=3
160
    \steuerfreiAUS\\  % Außerhalb EU
161
    \fi
159
\ifnum<%taxzone_id%>=3
160
\steuerfreiAUS\\  % Außerhalb EU
161
\fi
162 162
\fi
163 163

  
164 164
\closing{\gruesse}
templates/print/marei/kiviletter.sty
21 21
\KOMAoptions{fontsize=12pt}
22 22
% Schriftart, Eingabelayout der Tastatur
23 23
\ifPDFTeX
24
	\RequirePackage[utf8]{inputenc}% Nur notwendig, wenn Basis älter als TL2018
25
	\RequirePackage[T1]{fontenc}
26
	\RequirePackage{lmodern}
24
  \RequirePackage[utf8]{inputenc}% Nur notwendig, wenn Basis älter als TL2018
25
  \RequirePackage[T1]{fontenc}
26
  \RequirePackage{lmodern}
27 27

  
28
	\RequirePackage{eurosym}
29
	\DeclareUnicodeCharacter{20AC}{\euro}
28
  \RequirePackage{eurosym}
29
  \DeclareUnicodeCharacter{20AC}{\euro}
30 30
\else
31
	\RequirePackage{fontspec}
31
  \RequirePackage{fontspec}
32 32
\fi
33 33

  
34 34
\RequirePackage{xltabular}
......
40 40
\RequirePackage[fromlogo,fromalign=right,
41 41
  firstfoot=false,%Für einheitliche Randeinstellungen
42 42
  refline=nodate,
43
	]{scrletter}
43
]{scrletter}
44 44
\LoadLetterOption{DIN}
45 45

  
46 46
\newkomavar{transaction}
......
71 71

  
72 72

  
73 73
\DeclareNewLayer[
74
foreground,
75
hoffset=\useplength{toaddrhpos},
76
voffset=\dimexpr\useplength{toaddrvpos}+\useplength{toaddrheight}+4\baselineskip,%sep to shippingaddressbox
77
contents={\usebox\shippingAddressBox}
74
  foreground,
75
  hoffset=\useplength{toaddrhpos},
76
  voffset=\dimexpr\useplength{toaddrvpos}+\useplength{toaddrheight}+4\baselineskip,%sep to shippingaddressbox
77
  contents={\usebox\shippingAddressBox}
78 78
]{kivitendo.shippingaddress}
79 79

  
80 80
\newpairofpagestyles{kivitendo.letter}{}
......
82 82
\renewcommand*{\letterpagestyle}{kivitendo.letter}
83 83

  
84 84
\DeclareNewPageStyleByLayers{kivitendo.letter.first}{
85
	kivitendo.shippingaddress,
86
	plain.kivitendo.letter.head.odd,plain.kivitendo.letter.head.even,plain.kivitendo.letter.head.oneside,%
87
	plain.kivitendo.letter.foot.odd,plain.kivitendo.letter.foot.even,plain.kivitendo.letter.foot.oneside,%
85
  kivitendo.shippingaddress,
86
  plain.kivitendo.letter.head.odd,plain.kivitendo.letter.head.even,plain.kivitendo.letter.head.oneside,%
87
  plain.kivitendo.letter.foot.odd,plain.kivitendo.letter.foot.even,plain.kivitendo.letter.foot.oneside,%
88 88
}
89 89

  
90 90
\setkomavar{backaddress}{\firma\ $\cdot$ \strasse\ $\cdot$ \ort}
91 91

  
92 92
\setkomavar{firsthead}{
93
	\if@logo
94
	\rlap{\usekomavar{fromlogo}}%
95
	\fi
93
  \if@logo
94
    \rlap{\usekomavar{fromlogo}}%
95
  \fi
96 96
}
97 97

  
98 98
\@setplength{locwidth}{6cm}
......
103 103

  
104 104

  
105 105
\cs_new:Nn \__kivi_set_colwidth:nn  {
106
	\dim_set:cn {l_kivi_tab_#1_dim} {#2}
106
  \dim_set:cn {l_kivi_tab_#1_dim} {#2}
107 107
}
108 108

  
109 109

  
110 110
\cs_new:Nn \__kivi_initialize_columns: {
111
	\clist_map_inline:Nn \g_kivi_pricingtable_col_clist {
112
		\bool_if_exist:cF {l_kivi_col_##1_bool} 
113
		{
114
			\bool_new:c {l_kivi_col_##1_bool}
115
			\dim_new:c {l_kivi_tab_##1_dim}
116
			\keys_define:nn {kivi/PricingTable} {
117
				##1 .choice:,
118
				##1 / true .code:n = \bool_set_true:c {l_kivi_col_##1_bool},
119
				##1 / false .code:n = \bool_set_false:c {l_kivi_col_##1_bool},
120
				##1 / unknown .code:n = {
121
					\bool_set_true:c {l_kivi_col_##1_bool}
122
					\dim_set:cn {l_kivi_tab_##1_dim} {####1}
123
				},
124
				##1 .default:n = true,
125
				##1 .initial:n = true,
126
				##1 / header .prop_put:c = {l_kivi_col_##1_prop},
127
				##1 / colspec .prop_put:c = {l_kivi_col_##1_prop},
128
			}
129
		}
130
	}
111
  \clist_map_inline:Nn \g_kivi_pricingtable_col_clist {
112
    \bool_if_exist:cF {l_kivi_col_##1_bool}
113
    {
114
      \bool_new:c {l_kivi_col_##1_bool}
115
      \dim_new:c {l_kivi_tab_##1_dim}
116
      \keys_define:nn {kivi/PricingTable} {
117
        ##1 .choice:,
118
        ##1 / true .code:n = \bool_set_true:c {l_kivi_col_##1_bool},
119
        ##1 / false .code:n = \bool_set_false:c {l_kivi_col_##1_bool},
120
        ##1 / unknown .code:n = {
121
            \bool_set_true:c {l_kivi_col_##1_bool}
122
            \dim_set:cn {l_kivi_tab_##1_dim} {####1}
123
          },
124
        ##1 .default:n = true,
125
        ##1 .initial:n = true,
126
        ##1 / header .prop_put:c = {l_kivi_col_##1_prop},
127
        ##1 / colspec .prop_put:c = {l_kivi_col_##1_prop},
128
      }
129
    }
130
  }
131 131
}
132 132

  
133 133
\clist_new:N \g_kivi_pricingtable_col_clist
134 134

  
135 135
\keys_define:nn {kivi/PricingTable} {
136
	columns .code:n = 
137
	\clist_gset:Nn \g_kivi_pricingtable_col_clist {#1}
138
	\__kivi_initialize_columns:,
139
	columns .initial:n = {pos, id, desc, amount, price, pricetotal},
140
	unknown .code:n = \keys_set:no {kivi/Tabular} {\l_keys_key_str=#1}
136
  columns .code:n =
137
  \clist_gset:Nn \g_kivi_pricingtable_col_clist {#1}
138
  \__kivi_initialize_columns:,
139
  columns .initial:n = {pos, id, desc, amount, price, pricetotal},
140
  unknown .code:n = \keys_set:no {kivi/Tabular} {\l_keys_key_str=#1}
141 141
}
142 142

  
143 143
% set default values for colwidth
144 144
\keys_set:nn {kivi/PricingTable} {
145
	pos=5ex,
146
	id=4em,
147
	amount=5em,
148
	price=7em,
149
	pricetotal=7em,
150
%	desc=auto,
151
	pos/header=\position,
152
	id/header=\artikelnummer,
153
	desc/header=\bezeichnung,
154
	amount/header=\menge,
155
	price/header=\einzelpreis,
156
	pricetotal/header=\gesamtpreis,
157
	price / colspec = Price,
158
	pricetotal / colspec = Price ,
145
  pos=5ex,
146
  id=4em,
147
  amount=5em,
148
  price=7em,
149
  pricetotal=7em,
150
  %	desc=auto,
151
  pos/header=\position,
152
  id/header=\artikelnummer,
153
  desc/header=\bezeichnung,
154
  amount/header=\menge,
155
  price/header=\einzelpreis,
156
  pricetotal/header=\gesamtpreis,
157
  price / colspec = Price,
158
  pricetotal / colspec = Price ,
159 159
}
160 160

  
161 161
\dim_new:N \g_kivi_tabcolsep_dim
......
163 163
\setlength\tabcolsep{.5\tabcolsep}
164 164

  
165 165
\prg_new_conditional:Nnn \kivi_if_Price_col:n {T} {
166
	\prop_get:cnN {l_kivi_col_#1_prop} {colspec} \l_tmpa_tl
167
	\exp_args:NV \tl_if_eq:nnTF \l_tmpa_tl {Price}
168
		{\prg_return_true:}
169
		{\prg_return_false:}
166
  \prop_get:cnN {l_kivi_col_#1_prop} {colspec} \l_tmpa_tl
167
  \exp_args:NV \tl_if_eq:nnTF \l_tmpa_tl {Price}
168
  {\prg_return_true:}
169
  {\prg_return_false:}
170 170
}
171 171

  
172 172

  
173 173
\cs_new:Nn \__kivi_calc_desc_column: {
174
	\bool_if:NTF \g__kivi_Tabular_rowcolor_bool
175
		{\dim_set:Nn \l_kivi_tab_desc_leftskip_dim {2\g_kivi_tabcolsep_dim}}
176
		{\dim_zero:N \l_kivi_tab_desc_leftskip_dim}
177
	\dim_zero:N \l_kivi_tab_desc_dim
178
	\bool_set_false:N \l_tmpa_bool
179
	\tl_gclear:N \g_kivi_Pricing_colspec_tl
180
	\clist_map_inline:Nn \g_kivi_pricingtable_col_clist {
181
		\tl_if_eq:nnTF {##1} {desc}  {
182
			\dim_set:Nn \l_kivi_tab_desc_dim {
183
				\textwidth-\l_kivi_tab_desc_leftskip_dim
184
			}
185
			\bool_set_true:N \l_tmpa_bool
186
			\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {p{\l_kivi_tab_desc_dim}}
187
		}{
188
			\bool_if:cT {l_kivi_col_##1_bool} {
189
				\bool_if:NTF \l_tmpa_bool {
190
					\dim_sub:Nn \l_kivi_tab_desc_dim {
191
						\dim_use:c {l_kivi_tab_##1_dim}+2\g_kivi_tabcolsep_dim
192
					}
193
				}{
194
					\dim_add:Nn \l_kivi_tab_desc_leftskip_dim {
195
						\dim_use:c {l_kivi_tab_##1_dim}+2\g_kivi_tabcolsep_dim
196
					}
197
				}
198
				\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {K{\dim_use:c {l_kivi_tab_##1_dim}}}
199
				\kivi_if_Price_col:nT {##1} {\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {<{\__kivi_tab_column_currency:}}}
200
			}
201
		}
202
	}
203
	\bool_if:NF \g__kivi_Tabular_rowcolor_bool {
204
		\tl_gput_left:Nn \g_kivi_Pricing_colspec_tl {@{}}
205
		\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {@{}}
206
	}
174
  \bool_if:NTF \g__kivi_Tabular_rowcolor_bool
175
  {\dim_set:Nn \l_kivi_tab_desc_leftskip_dim {2\g_kivi_tabcolsep_dim}}
176
  {\dim_zero:N \l_kivi_tab_desc_leftskip_dim}
177
  \dim_zero:N \l_kivi_tab_desc_dim
178
  \bool_set_false:N \l_tmpa_bool
179
  \tl_gclear:N \g_kivi_Pricing_colspec_tl
180
  \clist_map_inline:Nn \g_kivi_pricingtable_col_clist {
181
    \tl_if_eq:nnTF {##1} {desc}  {
182
      \dim_set:Nn \l_kivi_tab_desc_dim {
183
        \textwidth-\l_kivi_tab_desc_leftskip_dim
184
      }
185
      \bool_set_true:N \l_tmpa_bool
186
      \tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {p{\l_kivi_tab_desc_dim}}
187
    }{
188
      \bool_if:cT {l_kivi_col_##1_bool} {
189
        \bool_if:NTF \l_tmpa_bool {
190
          \dim_sub:Nn \l_kivi_tab_desc_dim {
191
            \dim_use:c {l_kivi_tab_##1_dim}+2\g_kivi_tabcolsep_dim
192
          }
193
        }{
194
          \dim_add:Nn \l_kivi_tab_desc_leftskip_dim {
195
            \dim_use:c {l_kivi_tab_##1_dim}+2\g_kivi_tabcolsep_dim
196
          }
197
        }
198
        \tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {K{\dim_use:c {l_kivi_tab_##1_dim}}}
199
        \kivi_if_Price_col:nT {##1} {\tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {<{\__kivi_tab_column_currency:}}}
200
      }
201
    }
202
  }
203
  \bool_if:NF \g__kivi_Tabular_rowcolor_bool {
204
    \tl_gput_left:Nn \g_kivi_Pricing_colspec_tl {@{}}
205
    \tl_gput_right:Nn \g_kivi_Pricing_colspec_tl {@{}}
206
  }
207 207
}
208 208

  
209 209
\newcolumntype{K}[1]{>{\raggedleft\arraybackslash}p{#1}}
......
213 213
\tcbuselibrary{breakable, skins}
214 214

  
215 215
\tcb@new@skin{kivi@LT}{base@unbroken,%
216
	frame~engine=empty,interior~titled~engine=empty,interior~engine=empty,segmentation~engine=empty,title~engine=empty,%
217
	skin~first=kivi@LT@first,skin~middle=kivi@LT@middle,skin~last=kivi@LT@last,
218
	underlay~first~and~middle={
219
		\node[anchor=north]  at (interior.north)  {\csname box_use:c\endcsname  {g_kivi_LT@head_box}};
220
		\node[anchor=south]  at (interior.south)  {\csname box_use:c\endcsname  {g_kivi_LT@foot_box}};
221
	},
222
	underlay~unbroken~and~last={
223
	\node[anchor=north]  at (interior.north)  {\csname box_use:c\endcsname  {g_kivi_LT@head_box}};
224
	\node[anchor=south]  at (interior.south)  {\csname box_use:c\endcsname  {g_kivi_LT@lastfoot_box}};
225
	},
226
	boxsep=0pt,
227
	boxrule=0pt,
228
	left=0pt,
229
	right=0pt,
230
	bottom=\box_ht:N  \g_kivi_LT@foot_box+\box_dp:N  \g_kivi_LT@foot_box + \aboverulesep,
231
	top=\box_ht:N  \g_kivi_LT@head_box+\box_dp:N  \g_kivi_LT@head_box +\belowrulesep,
232
	parbox=false,
216
frame~engine=empty,interior~titled~engine=empty,interior~engine=empty,segmentation~engine=empty,title~engine=empty,%
217
skin~first=kivi@LT@first,skin~middle=kivi@LT@middle,skin~last=kivi@LT@last,
218
underlay~first~and~middle={
219
\node[anchor=north]  at (interior.north)  {\csname box_use:c\endcsname  {g_kivi_LT@head_box}};
220
\node[anchor=south]  at (interior.south)  {\csname box_use:c\endcsname  {g_kivi_LT@foot_box}};
221
},
222
underlay~unbroken~and~last={
223
\node[anchor=north]  at (interior.north)  {\csname box_use:c\endcsname  {g_kivi_LT@head_box}};
224
\node[anchor=south]  at (interior.south)  {\csname box_use:c\endcsname  {g_kivi_LT@lastfoot_box}};
225
},
226
boxsep=0pt,
227
boxrule=0pt,
228
left=0pt,
229
right=0pt,
230
bottom=\box_ht:N  \g_kivi_LT@foot_box+\box_dp:N  \g_kivi_LT@foot_box + \aboverulesep,
231
top=\box_ht:N  \g_kivi_LT@head_box+\box_dp:N  \g_kivi_LT@head_box +\belowrulesep,
232
parbox=false,
233 233
}
234 234

  
235 235
\tcb@new@skin{kivi@LT@first}{base@first,%
236
	frame~engine=empty,interior~titled~engine=empty,interior~engine=empty,segmentation~engine=empty,title~engine=empty,%
237
	skin~first=kivi@LT@first,skin~middle=kivi@LT@middle,skin~last=kivi@LT@middle,
236
  frame~engine=empty,interior~titled~engine=empty,interior~engine=empty,segmentation~engine=empty,title~engine=empty,%
237
  skin~first=kivi@LT@first,skin~middle=kivi@LT@middle,skin~last=kivi@LT@middle,
238 238
}
239 239

  
240 240
\tcb@new@skin{kivi@LT@middle}{base@middle,%
241
	frame~engine=empty,interior~titled~engine=empty,interior~engine=empty,segmentation~engine=empty,title~engine=empty,%
242
	skin~first=kivi@LT@middle,skin~middle=kivi@LT@middle,skin~last=kivi@LT@middle,
241
  frame~engine=empty,interior~titled~engine=empty,interior~engine=empty,segmentation~engine=empty,title~engine=empty,%
242
  skin~first=kivi@LT@middle,skin~middle=kivi@LT@middle,skin~last=kivi@LT@middle,
243 243
}
244 244

  
245 245
\tcb@new@skin{kivi@LT@last}{base@last,%
246
	frame~engine=empty,interior~titled~engine=empty,interior~engine=empty,segmentation~engine=empty,title~engine=empty,%
247
	skin~first=kivi@LT@middle,skin~middle=kivi@LT@middle,skin~last=kivi@LT@last,
246
  frame~engine=empty,interior~titled~engine=empty,interior~engine=empty,segmentation~engine=empty,title~engine=empty,%
247
  skin~first=kivi@LT@middle,skin~middle=kivi@LT@middle,skin~last=kivi@LT@last,
248 248
}
249 249

  
250 250
\tcbset{kivi@LT/.style={skin=kivi@LT}}%
......
256 256
\seq_new:N \g_kivi_extraDescription_seq
257 257

  
258 258
\int_new:N \l__kivi_PricingTable_rowcolor_int
259
\dim_new:N \l__kivi_fboxsep_dim 
259
\dim_new:N \l__kivi_fboxsep_dim
260 260
\dim_set:Nn \l__kivi_fboxsep_dim {\g_kivi_tabcolsep_dim}
261 261

  
262 262
%colorbox variant to only add vertical spacing
......
268 268
\def\kivi@tabcolorbox#1#{\protect\kivi@tabcolor@box{#1}}
269 269

  
270 270
\def\kivi@tabcolor@box#1#2{
271
	\tl_if_empty:oTF {#2} 
272
		\kivi@nocolor@b@x
273
		\kivi@color@b@x
274
	\relax{\color#1{#2}}
271
  \tl_if_empty:oTF {#2}
272
  \kivi@nocolor@b@x
273
  \kivi@color@b@x
274
  \relax{\color#1{#2}}
275 275
}
276 276
\long\def\kivi@color@b@x#1#2#3%
277 277
{\leavevmode
278
	\setbox\z@\hbox{{\set@color#3}}%
279
	\dimen@\ht\z@\advance\dimen@\l__kivi_fboxsep_dim\ht\z@\dimen@
280
	\dimen@\dp\z@\advance\dimen@\l__kivi_fboxsep_dim\dp\z@\dimen@
281
	{#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}}
278
  \setbox\z@\hbox{{\set@color#3}}%
279
  \dimen@\ht\z@\advance\dimen@\l__kivi_fboxsep_dim\ht\z@\dimen@
280
  \dimen@\dp\z@\advance\dimen@\l__kivi_fboxsep_dim\dp\z@\dimen@
281
  {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}\box\z@}}}
282 282

  
283 283
\long\def\kivi@nocolor@b@x#1#2#3%
284 284
{\leavevmode
285
	\setbox\z@\hbox{#3}%
286
	\dimen@\ht\z@\advance\dimen@\l__kivi_fboxsep_dim\ht\z@\dimen@
287
	\dimen@\dp\z@\advance\dimen@\l__kivi_fboxsep_dim\dp\z@\dimen@
288
	{\box\z@}}
285
  \setbox\z@\hbox{#3}%
286
  \dimen@\ht\z@\advance\dimen@\l__kivi_fboxsep_dim\ht\z@\dimen@
287
  \dimen@\dp\z@\advance\dimen@\l__kivi_fboxsep_dim\dp\z@\dimen@
288
  {\box\z@}}
289 289

  
290 290
%%%
291 291

  
292 292

  
293 293
\newcommand{\FakeTable}[1]{
294
	\par
295
	\seq_set_split:Nnn \l_kivi_PricingTable_seq {\tabularnewline} {#1}
296
	\seq_remove_all:Nn \l_kivi_PricingTable_seq {}
297
	\begingroup
298
	\setlength{\parskip}{\c_zero_dim}
299
	\let\ExtraDescription\__kivi_addExtraDescription:n
300
	\setlength{\tabcolsep}{\g_kivi_tabcolsep_dim}
301
	\seq_map_inline:Nn \l_kivi_PricingTable_seq {
302
		\bool_if:NT \g__kivi_Tabular_rowcolor_bool {
303
			\int_gincr:N \g__kivi_PricingTable_rowcolor_int 
304
			\int_if_odd:nTF {\g__kivi_PricingTable_rowcolor_int}
305
			{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_odd_tl}}
306
			{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_even_tl}}
307
		}
308
		{\parbox{\linewidth}{
309
		\seq_set_split:Nnn  \l_kivi_columns_seq {&} {##1}
310
	\seq_gclear:N \g_kivi_extraDescription_seq
311
	\exp_args:Nnx \use:n {\tabular[t]}\g_kivi_Pricing_colspec_tl
312
		\seq_pop_left:NN \__l_FakeTable_columns_seq \l_tmpa_tl
313
		\seq_item:Nn \l_kivi_columns_seq {\l_tmpa_tl}
314
		\seq_map_inline:Nn \__l_FakeTable_columns_seq {
315
			&\seq_item:Nn \l_kivi_columns_seq {####1}
316
		}
317
	\endtabular
318
	\seq_if_empty:NTF \g_kivi_extraDescription_seq
319
	{\par}
320
	{\par\nopagebreak
321
	\begingroup
322
	\setlength{\leftskip}{\dim_eval:n {\bool_if:NT \g__kivi_Tabular_rowcolor_bool {-\tabcolsep} +\l_kivi_tab_desc_leftskip_dim}}
323
	\setlength{\hsize}{\dim_eval:n {\l_kivi_tab_desc_dim+\leftskip}}
324
	\usekomafont{extraDescription}
325
	\seq_use:Nn \g_kivi_extraDescription_seq {\\}
326
	\par
327
	\endgroup
328
	}
329
	}}
330
	}
331
	\endgroup\par
294
  \par
295
  \seq_set_split:Nnn \l_kivi_PricingTable_seq {\tabularnewline} {#1}
296
  \seq_remove_all:Nn \l_kivi_PricingTable_seq {}
297
  \begingroup
298
  \setlength{\parskip}{\c_zero_dim}
299
  \let\ExtraDescription\__kivi_addExtraDescription:n
300
  \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim}
301
  \seq_map_inline:Nn \l_kivi_PricingTable_seq {
302
    \bool_if:NT \g__kivi_Tabular_rowcolor_bool {
303
      \int_gincr:N \g__kivi_PricingTable_rowcolor_int
304
      \int_if_odd:nTF {\g__kivi_PricingTable_rowcolor_int}
305
      {\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_odd_tl}}
306
      {\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_even_tl}}
307
    }
308
    {\parbox{\linewidth}{
309
        \seq_set_split:Nnn  \l_kivi_columns_seq {&} {##1}
310
        \seq_gclear:N \g_kivi_extraDescription_seq
311
        \exp_args:Nnx \use:n {\tabular[t]}\g_kivi_Pricing_colspec_tl
312
        \seq_pop_left:NN \__l_FakeTable_columns_seq \l_tmpa_tl
313
        \seq_item:Nn \l_kivi_columns_seq {\l_tmpa_tl}
314
        \seq_map_inline:Nn \__l_FakeTable_columns_seq {
315
          &\seq_item:Nn \l_kivi_columns_seq {####1}
316
        }
317
        \endtabular
318
        \seq_if_empty:NTF \g_kivi_extraDescription_seq
319
        {\par}
320
        {\par\nopagebreak
321
          \begingroup
322
          \setlength{\leftskip}{\dim_eval:n {\bool_if:NT \g__kivi_Tabular_rowcolor_bool {-\tabcolsep} +\l_kivi_tab_desc_leftskip_dim}}
323
          \setlength{\hsize}{\dim_eval:n {\l_kivi_tab_desc_dim+\leftskip}}
324
          \usekomafont{extraDescription}
325
          \seq_use:Nn \g_kivi_extraDescription_seq {\\}
326
          \par
327
          \endgroup
328
        }
329
      }}
330
  }
331
  \endgroup\par
332 332
}
333 333

  
334 334

  
335 335
\seq_new:N  \__l_FakeTable_columns_seq
336 336
\cs_new:Nn \__kivi_setup_FakeTable: {
337
	\seq_clear:N \__l_FakeTable_columns_seq
338
	\int_zero:N \l_tmpa_int
339
	\clist_map_inline:Nn \g_kivi_pricingtable_col_clist {
340
		\int_incr:N \l_tmpa_int
341
		\bool_if:cT {l_kivi_col_##1_bool} {\seq_put_right:Nx \__l_FakeTable_columns_seq {\int_use:N \l_tmpa_int}}
342
	}
337
  \seq_clear:N \__l_FakeTable_columns_seq
338
  \int_zero:N \l_tmpa_int
339
  \clist_map_inline:Nn \g_kivi_pricingtable_col_clist {
340
    \int_incr:N \l_tmpa_int
341
    \bool_if:cT {l_kivi_col_##1_bool} {\seq_put_right:Nx \__l_FakeTable_columns_seq {\int_use:N \l_tmpa_int}}
342
  }
343 343
}
344 344

  
345 345
\tl_new:N \g_kivi_Pricing_colspec_tl
346 346
\tl_gset:Nn \g_kivi_Pricing_colspec_tl {
347
	\bool_if:NF \g__kivi_Tabular_rowcolor_bool {@{}}
348
	\bool_if:NT \l_kivi_col_pos_bool {p{\l_kivi_tab_pos_dim}}
349
	\bool_if:NT \l_kivi_col_id_bool {p{\l_kivi_tab_id_dim}}
350
	p{\l_kivi_tab_desc_dim}
351
	\bool_if:NT \l_kivi_col_amount_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_amount_dim}}}
352
	\bool_if:NT \l_kivi_col_price_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_price_dim}<{\__kivi_tab_column_currency:}}}
353
	\bool_if:NT \l_kivi_col_pricetotal_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_pricetotal_dim}<{\__kivi_tab_column_currency:}}}
354
	\bool_if:NF \g__kivi_Tabular_rowcolor_bool {@{}}
347
\bool_if:NF \g__kivi_Tabular_rowcolor_bool {@{}}
348
\bool_if:NT \l_kivi_col_pos_bool {p{\l_kivi_tab_pos_dim}}
349
\bool_if:NT \l_kivi_col_id_bool {p{\l_kivi_tab_id_dim}}
350
p{\l_kivi_tab_desc_dim}
351
\bool_if:NT \l_kivi_col_amount_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_amount_dim}}}
352
\bool_if:NT \l_kivi_col_price_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_price_dim}<{\__kivi_tab_column_currency:}}}
353
\bool_if:NT \l_kivi_col_pricetotal_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_pricetotal_dim}<{\__kivi_tab_column_currency:}}}
354
\bool_if:NF \g__kivi_Tabular_rowcolor_bool {@{}}
355 355
}
356 356

  
357 357
\cs_new_protected:Nn \__kivi_tab_column_currency: {\,\currency}
......
360 360
\cs_set_eq:NN \__kivi_tab_column_body_currency:  \__kivi_tab_column_currency:
361 361

  
362 362
\clist_map_inline:nn {head, foot, firsthead, lastfoot} {%TODO reduce
363
	\box_new:c {g_kivi_LT@#1_box}
363
  \box_new:c {g_kivi_LT@#1_box}
364 364
}
365 365

  
366 366
\newkomafont{PricingTableHeader}{\bfseries}
367 367

  
368 368
\cs_new:Nn \__kivi_setup_LT_boxes: {
369
%	\bool_show:N  \g__kivi_Tabular_rowcolor_bool
370
	\__kivi_calc_desc_column:
371
	\hbox_gset:Nn \g_kivi_LT@head_box {
372
		\setlength{\tabcolsep}{\g_kivi_tabcolsep_dim}
373
		\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_header_tl}}%
374
		{
375
		\exp_args:Nnx \use:n {\tabular[b]}\g_kivi_Pricing_colspec_tl
376
		\__kivi_PricingTabular_header:
377
		\endtabular
378
		}
379
	}
380
	\hbox_gset:Nn \g_kivi_LT@foot_box {
381
%		\parbox{\linewidth}{
382
%		\leavevmode\color{red}\rule{\linewidth}{1pt}\par\nointerlineskip
383
%		\leavevmode\color{blue}\rule{\linewidth}{1cm}
384
%		}
385
%		\raisebox{\depth}{
386
			\begin{tabular*}{\textwidth}[t]{@{\extracolsep{\fill}}r@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}}
387
				\bool_if:NTF \g__kivi_Tabular_rowcolor_bool
388
				{\hline\noalign{\vskip1pt}}%\noalign{\nointerlineskip\vskip\z@}\noalign{\nointerlineskip\rule{\linewidth}{\arrayrulewidth}}}%\leavevmode\rule{\linewidth}{\arrayrulewidth}}} 
389
				\midrule
390
				\strut\weiteraufnaechsterseite
391
			\end{tabular*}
392
%		}
393
	}
394
	\hbox_gset:Nn \g_kivi_LT@lastfoot_box {
395
		\raisebox{\dimexpr\depth+\baselineskip}[0pt][0pt]{
396
			\begin{tabular*}{\textwidth}{@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}\extracolsep{\fill}}r@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}}
397
			\bool_if:NF \g__kivi_Tabular_rowcolor_bool \bottomrule
398
			\end{tabular*}
399
		}
400
	}
369
  %	\bool_show:N  \g__kivi_Tabular_rowcolor_bool
370
  \__kivi_calc_desc_column:
371
  \hbox_gset:Nn \g_kivi_LT@head_box {
372
    \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim}
373
    \bool_if:NT \g__kivi_Tabular_rowcolor_bool {\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_header_tl}}%
374
    {
375
      \exp_args:Nnx \use:n {\tabular[b]}\g_kivi_Pricing_colspec_tl
376
      \__kivi_PricingTabular_header:
377
      \endtabular
378
    }
379
  }
380
  \hbox_gset:Nn \g_kivi_LT@foot_box {
381
    %		\parbox{\linewidth}{
382
    %		\leavevmode\color{red}\rule{\linewidth}{1pt}\par\nointerlineskip
383
    %		\leavevmode\color{blue}\rule{\linewidth}{1cm}
384
    %		}
385
    %		\raisebox{\depth}{
386
    \begin{tabular*}{\textwidth}[t]{@{\extracolsep{\fill}}r@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}}
387
      \bool_if:NTF \g__kivi_Tabular_rowcolor_bool
388
      {\hline\noalign{\vskip1pt}}%\noalign{\nointerlineskip\vskip\z@}\noalign{\nointerlineskip\rule{\linewidth}{\arrayrulewidth}}}%\leavevmode\rule{\linewidth}{\arrayrulewidth}}} 
389
      \midrule
390
      \strut\weiteraufnaechsterseite
391
    \end{tabular*}
392
    %		}
393
  }
394
  \hbox_gset:Nn \g_kivi_LT@lastfoot_box {
395
    \raisebox{\dimexpr\depth+\baselineskip}[0pt][0pt]{
396
      \begin{tabular*}{\textwidth}{@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}\extracolsep{\fill}}r@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}}
397
        \bool_if:NF \g__kivi_Tabular_rowcolor_bool \bottomrule
398
      \end{tabular*}
399
    }
400
  }
401 401
}
402 402

  
403 403

  
404 404
%Macht es sinn hier eine Variante zu machen, in der alle Spalten Belegbar sind?
405 405
\NewDocumentEnvironment{PricingTotal}{+b}{
406
	\par\nointerlineskip
406
\par\nointerlineskip
407 407
%	\unskip
408 408
}{
409
	\bool_if:NT \g__kivi_Tabular_rowcolor_bool 	{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_PricingTotal_tl}}
410
	{	
411
	\tabular[t]{@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}
412
	p{\dim_eval:n {\linewidth-\l_kivi_tab_pricetotal_dim-\bool_if:NTF \g__kivi_Tabular_rowcolor_bool {4}{2}\tabcolsep}}P{\l_kivi_tab_pricetotal_dim}@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}}
413
	\l__kivi_Tabular_PricingTotal_topsep_tl
414
	#1
415
	\endtabular
416
	}
409
\bool_if:NT \g__kivi_Tabular_rowcolor_bool 	{\nointerlineskip\kivi@tabcolorbox{\g__kivi_Tabular_rowcolor_PricingTotal_tl}}
410
{
411
\tabular[t]{@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}
412
p{\dim_eval:n {\linewidth-\l_kivi_tab_pricetotal_dim-\bool_if:NTF \g__kivi_Tabular_rowcolor_bool {4}{2}\tabcolsep}}P{\l_kivi_tab_pricetotal_dim}@{\bool_if:NT \g__kivi_Tabular_rowcolor_bool {\hskip\tabcolsep}}}
413
\l__kivi_Tabular_PricingTotal_topsep_tl
414
#1
415
\endtabular
416
}
417 417
}
418 418

  
419 419
\tl_new:N \l__kivi_Tabular_PricingTotal_topsep_tl
......
421 421
\tl_set:Nn \l__kivi_Tabular_PricingTotal_topsep_tl {\bool_if:NF \g__kivi_Tabular_rowcolor_bool \midrule}
422 422

  
423 423
\newcommand*\ExtraDescription{
424
	\PackageError{kiviletter}{The~command~\string\ExtraDescription\space~may~be~only~used~inside~the~\string\FakeTable\space~environment.}{See~documentation~for~details}
424
  \PackageError{kiviletter}{The~command~\string\ExtraDescription\space~may~be~only~used~inside~the~\string\FakeTable\space~environment.}{See~documentation~for~details}
425 425
}
426 426

  
427 427

  
428 428
\cs_new:Nn \__kivi_addExtraDescription:n {\seq_gput_right:Nn \g_kivi_extraDescription_seq {#1}}
429 429

  
430 430
\newenvironment{PricingTabular}[1][]{
431
	\begingroup
432
	\dim_set:Nn \parskip {\c_zero_dim}
433
	\tl_if_empty:nF {#1} {\keys_set:nn {kivi/PricingTable} {#1}}
434
	\setlength{\tabcolsep}{\g_kivi_tabcolsep_dim}
435
	\__kivi_calc_desc_column:
436
	\exp_args:Nx \longtable \g_kivi_Pricing_colspec_tl
437
	% Tabellenkopf
438
	\__kivi_PricingTabular_header:
439
	\endhead
440
	\midrule
441
	\rlap{\makebox[\textwidth][r]{\weiteraufnaechsterseite}}\\
442
	\endfoot
443
	\bool_if:NF \g__kivi_Tabular_rowcolor_bool \bottomrule
444
	\endlastfoot
431
  \begingroup
432
  \dim_set:Nn \parskip {\c_zero_dim}
433
  \tl_if_empty:nF {#1} {\keys_set:nn {kivi/PricingTable} {#1}}
434
  \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim}
435
  \__kivi_calc_desc_column:
436
  \exp_args:Nx \longtable \g_kivi_Pricing_colspec_tl
437
  % Tabellenkopf
438
  \__kivi_PricingTabular_header:
439
  \endhead
440
  \midrule
441
  \rlap{\makebox[\textwidth][r]{\weiteraufnaechsterseite}}\\
442
  \endfoot
443
  \bool_if:NF \g__kivi_Tabular_rowcolor_bool \bottomrule
444
  \endlastfoot
445 445
}{
446
	\endlongtable
447
	\endgroup
446
  \endlongtable
447
  \endgroup
448 448
}
449 449

  
450 450
\cs_set:Nn \__kivi_PricingTabular_header: {
451
	\bool_if:NTF \g__kivi_Tabular_rowcolor_bool {\noalign{\skip_vertical:n {\dp\strutbox}}}\toprule
452
	\cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_header_currency:
453
	\bool_set_false:N \l_tmpa_bool
454
	\clist_map_inline:Nn \g_kivi_pricingtable_col_clist	{
455
		\bool_if:cT {l_kivi_col_##1_bool} {
456
			\bool_if:NT \l_tmpa_bool {&}
457
			\bool_set_true:N \l_tmpa_bool
458
			\usekomafont{PricingTableHeader}
459
			\prop_item:cn {l_kivi_col_##1_prop} {header}
460
		}
461
	}
462
	\cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_body_currency:
463
	\\
464
	\bool_if:NF \g__kivi_Tabular_rowcolor_bool \midrule
451
  \bool_if:NTF \g__kivi_Tabular_rowcolor_bool {\noalign{\skip_vertical:n {\dp\strutbox}}}\toprule
452
  \cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_header_currency:
453
  \bool_set_false:N \l_tmpa_bool
454
  \clist_map_inline:Nn \g_kivi_pricingtable_col_clist	{
455
    \bool_if:cT {l_kivi_col_##1_bool} {
456
      \bool_if:NT \l_tmpa_bool {&}
457
      \bool_set_true:N \l_tmpa_bool
458
      \usekomafont{PricingTableHeader}
459
      \prop_item:cn {l_kivi_col_##1_prop} {header}
460
    }
461
  }
462
  \cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_body_currency:
463
  \\
464
  \bool_if:NF \g__kivi_Tabular_rowcolor_bool \midrule
465 465
}
466 466

  
467 467
\newkomafont{tablehead}{\bfseries}
468 468

  
469 469
\keys_define:nn {kivi/SimpleTabular} {
470
	colspec .tl_set:N =\l_kivi_SimpleTabular_colspec_tl,
471
	colspec .initial:n = {rrX},
472
	headline .tl_set:N = \l_kivi_SimpleTabular_headline_tl,
473
	headline .initial:n = {\usekomafont{tablehead}\position & \usekomafont{tablehead}\menge & \usekomafont{tablehead}\bezeichnung},
470
  colspec .tl_set:N =\l_kivi_SimpleTabular_colspec_tl,
471
  colspec .initial:n = {rrX},
472
  headline .tl_set:N = \l_kivi_SimpleTabular_headline_tl,
473
  headline .initial:n = {\usekomafont{tablehead}\position & \usekomafont{tablehead}\menge & \usekomafont{tablehead}\bezeichnung},
474 474
}
475 475

  
476 476
\keys_define:nn {kivi/Tabular} {
477
	color-rows .bool_gset:N =  \g__kivi_Tabular_rowcolor_bool ,
478
	color-rows .initial:n = false,
479
	color-rows .default:n = true,
480
	rowcolor-odd .tl_gset:N = \g__kivi_Tabular_rowcolor_odd_tl,
481
	rowcolor-odd .initial:n = black!10,
482
	rowcolor-even .tl_gset:N = \g__kivi_Tabular_rowcolor_even_tl,
483
	rowcolor-even .initial:n =,
484
	rowcolor-header .tl_gset:N = \g__kivi_Tabular_rowcolor_header_tl,
485
	rowcolor-header .initial:n = black!35,
486
	rowcolor-total .tl_gset:N = \g__kivi_Tabular_rowcolor_PricingTotal_tl,
487
	rowcolor-total .initial:n = black!35,
488
	rowsep .tl_set:N =\g__kivi_Tabular_rowsep_tl,
489
	hrule .meta:n = {rowsep=\midrule}
477
  color-rows .bool_gset:N =  \g__kivi_Tabular_rowcolor_bool ,
478
  color-rows .initial:n = false,
479
  color-rows .default:n = true,
480
  rowcolor-odd .tl_gset:N = \g__kivi_Tabular_rowcolor_odd_tl,
481
  rowcolor-odd .initial:n = black!10,
482
  rowcolor-even .tl_gset:N = \g__kivi_Tabular_rowcolor_even_tl,
483
  rowcolor-even .initial:n =,
484
  rowcolor-header .tl_gset:N = \g__kivi_Tabular_rowcolor_header_tl,
485
  rowcolor-header .initial:n = black!35,
486
  rowcolor-total .tl_gset:N = \g__kivi_Tabular_rowcolor_PricingTotal_tl,
487
  rowcolor-total .initial:n = black!35,
488
  rowsep .tl_set:N =\g__kivi_Tabular_rowsep_tl,
489
  hrule .meta:n = {rowsep=\midrule}
490 490
}
491 491

  
492 492
\newcommand*{\SetupSimpleTabular}[1]{\keys_set:nn {kivi/SimpleTabular} {#1}}
......
494 494

  
495 495
\newenvironment{SimpleTabular}[1][]
496 496
{
497
	\tl_if_in:nnTF {#1} {=} {\keys_set:nn {kivi/SimpleTabular} {#1}} {\tl_if_empty:nF {#1} {\tl_set:Nn \l_kivi_SimpleTabular_headline_tl {#1}}}
498
	\setlength{\tabcolsep}{\g_kivi_tabcolsep_dim}
499
	\dim_set:Nn \parskip {\c_zero_dim}
500
	\bool_if:NF	\g__kivi_Tabular_rowcolor_bool {
501
		\tl_put_right:Nn \l_kivi_SimpleTabular_colspec_tl {@{}}
502
		\tl_put_left:Nn \l_kivi_SimpleTabular_colspec_tl {@{}}
503
	}
504
	\exp_args:NnV \xltabular{\linewidth}\l_kivi_SimpleTabular_colspec_tl
505
		\toprule
506
		\cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_header_currency:
507
		\l_kivi_SimpleTabular_headline_tl
508
		\\
509
		\noalign{\cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_body_currency:}
510
		\midrule
511
	\endhead
512
		\midrule
513
		\rlap{\makebox[\textwidth][r]{\weiteraufnaechsterseite}}\\
514
	\endfoot
515
	\bool_if:NF \g__kivi_Tabular_rowcolor_bool \bottomrule
516
	\endlastfoot
517
	\ignorespaces
497
  \tl_if_in:nnTF {#1} {=} {\keys_set:nn {kivi/SimpleTabular} {#1}} {\tl_if_empty:nF {#1} {\tl_set:Nn \l_kivi_SimpleTabular_headline_tl {#1}}}
498
  \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim}
499
  \dim_set:Nn \parskip {\c_zero_dim}
500
  \bool_if:NF	\g__kivi_Tabular_rowcolor_bool {
501
    \tl_put_right:Nn \l_kivi_SimpleTabular_colspec_tl {@{}}
502
    \tl_put_left:Nn \l_kivi_SimpleTabular_colspec_tl {@{}}
503
  }
504
  \exp_args:NnV \xltabular{\linewidth}\l_kivi_SimpleTabular_colspec_tl
505
  \toprule
506
  \cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_header_currency:
507
  \l_kivi_SimpleTabular_headline_tl
508
  \\
509
  \noalign{\cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_body_currency:}
510
  \midrule
511
  \endhead
512
  \midrule
513
  \rlap{\makebox[\textwidth][r]{\weiteraufnaechsterseite}}\\
514
  \endfoot
515
  \bool_if:NF \g__kivi_Tabular_rowcolor_bool \bottomrule
516
  \endlastfoot
517
  \ignorespaces
518 518
}{
519
	\def\@currenvir{tabularx}
520
	\endxltabular
519
  \def\@currenvir{tabularx}
520
  \endxltabular
521 521
}
522 522

  
523 523
%PricingTabular* kann automatisch spalten ignorieren
......
526 526
% analog ist dies für pos, amount, price, pricetotal möglich.
527 527
% Die Spalte der Bezeichnung ist nicht deaktivierbar
528 528
\newenvironment{PricingTabular*}[1][]{
529
	\int_gzero:N \g__kivi_PricingTable_rowcolor_int
530
	\tl_if_empty:nF {#1} {\keys_set:nn {kivi/PricingTable} {#1}}
531
	\__kivi_setup_LT_boxes:
532
	\__kivi_setup_FakeTable:
533
	\dim_set:Nn \parskip {\c_zero_dim}
534
	\PricingTabularBox\ignorespaces
529
  \int_gzero:N \g__kivi_PricingTable_rowcolor_int
530
  \tl_if_empty:nF {#1} {\keys_set:nn {kivi/PricingTable} {#1}}
531
  \__kivi_setup_LT_boxes:
532
  \__kivi_setup_FakeTable:
533
  \dim_set:Nn \parskip {\c_zero_dim}
534
  \PricingTabularBox\ignorespaces
535 535
}{\endPricingTabularBox
536
	%compensate footer spacing
537
	\skip_vertical:n {-\box_ht:N  \g_kivi_LT@foot_box-\box_dp:N  \g_kivi_LT@foot_box}
536
  %compensate footer spacing
537
  \skip_vertical:n {-\box_ht:N  \g_kivi_LT@foot_box-\box_dp:N  \g_kivi_LT@foot_box}
538 538
}
539 539

  
540 540
\newtcolorbox{PricingTabularBox}{breakable,skin=kivi@LT}
541 541

  
542 542
\if@kivi@infobox
543 543

  
544
	\def\locationsep{:}
545

  
546
	\NewDocumentCommand{\locationentry}{som}{
547
		\Ifkomavarempty{#3}{}{
548
		\IfBooleanTF {#1} {
549
			\strut
550
			\IfNoValueTF {#2}
551
				{\usekomavar*{#3}}
552
				{#2}
553
			\locationsep
554
			\hfill\strut\space
555
			\hbox_set:Nn \l_tmpa_box {\usekomavar{#3}}
556
			\dim_compare:nTF {\box_wd:N \l_tmpa_box>\linewidth}
557
				{\newline\hspace*{\fill}\llap}
558
				{\hspace*{\fill}}
559
				{\box_use:N \l_tmpa_box\strut}
560
		}{
561
			\@hangfrom{\strut
562
				\IfNoValueTF {#2}
563
					{\usekomavar*{#3}}
564
					{#2}\locationsep~
565
			}{
566
				\parbox[t]{\dimexpr\linewidth-\hangindent}{
567
					\raggedleft
568
					\usekomavar{#3}\strut
569
				}
570
			}
571
		}
572
		}
573
		\par
574
	}
575

  
576
\newkomafont{transaction}{\bfseries}
577

  
578
\setkomavar{location}{
579
	\Ifkomavarempty{transaction}{}{{
580
	\usekomafont{transaction}
581
	\usekomavar{transaction}
582
	}
583
	}
584
	\par
585
	\medskip
586
	\parbox{\useplength{locwidth}}{
587
		\locationentry{date}
588
		\locationentry{myref}
589
		\locationentry{customer}
590
		\locationentry{yourref}
591
		\locationentry{delivery}
592
		\locationentry{quote}
593
		\locationentry{orderID}
594
		\locationentry{projectID}
595
		\locationentry[\ansprechpartner]{fromname}
596
		\locationentry{fromphone}
597
		\locationentry*{fromemail}
598
	}
599
}
600
\removereffields
601
\AtBeginLetter{
602
	\ifdim\ht\shippingAddressBox>\z@
603
	\@addtoplength{refvpos}{\dimexpr\ht\shippingAddressBox+\dp\shippingAddressBox}
604
	\@addtoplength{refvpos}{4\baselineskip}%sep between address boxes
605
	\fi
606
}
544
  \def\locationsep{:}
545

  
546
  \NewDocumentCommand{\locationentry}{som}{
547
    \Ifkomavarempty{#3}{}{
548
      \IfBooleanTF {#1} {
549
        \strut
550
        \IfNoValueTF {#2}
551
        {\usekomavar*{#3}}
552
        {#2}
553
        \locationsep
554
        \hfill\strut\space
555
        \hbox_set:Nn \l_tmpa_box {\usekomavar{#3}}
556
        \dim_compare:nTF {\box_wd:N \l_tmpa_box>\linewidth}
557
        {\newline\hspace*{\fill}\llap}
558
        {\hspace*{\fill}}
559
        {\box_use:N \l_tmpa_box\strut}
560
      }{
561
        \@hangfrom{\strut
562
          \IfNoValueTF {#2}
563
          {\usekomavar*{#3}}
564
          {#2}\locationsep~
565
        }{
566
          \parbox[t]{\dimexpr\linewidth-\hangindent}{
567
            \raggedleft
568
            \usekomavar{#3}\strut
569
          }
570
        }
571
      }
572
    }
573
    \par
574
  }
575

  
576
  \newkomafont{transaction}{\bfseries}
577

  
578
  \setkomavar{location}{
579
    \Ifkomavarempty{transaction}{}{{
580
          \usekomafont{transaction}
581
          \usekomavar{transaction}
582
        }
583
    }
584
    \par
585
    \medskip
586
    \parbox{\useplength{locwidth}}{
587
      \locationentry{date}
588
      \locationentry{myref}
589
      \locationentry{customer}
590
      \locationentry{yourref}
591
      \locationentry{delivery}
592
      \locationentry{quote}
593
      \locationentry{orderID}
594
      \locationentry{projectID}
595
      \locationentry[\ansprechpartner]{fromname}
596
      \locationentry{fromphone}
597
      \locationentry*{fromemail}
598
    }
599
  }
600
  \removereffields
601
  \AtBeginLetter{
602
    \ifdim\ht\shippingAddressBox>\z@
603
      \@addtoplength{refvpos}{\dimexpr\ht\shippingAddressBox+\dp\shippingAddressBox}
604
      \@addtoplength{refvpos}{4\baselineskip}%sep between address boxes
605
    \fi
... Dieser Diff wurde abgeschnitten, weil er die maximale Anzahl anzuzeigender Zeilen überschreitet.

Auch abrufbar als: Unified diff