add thispagestyle only if pagebreak
authorMarei Peischl <marei@peitex.de>
Wed, 27 Nov 2019 13:16:09 +0000 (14:16 +0100)
committerJan Büren <jan@kivitendo.de>
Mon, 3 Feb 2020 11:21:38 +0000 (12:21 +0100)
kiviletter.sty

index b02b9ba..31fbeb9 100644 (file)
@@ -53,6 +53,7 @@
 \bool_new:N \l_kivi_tmp_bool
 \bool_new:N  \g_kivi_TableFoot_bool
 \dim_new:N \g_kivi_orig@textheight_dim
+\int_new:N \g_PricingTabular_firstpage_int
 \ExplSyntaxOff
 
 \newsavebox{\shippingAddressBox}
@@ -235,6 +236,7 @@ align=bl,
        \Gm@changelayout
        \begingroup
        \def \@currenvir {PricingTabular*}\edef \@currenvline {\on@line }
+       \int_gset:Nn \g_PricingTabular_firstpage_int {\c@page}
        \addtolength{\vsize}{-\box_ht:N \g_kivi_LT@foot_box}
        \pagegoal\vsize
        \widowpenalty0
@@ -246,7 +248,7 @@ align=bl,
 }
 
 \cs_new:cpn {endPricingTabular*} {
-       \thispagestyle{kivitendo.letter.PricingTable}
+       \int_compare:nNnF \g_PricingTabular_firstpage_int = \c@page {\thispagestyle{kivitendo.letter.PricingTable}}
        \bool_gset_false:N \g_kivi_TableFoot_bool
        \@nameuse{Gm@restore@@kivi.letter@default}
        \Gm@changelayout