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

index ecb4a16..9a98e1b 100644 (file)
@@ -80,18 +80,18 @@ contents={\usebox\shippingAddressBox}
 
 \newcolumntype{P}{>{\raggedleft\arraybackslash}p{\g_kivi_tab_price_dim}}
 
-\if@kivi@faketable
+%\if@kivi@faketable
 \RequirePackage{environ}
 \ExplSyntaxOn
 \seq_new:N \l_kivi_PricingTable_seq
-\NewEnviron{PricingTabular}{
+\NewDocumentCommand{\FakeTable}{m}{
 %      \tl_set:No \l_tmpa_tl {\BODY}
-       \seq_set_split:NnV \l_kivi_PricingTable_seq {\tabularnewline} \BODY
+       \seq_set_split:Nnn \l_kivi_PricingTable_seq {\tabularnewline} {#1}
        \seq_show:N \l_kivi_PricingTable_seq
 }
 \ExplSyntaxOff
 
-\else
+%\else
 \newenvironment{PricingTabular}{
        \begingroup
        \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim}
@@ -109,7 +109,7 @@ contents={\usebox\shippingAddressBox}
        \endlongtable
        \endgroup
 }
-\fi
+%\fi
 
 \ExplSyntaxOff
 
index 2358b25..1719584 100644 (file)
        \bottomrule
        \endlastfoot
 % eigentliche Tabelle
+\FakeTable{
 <%foreach number%>
 <%runningnumber%> &
 <%number%> &
        \ifstr{<%p_discount%>}{0}{}{\sffamily\scriptsize{(-<%p_discount%>\,\%)}}
                        <%linetotal%>\tabularnewline
 <%end number%>
+}
 \end{PricingTabular}
 
 <%if notes%>