commit 2336386b8740cb6fb493e83cf31ddefa17da045a
Author: Marei Peischl <marei@peitex.de>
Date:   Fri Sep 25 21:35:43 2020 +0200

    marei: new koma-names + fallback for outdated versions

diff --git a/templates/print/marei/credit_note.tex b/templates/print/marei/credit_note.tex
index 63b2f77f6..058bc13de 100644
--- a/templates/print/marei/credit_note.tex
+++ b/templates/print/marei/credit_note.tex
@@ -70,10 +70,10 @@
 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
 \opening{
-	\ifstr{<%cp_name%>}{}
+	\Ifstr{<%cp_name%>}{}
 		{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
 		{
-			\ifstr{<%cp_gender%>}{f}
+			\Ifstr{<%cp_gender%>}{f}
 				{\anredefrau}
 				{\anredeherr}
 				<%cp_title%> <%cp_name%>,
@@ -98,7 +98,7 @@
 		&%
 		<%qty%> <%unit%> &%
 		<%sellprice%>&%
-		\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
+		\Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
 		<%linetotal%>\tabularnewline%
 	<%end number%>%
 	}%
diff --git a/templates/print/marei/insettings.tex b/templates/print/marei/insettings.tex
index fae4f3100..76dc1d9b0 100644
--- a/templates/print/marei/insettings.tex
+++ b/templates/print/marei/insettings.tex
@@ -3,12 +3,12 @@
 \ProvidesFile{insettings.tex}[2019/12/22 Konfigurationsdatei kivitendo ERP]
 % Sprachüberprüfung
 \RequirePackage[english, ngerman]{babel}
-\ifstr{\lxlangcode}{EN}{
+\Ifstr{\lxlangcode}{EN}{
 	\makeatletter
 	\main@language{english}
 	\makeatother
 	\input{english.tex}}{
-	\ifstr{\lxlangcode}{DE}{
+	\Ifstr{\lxlangcode}{DE}{
 		\makeatletter
 		\main@language{ngerman}
 		\makeatother
@@ -91,10 +91,10 @@
   \ifnum\thepage=1
   \else
       \makebox[\textwidth]{
-      \ifstr{#1}{}{}{#1: #2 \hspace{0.7cm}}
+      \Ifstr{#1}{}{}{#1: #2 \hspace{0.7cm}}
       #3
-      \ifstr{#4}{}{}{~\nr: #4}
-      \ifstr{#5}{}{}{\vom ~ #5}
+      \Ifstr{#4}{}{}{~\nr: #4}
+      \Ifstr{#5}{}{}{\vom ~ #5}
       \hspace{0.7cm} - \seite ~ \thepage/\letterlastpage  ~-%
       }
   \fi
@@ -116,7 +116,7 @@
 	\strasse               & \homepage           & \textBank        & \bank \\
 	\ort                   & \textUstid\ \ustid  & \textIban        & \iban \\
 	\textTelefon~\telefon  & \finanzamt          & \textBic         & \bic \\
-	\ifstr{\fax}{}{}{\textFax~\fax} & &\textBankleitzahl	& \bankleitzahl
+	\Ifstr{\fax}{}{}{\textFax~\fax} & &\textBankleitzahl	& \bankleitzahl
 	\end{tabular*}
 \end{lrbox}
 
diff --git a/templates/print/marei/invoice.tex b/templates/print/marei/invoice.tex
index 44a03f64e..d212ec522 100644
--- a/templates/print/marei/invoice.tex
+++ b/templates/print/marei/invoice.tex
@@ -77,10 +77,10 @@
 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
 \opening{
-	\ifstr{<%cp_name%>}{}
+	\Ifstr{<%cp_name%>}{}
 		{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
 		{
-			\ifstr{<%cp_gender%>}{f}
+			\Ifstr{<%cp_gender%>}{f}
 				{\anredefrau}
 				{\anredeherr}
 				<%cp_title%> <%cp_name%>,
@@ -121,7 +121,7 @@
 		&%
 		<%qty%> <%unit%> &%
 		<%sellprice%>&%
-		\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
+		\Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
 		<%linetotal%>\tabularnewline%
 	<%end number%>%
 	}%
@@ -137,7 +137,7 @@
 
 \vspace{0.2cm}
 
-\ifstr{<%deliverydate%>}{}{}{%
+\Ifstr{<%deliverydate%>}{}{}{%
 	\leistungsdatumGleichRechnungsdatum%
 }{
 	\lieferungErfolgtAm ~<%deliverydate%>.
diff --git a/templates/print/marei/kiviletter.sty b/templates/print/marei/kiviletter.sty
index 7ed1d09fd..56302706b 100644
--- a/templates/print/marei/kiviletter.sty
+++ b/templates/print/marei/kiviletter.sty
@@ -438,7 +438,7 @@ contents={\usebox\shippingAddressBox}
 
 \if@kivi@infobox
 \setkomavar{location}{
-	\ifkomavarempty{transaction}{}{
+	\Ifkomavarempty{transaction}{}{
 	\bfseries
 	\usekomavar{transaction}
 	}
@@ -446,24 +446,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
@@ -473,10 +473,14 @@ 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}
 
+\ExplSyntaxOff
 
 \renewcommand*{\raggedsignature}{\raggedright}
 
diff --git a/templates/print/marei/proforma.tex b/templates/print/marei/proforma.tex
index e7dc8b95b..ce2196a86 100644
--- a/templates/print/marei/proforma.tex
+++ b/templates/print/marei/proforma.tex
@@ -71,10 +71,10 @@
 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
 \opening{
-	\ifstr{<%cp_name%>}{}
+	\Ifstr{<%cp_name%>}{}
 		{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
 		{
-			\ifstr{<%cp_gender%>}{f}
+			\Ifstr{<%cp_gender%>}{f}
 				{\anredefrau}
 				{\anredeherr}
 				<%cp_title%> <%cp_name%>,
@@ -99,7 +99,7 @@
 	&%
 	<%qty%> <%unit%> &%
 	<%sellprice%>&%
-	\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
+	\Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
 	<%linetotal%>\tabularnewline%
 	<%end number%>%
 }%
diff --git a/templates/print/marei/purchase_order.tex b/templates/print/marei/purchase_order.tex
index b250e8b9d..677e2abd6 100644
--- a/templates/print/marei/purchase_order.tex
+++ b/templates/print/marei/purchase_order.tex
@@ -74,10 +74,10 @@
 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
 \opening{
-	\ifstr{<%cp_name%>}{}
+	\Ifstr{<%cp_name%>}{}
 	{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
 	{
-		\ifstr{<%cp_gender%>}{f}
+		\Ifstr{<%cp_gender%>}{f}
 			{\anredefrau}
 			{\anredeherr}
 			<%cp_title%> <%cp_name%>,
@@ -102,7 +102,7 @@
 		&%
 		<%qty%> <%unit%> &%
 		<%sellprice%>&%
-		\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
+		\Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
 		<%linetotal%>\tabularnewline
 	<%end number%>%
 	}%
diff --git a/templates/print/marei/request_quotation.tex b/templates/print/marei/request_quotation.tex
index a5dda1a0f..963173598 100644
--- a/templates/print/marei/request_quotation.tex
+++ b/templates/print/marei/request_quotation.tex
@@ -47,10 +47,10 @@
 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
 \opening{
-	\ifstr{<%cp_name%>}{}
+	\Ifstr{<%cp_name%>}{}
 		{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
 		{
-			\ifstr{<%cp_gender%>}{f}
+			\Ifstr{<%cp_gender%>}{f}
 				{\anredefrau}
 				{\anredeherr}
 				<%cp_title%> <%cp_name%>,
@@ -71,7 +71,7 @@
 	<%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>%
 	<%if make%>%
 		<%foreach make%>%
-			\ifstr{<%make%>}{<%name%>}{\ExtraDescription{\artikelnummer: <%model%>}}{}
+			\Ifstr{<%make%>}{<%name%>}{\ExtraDescription{\artikelnummer: <%model%>}}{}
 		<%end foreach%>%
 	<%end if%>%
 	\tabularnewline
diff --git a/templates/print/marei/sales_delivery_order.tex b/templates/print/marei/sales_delivery_order.tex
index 0f90f147e..657abd973 100644
--- a/templates/print/marei/sales_delivery_order.tex
+++ b/templates/print/marei/sales_delivery_order.tex
@@ -43,7 +43,7 @@
 \begin{document}
 
 \begin{letter}{
-  \ifstr{<%shiptoname%>}{}{ % KEINE ABWEICHENDE LIEFERADRESSE
+  \Ifstr{<%shiptoname%>}{}{ % KEINE ABWEICHENDE LIEFERADRESSE
 	<%name%>\strut\\
 	<%if department_1%><%department_1%>\\<%end if%>%
 	<%if department_2%><%department_2%>\\<%end if%>%
diff --git a/templates/print/marei/sales_order.tex b/templates/print/marei/sales_order.tex
index 12df08002..6bb10c5b7 100644
--- a/templates/print/marei/sales_order.tex
+++ b/templates/print/marei/sales_order.tex
@@ -74,10 +74,10 @@
 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
 \opening{
-	\ifstr{<%cp_name%>}{}
+	\Ifstr{<%cp_name%>}{}
 	{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
 	{
-		\ifstr{<%cp_gender%>}{f}
+		\Ifstr{<%cp_gender%>}{f}
 			{\anredefrau}
 			{\anredeherr}
 			<%cp_title%> <%cp_name%>,
@@ -102,7 +102,7 @@
 		&%
 		<%qty%> <%unit%> &%
 		<%sellprice%>&%
-		\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
+		\Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
 		<%linetotal%>\tabularnewline
 	<%end number%>%
 	}%
diff --git a/templates/print/marei/sales_quotation.tex b/templates/print/marei/sales_quotation.tex
index 75121bc70..3df4300a9 100644
--- a/templates/print/marei/sales_quotation.tex
+++ b/templates/print/marei/sales_quotation.tex
@@ -74,10 +74,10 @@
 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
 \opening{
-	\ifstr{<%cp_name%>}{}
+	\Ifstr{<%cp_name%>}{}
 		{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
 		{
-		\ifstr{<%cp_gender%>}{f}
+		\Ifstr{<%cp_gender%>}{f}
 			{\anredefrau}
 			{\anredeherr}
 			<%cp_title%> <%cp_name%>,
@@ -103,7 +103,7 @@
 	&%
 	<%qty%> <%unit%> &%
 	<%sellprice%>&%
-	\ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
+	\Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
 			<%linetotal%>\tabularnewline
 <%end number%>%
 }
diff --git a/templates/print/marei/statement.tex b/templates/print/marei/statement.tex
index c5bcc6d5d..bfde48e38 100644
--- a/templates/print/marei/statement.tex
+++ b/templates/print/marei/statement.tex
@@ -41,10 +41,10 @@
 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
 \opening{
-	\ifstr{<%cp_name%>}{}
+	\Ifstr{<%cp_name%>}{}
 		{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
 		{
-			\ifstr{<%cp_gender%>}{f}
+			\Ifstr{<%cp_gender%>}{f}
 				{\anredefrau}
 				{\anredeherr}
 				<%cp_title%> <%cp_name%>,
diff --git a/templates/print/marei/zahlungserinnerung.tex b/templates/print/marei/zahlungserinnerung.tex
index 942e96a1c..09293ee77 100644
--- a/templates/print/marei/zahlungserinnerung.tex
+++ b/templates/print/marei/zahlungserinnerung.tex
@@ -42,10 +42,10 @@
 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
 \opening{
-	\ifstr{<%cp_name%>}{}
+	\Ifstr{<%cp_name%>}{}
 		{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
 		{
-			\ifstr{<%cp_gender%>}{f}
+			\Ifstr{<%cp_gender%>}{f}
 				{\anredefrau}
 				{\anredeherr}
 				<%cp_title%> <%cp_name%>,
diff --git a/templates/print/marei/zahlungserinnerung_invoice.tex b/templates/print/marei/zahlungserinnerung_invoice.tex
index 62df53860..da7de4bd1 100644
--- a/templates/print/marei/zahlungserinnerung_invoice.tex
+++ b/templates/print/marei/zahlungserinnerung_invoice.tex
@@ -48,10 +48,10 @@
 % Bei Kontaktperson Anrede nach Geschlecht unterscheiden.
 % Bei natürlichen Personen persönliche Anrede, sonst allgemeine Anrede.
 \opening{
-	\ifstr{<%cp_name%>}{}
+	\Ifstr{<%cp_name%>}{}
 		{<%if natural_person%><%greeting%> <%name%>,<%else%>\anrede<%end if%>}
 		{
-			\ifstr{<%cp_gender%>}{f}
+			\Ifstr{<%cp_gender%>}{f}
 				{\anredefrau}
 				{\anredeherr}
 				<%cp_title%> <%cp_name%>,
