From de40b13af8b16ab8d8b137e02927eb92bb505bbe Mon Sep 17 00:00:00 2001 From: Marei Peischl Date: Thu, 21 Nov 2019 11:33:16 +0100 Subject: [PATCH] =?utf8?q?Mandantenf=C3=A4higkeit=20bis=20firma?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- insettings.tex | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/insettings.tex b/insettings.tex index 48504a117..7ea75c4aa 100644 --- a/insettings.tex +++ b/insettings.tex @@ -19,10 +19,27 @@ % Hat man mehrere Mandanten muß man statt "Firma1" den Datenbanknamen seines % Mandanten eingeben. -\IfSubStringInString{Firma1}{\kivicompany}{\newcommand{\identpath}{firma1}}{ - \IfSubStringInString{Firma2}{\kivicompany}{\newcommand{\identpath}{firma2}} - {\newcommand{\identpath}{firma}} % sonst -} % Ende Firma1 +\ExplSyntaxOn +\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} + { + \str_if_in:NnTF \kivicompany {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} + } +} + +\ExplSyntaxOff + % Identität \input{\identpath/ident.tex} -- 2.20.1