marei: new koma-names + fallback for outdated versions
authorMarei (peiTeX) <marei@peitex.de>
Fri, 25 Sep 2020 19:35:43 +0000 (21:35 +0200)
committerJan Büren <jan@kivitendo.de>
Wed, 21 Oct 2020 11:42:04 +0000 (13:42 +0200)
13 files changed:
templates/print/marei/credit_note.tex
templates/print/marei/insettings.tex
templates/print/marei/invoice.tex
templates/print/marei/kiviletter.sty
templates/print/marei/proforma.tex
templates/print/marei/purchase_order.tex
templates/print/marei/request_quotation.tex
templates/print/marei/sales_delivery_order.tex
templates/print/marei/sales_order.tex
templates/print/marei/sales_quotation.tex
templates/print/marei/statement.tex
templates/print/marei/zahlungserinnerung.tex
templates/print/marei/zahlungserinnerung_invoice.tex

index 63b2f77..058bc13 100644 (file)
 % 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%>%
        }%
index fae4f31..76dc1d9 100644 (file)
@@ -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
   \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
        \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}
 
index 44a03f6..d212ec5 100644 (file)
 % 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%>,
                &%
                <%qty%> <%unit%> &%
                <%sellprice%>&%
-               \ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
+               \Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
                <%linetotal%>\tabularnewline%
        <%end number%>%
        }%
 
 \vspace{0.2cm}
 
-\ifstr{<%deliverydate%>}{}{}{%
+\Ifstr{<%deliverydate%>}{}{}{%
        \leistungsdatumGleichRechnungsdatum%
 }{
        \lieferungErfolgtAm ~<%deliverydate%>.
index 7ed1d09..5630270 100644 (file)
@@ -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}
 
index e7dc8b9..ce2196a 100644 (file)
 % 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%>%
 }%
index b250e8b..677e2ab 100644 (file)
 % 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%>,
                &%
                <%qty%> <%unit%> &%
                <%sellprice%>&%
-               \ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
+               \Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
                <%linetotal%>\tabularnewline
        <%end number%>%
        }%
index a5dda1a..9631735 100644 (file)
 % 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
index 0f90f14..657abd9 100644 (file)
@@ -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%>%
index 12df080..6bb10c5 100644 (file)
 % 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%>,
                &%
                <%qty%> <%unit%> &%
                <%sellprice%>&%
-               \ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
+               \Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
                <%linetotal%>\tabularnewline
        <%end number%>%
        }%
index 75121bc..3df4300 100644 (file)
 % 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%>,
        &%
        <%qty%> <%unit%> &%
        <%sellprice%>&%
-       \ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
+       \Ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}%
                        <%linetotal%>\tabularnewline
 <%end number%>%
 }
index c5bcc6d..bfde48e 100644 (file)
 % 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%>,
index 942e96a..09293ee 100644 (file)
 % 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%>,
index 62df538..da7de4b 100644 (file)
 % 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%>,