summaryrefslogtreecommitdiff
path: root/conf/invoice_latex
diff options
context:
space:
mode:
authorjeff <jeff>2008-06-02 11:16:09 +0000
committerjeff <jeff>2008-06-02 11:16:09 +0000
commit1d2c5120add6c4c63723c7ef896b5d0b8fe962df (patch)
tree89378cd5e24e89b8599990f2e7ca5019abe1bc54 /conf/invoice_latex
parent773dc8ba7af4d895e0347ebfa59a340f268fd10b (diff)
typeset tear-off remittance coupon
Diffstat (limited to 'conf/invoice_latex')
-rw-r--r--conf/invoice_latex33
1 files changed, 27 insertions, 6 deletions
diff --git a/conf/invoice_latex b/conf/invoice_latex
index aadd326..7e5ecdd 100644
--- a/conf/invoice_latex
+++ b/conf/invoice_latex
@@ -19,7 +19,7 @@
\documentclass[letterpaper]{article}
-\usepackage{fancyhdr,lastpage,ifthen,longtable,afterpage,caption}
+\usepackage{fancyhdr,lastpage,ifthen,longtable,afterpage,caption,multirow,bigstrut}
\usepackage{graphicx} % required for logo graphic
\addtolength{\voffset}{-0.0cm} % top margin to top of header
@@ -40,6 +40,19 @@
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{1pt}
+\renewcommand{\footrule}{
+[@--
+ $coupon ? '\ifthenelse{\equal{\thepage}{1}}' : '';
+--@]
+ {
+ }
+ {
+ \vbox to 0pt{\rule{\headwidth}{\footrulewidth}\vss}
+ }
+}
+
+\newcommand{\extracouponspace}{4.8cm}
+
% Adjust the inset of the mailing address
\newcommand{\addressinset}[1][]{\hspace{1.0cm}}
@@ -62,9 +75,16 @@
\fancyfoot[C]{
\ifthenelse{\equal{\thepage}{1}}
{ % First page
- \small{
+[@--
+ if ($coupon) {
+ $OUT .= '\vspace{-\extracouponspace}';
+ $OUT .= '\rule[0.5em]{\textwidth}{\footrulewidth}\\\\';
+ $OUT .= $coupon;
+ }
+ '';
+--@] \small{
[@-- $footer --@]
- }
+ }[@-- $coupon ? '\vspace{\extracouponspace}' : '' --@]
}
{ % ... pages
\small{
@@ -167,6 +187,7 @@
%
%
%
+[@-- $coupon ? '\enlargethispage{-\extracouponspace}' : '' --@]
\begin{tabular}{ll}
\addressinset \rule{0cm}{0cm} &
\makebox{
@@ -227,12 +248,12 @@ Terms: [@-- $terms --@]\\
'{' . $section->{'subtotal'} . '}' . "\n";
}
- if ($section == $sections[$#sections]) {
- foreach my $line (@total_items) {
+ #if ($section == $sections[$#sections]) {
+ foreach my $line (grep {$_->{section}->{description} eq $section->{description}} @total_items) {
$OUT .= '\FStotaldesc{' . $line->{'total_item'} . '}' .
'{' . $line->{'total_amount'} . '}' . "\n";
}
- }
+ #}
$OUT .= '\hline';
$OUT .= '\endlastfoot';