From: Marei Peischl Date: Thu, 21 Nov 2019 15:28:41 +0000 (+0100) Subject: tcolorbox breakable X-Git-Tag: release-3.5.6.1~337 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c44fd93f760b635e63e20a02290a91abe0c4763d;p=kivitendo-erp.git tcolorbox breakable --- diff --git a/kiviletter.sty b/kiviletter.sty index 0912e1b7d..4b02af502 100644 --- a/kiviletter.sty +++ b/kiviletter.sty @@ -81,8 +81,10 @@ contents={\usebox\shippingAddressBox} \newcolumntype{P}{>{\raggedleft\arraybackslash}p{\g_kivi_tab_price_dim}} %\if@kivi@faketable -\RequirePackage{environ} +\RequirePackage{tcolorbox} +\tcbuselibrary{breakable, skins} \seq_new:N \l_kivi_PricingTable_seq +\seq_new:N \g_kivi_extraDescription_seq \newcommand{\FakeTable}[1]{ % \tl_set:No \l_tmpa_tl {\BODY} \endPricingTabular @@ -90,15 +92,25 @@ contents={\usebox\shippingAddressBox} \begingroup \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim} \seq_map_inline:Nn \l_kivi_PricingTable_seq { + \seq_gclear:N \g_kivi_extraDescription_seq \tabular{@{}p{\g_kivi_tab_pos_dim}p{\g_kivi_tab_id_dim}p{\g_kivi_tab_desc_dim}>{\raggedleft\arraybackslash}p{\g_kivi_tab_num_dim}*2{P<{\,\currency}}@{}} ##1 - \endtabular\par\nointerlineskip + \endtabular + \seq_if_empty:NTF \g_kivi_extraDescription_seq + {\par\nointerlineskip} + {\par\nointerlineskip + \begin{tcolorbox}[left skip=\dim_eval:n {\g_kivi_tab_pos_dim+ \g_kivi_tab_id_dim +4\tabcolsep},right skip=\dim_eval:n {\g_kivi_tab_num_dim+ 2\g_kivi_tab_price_dim +6\tabcolsep}, breakable, blank] + \seq_use:N \g_kivi_extraDescription_seq {\newline} + \end{tcolorbox} + } } \endgroup \PricingTabular } + +\newcommand*{\ExtraDescription}[1]{\seq_gput_right:Nn \g_kivi_extraDescription_seq {#1}} %\else -\newenvironment{PricingTabular}{ +\newenvironment{PricingTabular}[1][]{ \begingroup \setlength{\tabcolsep}{\g_kivi_tabcolsep_dim} \CalcTabCols diff --git a/sales_quotation.tex b/sales_quotation.tex index 070cceff4..da097c415 100644 --- a/sales_quotation.tex +++ b/sales_quotation.tex @@ -144,10 +144,10 @@ <%runningnumber%> &% <%number%> &% \textbf{<%description%>}% - <%if longdescription%> \newline\scriptsize <%longdescription%><%end longdescription%>% - <%if serialnumber%> \newline\scriptsize \seriennummer: <%serialnumber%><%end serialnumber%>% - <%if ean%> \newline\scriptsize \ean: <%ean%><%end ean%>% - <%if projectnumber%>\newline\scriptsize \projektnummer: <%projectnumber%><%end projectnumber%>% + <%if longdescription%>\ExtraDescription{<%longdescription%>}<%end longdescription%>% + <%if serialnumber%>\ExtraDescription{\seriennummer: <%serialnumber%>}<%end serialnumber%>% + <%if ean%>\ExtraDescription{\ean: <%ean%>}<%end ean%>% + <%if projectnumber%>\ExtraDescription{\projektnummer: <%projectnumber%>}<%end projectnumber%>% &% <%qty%> <%unit%> &% <%sellprice%>&%