X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fprint%2Fmarei%2Fkiviletter.sty;h=6aedf1bd7f215fc8a4daa2579a2181f97fb195f5;hb=5ffa2173eb9315b476e047ccced027acb3562e31;hp=30dde4604f79b766493a288de75980e523b9b2f1;hpb=0f97d98ce047ac1bf0046782e2913beb04bd2a29;p=kivitendo-erp.git diff --git a/templates/print/marei/kiviletter.sty b/templates/print/marei/kiviletter.sty index 30dde4604..6aedf1bd7 100644 --- a/templates/print/marei/kiviletter.sty +++ b/templates/print/marei/kiviletter.sty @@ -2,9 +2,15 @@ \ProvidesPackage{kiviletter}[2020/04/24 Letter Layouts for Kivitendo] \newif\if@kivi@infobox +\newif\if@kivi@footer \DeclareOption{reffields}{\@kivi@infoboxfalse} \DeclareOption{infobox}{\@kivi@infoboxtrue} +\DeclareOption{nofooter}{\@kivi@footerfalse} +\DeclareOption{footer}{\@kivi@footertrue} \@kivi@infoboxtrue +\@kivi@footertrue + +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{scrletter}} \ProcessOptions\relax @@ -21,13 +27,8 @@ \RequirePackage{fontspec} \fi -%\RequirePackage{xltabular} -\RequirePackage{tabularx} -\RequirePackage{longtable} +\RequirePackage{xltabular} \RequirePackage{booktabs} -\PassOptionsToPackage{table}{xcolor} - -\RequirePackage{xcolor} \RequirePackage{graphicx} \ifPDFTeX @@ -53,7 +54,6 @@ \dim_new:N \g_kivi_margin_dim \dim_gset:Nn \g_kivi_margin_dim {\useplength{toaddrhpos}} \geometry{a4paper,margin=\g_kivi_margin_dim,heightrounded} -\savegeometry{kivi.letter@default} %Scratch variables \int_new:N \l_kivi_tmp_int \bool_new:N \l_kivi_tmp_bool @@ -71,25 +71,14 @@ voffset=\dimexpr\useplength{toaddrvpos}+\useplength{toaddrheight}+4\baselineskip contents={\usebox\shippingAddressBox} ]{kivitendo.shippingaddress} - -\ExplSyntaxOn -\AtBeginLetter{\dim_gset:Nn \g_kivi_orig@textheight_dim {\textheight}} -\ExplSyntaxOff - \newpairofpagestyles{kivitendo.letter}{} + \renewcommand*{\letterpagestyle}{kivitendo.letter} -\DeclareNewPageStyleByLayers{kivitendo.letter.PricingTable}{ - kivitendo.TableHead, - kivitendo.TableFoot - kivitendo.letter.head.odd,kivitendo.letter.head.even,kivitendo.letter.head.oneside,% - kivitendo.letter.foot.odd,kivitendo.letter.foot.even,kivitendo.letter.foot.oneside,% -} \DeclareNewPageStyleByLayers{kivitendo.letter.first}{ kivitendo.shippingaddress, - kivitendo.TableFoot, - kivitendo.letter.head.odd,kivitendo.letter.head.even,kivitendo.letter.head.oneside,% - kivitendo.letter.foot.odd,kivitendo.letter.foot.even,kivitendo.letter.foot.oneside,% + plain.kivitendo.letter.head.odd,plain.kivitendo.letter.head.even,plain.kivitendo.letter.head.oneside,% + plain.kivitendo.letter.foot.odd,plain.kivitendo.letter.foot.even,plain.kivitendo.letter.foot.oneside,% } \setkomavar{backaddress}{\firma\ $\cdot$ \strasse\ $\cdot$ \ort} @@ -103,50 +92,98 @@ contents={\usebox\shippingAddressBox} \@setplength{locwidth}{6cm} \ExplSyntaxOn -\dim_new:N \l_kivi_tab_desc_dim \dim_new:N \l_kivi_tab_desc_leftskip_dim -\bool_new:N \l_kivi_col_desc_bool -\bool_set_true:N \l_kivi_col_desc_bool - -\clist_map_inline:nn {pos, id, amount, price, pricetotal} { - \bool_new:c {l_kivi_col_#1_bool} - \dim_new:c {l_kivi_tab_#1_dim} - \keys_define:nn {kivi/PricingTable} { - #1 .choice:, - #1 / true .code:n = \bool_set_true:c {l_kivi_col_#1_bool}, - #1 / false .code:n = \bool_set_false:c {l_kivi_col_#1_bool}, - #1 /unknown .code:n = {\bool_set_true:c {l_kivi_col_#1_bool}\dim_set:cn {g_kivi_tab_#1_dim} {##1}}, - #1 .default:n = true, - #1 .initial:n = true, + + + +\cs_new:Nn \__kivi_set_colwidth:nn { + \dim_set:cn {l_kivi_tab_#1_dim} {#2} +} + + +\cs_new:Nn \__kivi_initialize_columns: { + \clist_map_inline:Nn \g_kivi_pricingtable_col_clist { + \bool_if_exist:cF {l_kivi_col_##1_bool} + { + \bool_new:c {l_kivi_col_##1_bool} + \dim_new:c {l_kivi_tab_##1_dim} + \keys_define:nn {kivi/PricingTable} { + ##1 .choice:, + ##1 / true .code:n = \bool_set_true:c {l_kivi_col_##1_bool}, + ##1 / false .code:n = \bool_set_false:c {l_kivi_col_##1_bool}, + ##1 / unknown .code:n = { + \bool_set_true:c {l_kivi_col_##1_bool} + \dim_set:cn {l_kivi_tab_##1_dim} {####1} + }, + ##1 .default:n = true, + ##1 .initial:n = true, + ##1 / header .prop_put:c = {l_kivi_col_##1_prop}, + ##1 / colspec .prop_put:c = {l_kivi_col_##1_prop}, + } + } } } +\clist_new:N \g_kivi_pricingtable_col_clist + +\keys_define:nn {kivi/PricingTable} { + columns .code:n = + \clist_gset:Nn \g_kivi_pricingtable_col_clist {#1} + \__kivi_initialize_columns:, + columns .initial:n = {pos, id, desc, amount, price, pricetotal}, +} + % set default values for colwidth -\dim_set:Nn \l_kivi_tab_pos_dim {5ex} -\dim_set:Nn \l_kivi_tab_id_dim {4em} -\dim_set:Nn \l_kivi_tab_amount_dim {5em} -\dim_set:Nn \l_kivi_tab_price_dim {7em} -\dim_set:Nn \l_kivi_tab_pricetotal_dim {7em} +\keys_set:nn {kivi/PricingTable} { + pos=5ex, + id=4em, + amount=5em, + price=7em, + pricetotal=7em, +% desc=auto, + pos/header=\position, + id/header=\artikelnummer, + desc/header=\bezeichnung, + amount/header=\menge, + price/header=\einzelpreis, + pricetotal/header=\gesamtpreis, + price / colspec = Price, + pricetotal / colspec = Price , +} \dim_new:N \g_kivi_tabcolsep_dim \dim_gset:Nn \g_kivi_tabcolsep_dim {.5\tabcolsep} \cs_new:Nn \__kivi_calc_desc_column: { - \dim_gset:Nn \l_kivi_tab_desc_leftskip_dim { - 0pt - \bool_if:NT \l_kivi_col_pos_bool {+\l_kivi_tab_pos_dim +2\g_kivi_tabcolsep_dim} - \bool_if:NT \l_kivi_col_id_bool {+\l_kivi_tab_id_dim +2\g_kivi_tabcolsep_dim} - } - \dim_gset:Nn \l_kivi_tab_desc_dim { - \textwidth - -\l_kivi_tab_desc_leftskip_dim - \bool_if:NT \l_kivi_col_amount_bool {-\l_kivi_tab_amount_dim -2\g_kivi_tabcolsep_dim} - \bool_if:NT \l_kivi_col_pricetotal_bool {-\l_kivi_tab_pricetotal_dim -2\g_kivi_tabcolsep_dim} - \bool_if:NT \l_kivi_col_price_bool {-\l_kivi_tab_price_dim -2\g_kivi_tabcolsep_dim} + \dim_zero:N \l_kivi_tab_desc_leftskip_dim + \dim_zero:N \l_kivi_tab_desc_dim + \bool_set_false:N \l_tmpa_bool + \clist_map_inline:Nn \g_kivi_pricingtable_col_clist { + \tl_if_eq:nnTF {##1} {desc} { + \dim_set:Nn \l_kivi_tab_desc_dim { + \textwidth-\l_kivi_tab_desc_leftskip_dim + } + \bool_set_true:N \l_tmpa_bool + + }{ + \bool_if:NTF \l_tmpa_bool { + \bool_if:cT {l_kivi_col_##1_bool} { + \dim_sub:Nn \l_kivi_tab_desc_dim { + \dim_use:c {l_kivi_tab_##1_dim}+2\g_kivi_tabcolsep_dim + } + } + }{ + \bool_if:cT {l_kivi_col_##1_bool} { + \dim_add:Nn \l_kivi_tab_desc_leftskip_dim { + \dim_use:c {l_kivi_tab_##1_dim}+2\g_kivi_tabcolsep_dim + } + } + } + } } } -\newcolumntype{P}{>{\raggedleft\arraybackslash}p{\l_kivi_tab_price_dim}<{\,\currency}} +\newcolumntype{P}[1]{>{\raggedleft\arraybackslash}p{#1}<{\__kivi_tab_column_currency:}} \RequirePackage{tcolorbox} \tcbuselibrary{breakable, skins} @@ -160,6 +197,7 @@ contents={\usebox\shippingAddressBox} }, underlay~unbroken~and~last={ \node[anchor=north] at (interior.north) {\csname box_use:c\endcsname {g_kivi_LT@head_box}}; + \node[anchor=south] at (interior.south) {\csname box_use:c\endcsname {g_kivi_LT@lastfoot_box}}; }, boxsep=0pt, boxrule=0pt, @@ -195,8 +233,10 @@ contents={\usebox\shippingAddressBox} \newcommand{\FakeTable}[1]{ \par \seq_set_split:Nnn \l_kivi_PricingTable_seq {\tabularnewline} {#1} - \seq_remove_all:Nn \l_kivi_PricingTable_seq {} + \seq_remove_all:Nn \l_kivi_PricingTable_seq {} \begingroup + \setlength{\parskip}{\c_zero_dim} + \let\ExtraDescription\__kivi_addExtraDescription:n \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim} \seq_map_inline:Nn \l_kivi_PricingTable_seq { \seq_set_split:Nnn \l_kivi_columns_seq {&} {##1} @@ -210,11 +250,14 @@ contents={\usebox\shippingAddressBox} \endtabular \seq_if_empty:NTF \g_kivi_extraDescription_seq {\par} - {\par + {\par\nopagebreak + \begingroup \setlength{\hsize}{\dimexpr\l_kivi_tab_desc_dim+\l_kivi_tab_desc_leftskip_dim} \setlength{\leftskip}{\l_kivi_tab_desc_leftskip_dim} - \seq_use:Nn \g_kivi_extraDescription_seq {\\} - \par\nointerlineskip + \usekomafont{extraDescription} + \seq_use:Nn \g_kivi_extraDescription_seq {\\} + \par + \endgroup } } \endgroup @@ -224,12 +267,11 @@ contents={\usebox\shippingAddressBox} \seq_new:N \__l_FakeTable_columns_seq \cs_new:Nn \__kivi_setup_FakeTable: { \seq_clear:N \__l_FakeTable_columns_seq - \bool_if:NT \l_kivi_col_pos_bool {\seq_put_right:Nn \__l_FakeTable_columns_seq {1}} - \bool_if:NT \l_kivi_col_id_bool {\seq_put_right:Nn \__l_FakeTable_columns_seq {2}} - \bool_if:NT \l_kivi_col_desc_bool {\seq_put_right:Nn \__l_FakeTable_columns_seq {3}} - \bool_if:NT \l_kivi_col_amount_bool {\seq_put_right:Nn \__l_FakeTable_columns_seq {4}} - \bool_if:NT \l_kivi_col_pricetotal_bool {\seq_put_right:Nn \__l_FakeTable_columns_seq {5}} - \bool_if:NT \l_kivi_col_price_bool {\seq_put_right:Nn \__l_FakeTable_columns_seq {6}} + \int_zero:N \l_tmpa_int + \clist_map_inline:Nn \g_kivi_pricingtable_col_clist { + \int_incr:N \l_tmpa_int + \bool_if:cT {l_kivi_col_##1_bool} {\seq_put_right:Nx \__l_FakeTable_columns_seq {\int_use:N \l_tmpa_int}} + } } \tl_new:N \g_kivi_Pricing_colspec_tl @@ -239,30 +281,28 @@ contents={\usebox\shippingAddressBox} \bool_if:NT \l_kivi_col_id_bool {p{\l_kivi_tab_id_dim}} p{\l_kivi_tab_desc_dim} \bool_if:NT \l_kivi_col_amount_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_amount_dim}}} - \bool_if:NT \l_kivi_col_price_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_price_dim}<{\,\currency}}} - \bool_if:NT \l_kivi_col_pricetotal_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_pricetotal_dim}<{\,\currency}}} + \bool_if:NT \l_kivi_col_price_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_price_dim}<{\__kivi_tab_column_currency:}}} + \bool_if:NT \l_kivi_col_pricetotal_bool {\exp_not:n {>{\raggedleft\arraybackslash}p{\l_kivi_tab_pricetotal_dim}<{\__kivi_tab_column_currency:}}} @{} } +\cs_new:Nn \__kivi_tab_column_currency: {\,\currency} +\def\tabcurrency{\__kivi_tab_column_currency:} +\cs_set:Nn \__kivi_tab_column_header_currency: {} +\cs_set_eq:NN \__kivi_tab_column_body_currency: \__kivi_tab_column_currency: \clist_map_inline:nn {head, foot, firsthead, lastfoot} {%TODO reduce \box_new:c {g_kivi_LT@#1_box} } +\newkomafont{PricingTableHeader}{\bfseries} + \cs_new:Nn \__kivi_setup_LT_boxes: { \__kivi_calc_desc_column: \hbox_gset:Nn \g_kivi_LT@head_box { \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim} \exp_args:Nnx \use:n {\tabular[b]}\g_kivi_Pricing_colspec_tl - \toprule - \bool_if:NT \l_kivi_col_pos_bool {\bfseries\position &} - \bool_if:NT \l_kivi_col_id_bool {\bfseries\artikelnummer &} - \bfseries\bezeichnung - \bool_if:NT \l_kivi_col_amount_bool {&\bfseries\menge} - \bool_if:NT \l_kivi_col_price_bool { &\multicolumn{1}{>{\raggedleft}p{\l_kivi_tab_price_dim}}{\bfseries\einzelpreis}} - \bool_if:NT \l_kivi_col_pricetotal_bool {&\multicolumn{1}{>{\raggedleft}p{\l_kivi_tab_pricetotal_dim}@{}}{\bfseries\gesamtpreis}} - \\ - \midrule + \__kivi_PricingTabular_header: \endtabular } \hbox_gset:Nn \g_kivi_LT@foot_box { @@ -273,51 +313,101 @@ contents={\usebox\shippingAddressBox} \end{tabular*} } } + \hbox_gset:Nn \g_kivi_LT@lastfoot_box { + \raisebox{\dimexpr\depth+\baselineskip}[0pt][0pt]{ + \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}}r@{}} + \bottomrule + \end{tabular*} + } + } } %Macht es sinn hier eine Variante zu machen, in der alle Spalten Belegbar sind? \newenvironment{PricingTotal}{ - \tabular[t]{@{}p{\dim_eval:n {\linewidth-\l_kivi_tab_price_dim-2\tabcolsep}}P@{}} + \par\nointerlineskip + \unskip + \tabular[t]{@{}p{\dim_eval:n {\linewidth-\l_kivi_tab_pricetotal_dim-2\tabcolsep}}P{\l_kivi_tab_pricetotal_dim}@{}} \midrule }{ - \bottomrule\endtabular + \endtabular } -\newcommand{\ExtraDescription}[1]{\seq_gput_right:Nn \g_kivi_extraDescription_seq {#1}} + +\newcommand*\ExtraDescription{ + \PackageError{kiviletter}{The~command~\string\ExtraDescription\space~may~be~only~used~inside~the~\string\FakeTable\space~environment.}{See~documentation~for~details} +} + + +\cs_new:Nn \__kivi_addExtraDescription:n {\seq_gput_right:Nn \g_kivi_extraDescription_seq {#1}} \newenvironment{PricingTabular}[1][]{ \begingroup + \dim_set:Nn \parskip {\c_zero_dim} + \tl_if_empty:nF {#1} {\keys_set:nn {kivi/PricingTable} {#1}} \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim} \__kivi_calc_desc_column: \exp_args:Nx \longtable \g_kivi_Pricing_colspec_tl % Tabellenkopf - \toprule - \bfseries\position & \bfseries\artikelnummer & \bfseries\bezeichnung & \bfseries\menge &\multicolumn{1}{P}{\bfseries\einzelpreis}&\multicolumn{1}{P@{}}{\bfseries\gesamtpreis}\\ - \midrule + \__kivi_PricingTabular_header: \endhead \midrule - \multicolumn{6}{@{}r@{}}{\weiteraufnaechsterseite}\\ + \rlap{\makebox[\textwidth][r]{\weiteraufnaechsterseite}}\\ \endfoot + \bottomrule + \endlastfoot }{ \endlongtable \endgroup } -\RequirePackage{xltabular} +\cs_set:Nn \__kivi_PricingTabular_header: { + \toprule + \cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_header_currency: + \bool_set_false:N \l_tmpa_bool + \clist_map_inline:Nn \g_kivi_pricingtable_col_clist { + \bool_if:cT {l_kivi_col_##1_bool} { + \bool_if:NT \l_tmpa_bool {&} + \bool_set_true:N \l_tmpa_bool + \usekomafont{PricingTableHeader} + \prop_item:cn {l_kivi_col_##1_prop} {header} + } + } + \cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_body_currency: + \\ + \midrule +} -\newenvironment{SimpleTabular}[1][\bfseries\position & \bfseries\menge & \bfseries\bezeichnung] +\keys_define:nn {kivi/SimpleTabular} { + colspec .tl_set:N =\l_kivi_SimpleTabular_colspec_tl, + colspec .initial:n = {rrX}, + headline .tl_set:N = \l_kivi_SimpleTabular_headline_tl, + headline .initial:n = {\bfseries\position & \bfseries\menge & \bfseries\bezeichnung}, +} + +\newcommand*{\SetupSimpleTabular}[1]{\keys_set:nn {kivi/SimpleTabular} {#1}} +\newcommand*{\SetupPricingTabular}[1]{\keys_set:nn {kivi/PricingTable} {#1}} + +\newenvironment{SimpleTabular}[1][] { + \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}}} \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim} - \xltabular{\linewidth}{@{}rrX@{}} - \toprule - #1\\ - \midrule\\\endhead - \midrule - \multicolumn{3}{@{}>{\raggedright}p{\linewidth}@{}}{\weiteraufnaechsterseite}\\ + \dim_set:Nn \parskip {\c_zero_dim} + \tl_put_right:Nn \l_kivi_SimpleTabular_colspec_tl {@{}} + \tl_put_left:Nn \l_kivi_SimpleTabular_colspec_tl {@{}} + \exp_args:NnV \xltabular{\linewidth}\l_kivi_SimpleTabular_colspec_tl + \toprule + \cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_header_currency: + \l_kivi_SimpleTabular_headline_tl + \\ + \noalign{\cs_gset_eq:NN \__kivi_tab_column_currency: \__kivi_tab_column_body_currency:} + \midrule + \endhead + \midrule + \rlap{\makebox[\textwidth][r]{\weiteraufnaechsterseite}}\\ \endfoot - \bottomrule + \bottomrule \endlastfoot \ignorespaces }{ @@ -331,10 +421,10 @@ contents={\usebox\shippingAddressBox} % analog ist dies für pos, amount, price, pricetotal möglich. % Die Spalte der Bezeichnung ist nicht deaktivierbar \newenvironment{PricingTabular*}[1][]{ - \bool_gset_true:N \g_kivi_inTable_bool \tl_if_empty:nF {#1} {\keys_set:nn {kivi/PricingTable} {#1}} \__kivi_setup_LT_boxes: \__kivi_setup_FakeTable: + \dim_set:Nn \parskip {\c_zero_dim} \PricingTabularBox\ignorespaces }{\endPricingTabularBox} @@ -344,7 +434,7 @@ contents={\usebox\shippingAddressBox} \if@kivi@infobox \setkomavar{location}{ - \ifkomavarempty{transaction}{}{ + \Ifkomavarempty{transaction}{}{ \bfseries \usekomavar{transaction} } @@ -352,24 +442,24 @@ contents={\usebox\shippingAddressBox} \medskip \begin{tabularx}{\useplength{locwidth}}{@{}l<{:}>{\raggedleft\arraybackslash}X@{}} \usekomavar*{date}&\usekomavar{date}\\ - \ifkomavarempty{myref}{}{ + \Ifkomavarempty{myref}{}{ \usekomavar*{myref}&\usekomavar{myref}\\ } \kundennummer&\usekomavar{customer}\\ - \ifkomavarempty{yourref}{}{ + \Ifkomavarempty{yourref}{}{ \usekomavar*{yourref}&\usekomavar{yourref}\\ } - \ifkomavarempty{delivery}{}{ + \Ifkomavarempty{delivery}{}{ \usekomavar*{delivery}&\usekomavar{delivery}\\ } - \ifkomavarempty{quote}{}{ + \Ifkomavarempty{quote}{}{ \usekomavar*{quote}&\usekomavar{quote}\\ } - \ifkomavarempty{orderID}{}{\auftragsnummer&\usekomavar{orderID}\\} - \ifkomavarempty{projectID}{}{\projektnummer&\usekomavar{projectID}\\} + \Ifkomavarempty{orderID}{}{\auftragsnummer&\usekomavar{orderID}\\} + \Ifkomavarempty{projectID}{}{\projektnummer&\usekomavar{projectID}\\} \ansprechpartner&\usekomavar{fromname} - \ifkomavarempty{fromphone}{}{\\\textTelefon&\usekomavar{fromphone}} - \ifkomavarempty{fromemail}{}{\\\textEmail&\usekomavar{fromemail}} + \Ifkomavarempty{fromphone}{}{\\\textTelefon&\usekomavar{fromphone}} + \Ifkomavarempty{fromemail}{}{\\\textEmail&\usekomavar{fromemail}} \end{tabularx} } \removereffields @@ -379,11 +469,52 @@ contents={\usebox\shippingAddressBox} \@addtoplength{refvpos}{4\baselineskip}%sep between address boxes \fi } -\ExplSyntaxOff + \fi +%Fallback for older KOMA-Script-Versions +\cs_if_exist:NF \Ifstr {\let\Ifstr\ifstr} +\cs_if_exist:NF \Ifkomavarempty {\let\Ifkomavarempty\ifkomavarempty} + +%Definitionen für die insettings.tex + +\newcommand*{\setupIdentpath}[1]{ + \int_set:Nn \l_kivi_tmp_int {1} + \bool_set_true:N \l_kivi_tmp_bool + \bool_while_do:Nn \l_kivi_tmp_bool { + \file_if_exist:nTF {firma\int_use:N \l_kivi_tmp_int/ident.tex} + { + \exp_args:Nf \str_if_in:nnTF {#1} {Firma\int_use:N \l_kivi_tmp_int} + { + \newcommand*{\identpath}{firma\int_use:N \l_kivi_tmpa_int} + \bool_set_false:N \l_kivi_tmp_bool + } + {\int_incr:N \l_kivi_tmp_int} + } + { + \bool_set_false:N \l_kivi_tmp_bool + \newcommand*{\identpath}{firma} + } + } +} + +\newcommand*{\setupCurrencyConfig}[2]{ + \tl_new:N \g_kivi_currency_tl + \exp_args:Nf \str_if_in:nnT {#2} {USD} {\tl_gset:Nn \g_kivi_currency_tl {usd}} + \exp_args:Nf \str_if_in:nnT {#2} {CHF} {\tl_gset:Nn \g_kivi_currency_tl {chf}} + \exp_args:Nf \str_if_in:nnT {#2} {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{#1/\g_kivi_currency_tl _account.tex} +} + +\ExplSyntaxOff \renewcommand*{\raggedsignature}{\raggedright} +\newkomafont{extraDescription}{} + \endinput