avoid overprinting remittance coupons
authorjeff <jeff>
Fri, 10 Oct 2008 21:30:12 +0000 (21:30 +0000)
committerjeff <jeff>
Fri, 10 Oct 2008 21:30:12 +0000 (21:30 +0000)
conf/invoice_latex
conf/longtable.sty.patch [new file with mode: 0644]

index fe910b2..d04507d 100644 (file)
@@ -237,6 +237,8 @@ Terms: [@-- $terms --@]\\
     }\r
     $OUT .= '\pagebreak' if $section{'post_total'};\r
     $OUT .= '\captionsetup{singlelinecheck=false,justification=raggedright,font={Large,sc,bf}}';\r
+    $OUT .= '\ifthenelse{\equal{\thepage}{1}}{\setlength{\LTextracouponspace}{\extracouponspace}}{\setlength{\LTextracouponspace}{0pt}}'\r
+      if $coupon;\r
     $OUT .= '\begin{longtable}{cllllllr}';\r
     $OUT .= '\caption*{ ';\r
     $OUT .= ($section->{'description'}) ? $section->{'description'}: 'Charges';\r
diff --git a/conf/longtable.sty.patch b/conf/longtable.sty.patch
new file mode 100644 (file)
index 0000000..9d3a573
--- /dev/null
@@ -0,0 +1,18 @@
+--- longtable.orig      2004-03-13 21:37:06.000000000 -0500
++++ longtable.sty       2008-10-10 16:32:25.000000000 -0400
+@@ -55,6 +55,7 @@
+ \newcount\LTchunksize \LTchunksize=20
+ \let\c@LTchunksize\LTchunksize
+ \newdimen\LTcapwidth  \LTcapwidth=4in
++\newlength\LTextracouponspace
+ \newbox\LT@head
+ \newbox\LT@firsthead
+ \newbox\LT@foot
+@@ -146,6 +147,7 @@
+   \advance\dimen@ \ht\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi
+   \advance\dimen@ \dp\ifvoid\LT@firsthead\LT@head\else\LT@firsthead\fi
+   \advance\dimen@ \ht\LT@foot
++  \advance\dimen@ \LTextracouponspace
+   \dimen@ii\vfuzz
+   \vfuzz\maxdimen
+     \setbox\tw@\copy\z@