test faketable
authorMarei Peischl <marei@peitex.de>
Thu, 21 Nov 2019 14:18:21 +0000 (15:18 +0100)
committerJan Büren <jan@kivitendo.de>
Mon, 3 Feb 2020 11:21:38 +0000 (12:21 +0100)
kiviletter.sty
sales_quotation.tex

index e164249..ecb4a16 100644 (file)
@@ -6,6 +6,8 @@
 \DeclareOption{infobox}{\@kivi@infoboxtrue}
 \@kivi@infoboxtrue
 
+\newif\if@kivi@faketable
+\DeclareOption{faketable}{\@kivi@faketabletrue}
 
 \ProcessOptions\relax
 
@@ -78,6 +80,18 @@ contents={\usebox\shippingAddressBox}
 
 \newcolumntype{P}{>{\raggedleft\arraybackslash}p{\g_kivi_tab_price_dim}}
 
+\if@kivi@faketable
+\RequirePackage{environ}
+\ExplSyntaxOn
+\seq_new:N \l_kivi_PricingTable_seq
+\NewEnviron{PricingTabular}{
+%      \tl_set:No \l_tmpa_tl {\BODY}
+       \seq_set_split:NnV \l_kivi_PricingTable_seq {\tabularnewline} \BODY
+       \seq_show:N \l_kivi_PricingTable_seq
+}
+\ExplSyntaxOff
+
+\else
 \newenvironment{PricingTabular}{
        \begingroup
        \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim}
@@ -95,6 +109,7 @@ contents={\usebox\shippingAddressBox}
        \endlongtable
        \endgroup
 }
+\fi
 
 \ExplSyntaxOff
 
index 9ef5a17..efa2110 100644 (file)
@@ -1,3 +1,4 @@
+\PassOptionsToPackage{faketable}{kiviletter}
 \input{inheaders.tex}
 
 
 }
 \thispagestyle{kivitendo.letter.first}
 
-\angebotsformel\\
+\angebotsformel
 
 
 \begin{PricingTabular}
        <%qty%> <%unit%> &
        <%sellprice%>&
        \ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}
-                       <%linetotal%>\\
+                       <%linetotal%>\tabularnewline
 <%end number%>
 \end{PricingTabular}
 
 \closing{\gruesse}
 
 \begin{minipage}{\textwidth}
+\rule{\linewidth}{.2pt}\par
 \auftragerteilt\par\bigskip
 \nurort:\rule[-.5ex]{8cm}{.2pt}\ ,\den\ \rule[-.5ex]{5cm}{.2pt}\par\bigskip