adjust title and transaction_descripntion
authorMarei Peischl <marei@peitex.de>
Sun, 22 Dec 2019 17:02:32 +0000 (18:02 +0100)
committerJan Büren <jan@kivitendo.de>
Mon, 3 Feb 2020 11:21:38 +0000 (12:21 +0100)
kiviletter.sty
sales_quotation.tex

index afe8f32..98d0e64 100644 (file)
@@ -41,6 +41,8 @@
        ]{scrletter}
 \LoadLetterOption{DIN}
 
+\newkomavar{transaction}
+
 \usepackage{geometry}
 
 \ExplSyntaxOn
@@ -62,7 +64,7 @@
 \DeclareNewLayer[
 foreground,
 hoffset=\useplength{toaddrhpos},
-voffset=\dimexpr\useplength{toaddrvpos}+\useplength{toaddrheight}+2\baselineskip,
+voffset=\dimexpr\useplength{toaddrvpos}+\useplength{toaddrheight}+4\baselineskip,
 contents={\usebox\shippingAddressBox}
 ]{kivitendo.shippingaddress}
 
@@ -280,16 +282,15 @@ align=bl,
        }
        \bool_gset_false:N \g_kivi_restore_geometry_bool
 }
-%\ExplSyntaxOff
+
+
 
 \if@kivi@infobox
-\newkomavar{locationtitle}
 \setkomavar{location}{
-       \begin{flushright}
-               \bfseries
-               \LARGE
-               \usekomavar{locationtitle}
-       \end{flushright}
+       \ifkomavarempty{transaction}{}{
+       \bfseries
+       \usekomavar{transaction}
+       }
        \par
        \medskip
        \begin{tabularx}{\linewidth}{@{}l<{:}>{\raggedright\arraybackslash}X@{}}
@@ -301,16 +302,10 @@ align=bl,
        \end{tabularx}
 }
 \removereffields
-
-%\ExplSyntaxOn
 \AtBeginLetter{
-       \ifkomavarempty{title}{}{
-               \exp_args:Nno\setkomavar{locationtitle}{\scr@title@var}
-               \setkomavar{title}{}
-       }
        \ifdim\ht\shippingAddressBox>\z@
        \addtoplength{refvpos}{\ht\shippingAddressBox}
-       \addtoplength{refvpos}{2\baselineskip}
+       \addtoplength{refvpos}{4\baselineskip}
        \fi
 }
 \ExplSyntaxOff
index 308a03c..1e94e5e 100644 (file)
 \setkomavar{fromphone}{<%employee_tel%>}
 \setkomavar{fromemail}{<%employee_email%>}
 \setkomavar{title}{
-       \angebot
-       \par
-       \medskip
-       \large\nr ~<%quonumber%>
+       \angebot~
+       \nr ~<%quonumber%>
 }
+\setkomavar{transaction}{<%transaction_description%>}
 
 %\begin{minipage}[t]{8cm}
 %  \scriptsize