X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=insettings.tex;h=cd7c53153439547e06192f3f4de31c6de55eb889;hb=010c8d1e9af797f5223ef083d5653e8aae03fabf;hp=92a5165fe6e6c3fdf1820627dc6359da76287eb9;hpb=a69858e4a095cc1efcc072b5be04cdd7335082fb;p=kivitendo-erp.git diff --git a/insettings.tex b/insettings.tex index 92a5165fe..cd7c53153 100644 --- a/insettings.tex +++ b/insettings.tex @@ -1,3 +1,6 @@ +%% insettings.tex +%% Copyright 2019 Marei Peischl +\ProvidesFile{insettings.tex}[2019/12/22 Konfigurationsdatei kivitendo ERP] % Sprachüberprüfung \RequirePackage[english, ngerman]{babel} \ifstr{\lxlangcode}{EN}{ @@ -45,15 +48,22 @@ \input{\identpath/ident.tex} \ExplSyntaxOn + +%Setze Briefkopf-logo falls vorhanden +\setkomavar{fromlogo}{\includegraphics[width=.25\linewidth]{\identpath/briefkopf}} + % Währungen/Konten \tl_new:N \g_kivi_currency_tl \str_if_in:NnT \lxcurrency {USD} {\tl_gset:Nn \g_kivi_currency_tl {usd}} \str_if_in:NnT \lxcurrency {CHF} {\tl_gset:Nn \g_kivi_currency_tl {chf}} -\tl_if_empty:NT \g_kivi_currency_tl {\tl_gset:Nn \g_kivi_currency_tl {euro}} -% wenn er es nicht kennt dann text übernehmen. -% Problematisch mit Dateistruktur +\str_if_in:NnT \lxcurrency {EUR} {\tl_gset:Nn \g_kivi_currency_tl {euro}} +\tl_if_empty:NT \g_kivi_currency_tl { + \tl_gset:Nn \g_kivi_currency_tl {default} + \edef \currency {\tl_to_str:N \lxcurrency} +} \input{\identpath/\g_kivi_currency_tl _account.tex} + \ExplSyntaxOff @@ -67,8 +77,7 @@ \KOMAoptions{fontsize=10pt} % Einstellungen f. Kopf und Fuss -\pagestyle{scrheadings} -\clearpairofpagestyles +\pagestyle{kivitendo.letter} %\setheadwidth[20mm]{page} % Kopfzeile nach rechts verschieben %\setfootwidth[-39mm]{page} % Fusszeile verschieben @@ -79,28 +88,32 @@ % 4. Belegnummer {oder leer} % 5. Belegdatum {oder leer} % Beispiel: \ourhead{\kundennummer}{<%customernumber%>}{\angebot}{<%quonumber%>}{<%quodate%>} +\setkomafont{pagehead}{\scriptsize} \newcommand{\ourhead}[5] { \chead{ - \ifthenelse{\equal{\thepage}{1}} - {}% then - {\normalfont\fontfamily{cmss}\scriptsize - \ifthenelse{\equal{#1}{}}{}{#1: #2 \hspace{0.7cm}}{} + \ifnum\thepage=1 + \else + \ifstr{#1}{}{}{#1: #2 \hspace{0.7cm}} #3 - \ifthenelse{\equal{#4}{}}{}{~\nr: #4} - \ifthenelse{\equal{#5}{}}{}{\vom ~ #5} - \hspace{0.7cm} - \seite ~ \thepage/\pageref{LastPage} ~- } -}%ende chead + \ifstr{#4}{}{}{~\nr: #4} + \ifstr{#5}{}{}{\vom ~ #5} + \hspace{0.7cm} - \seite ~ \thepage/\letterlastpage ~-% + \fi +} } % Firmenfuss +\setkomafont{pagefoot}{\tiny} \cfoot{ - {\normalfont\fontfamily{cmss} \tiny + { \begin{tabular}{p{5cm}p{4.5cm}lr} \firma & \email & \textKontonummer & \kontonummer \\ \strasse & \homepage & \textBank & \bank \\ \ort & \textUstid\ \ustid & \textIban & \iban \\ \textTelefon~\telefon & \finanzamt & \textBic & \bic \\ - \ifthenelse{\equal{\fax}{}}{}{\textFax~\fax} & &\textBankleitzahl & \bankleitzahl \\ + \ifstr{\fax}{}{}{\textFax~\fax} & &\textBankleitzahl & \bankleitzahl \\ \end{tabular} } } + +\endinput \ No newline at end of file