summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/invoice_html25
-rw-r--r--conf/invoice_latex15
-rw-r--r--conf/invoice_latexcoupon12
3 files changed, 21 insertions, 31 deletions
diff --git a/conf/invoice_html b/conf/invoice_html
index 2073d7ff4..fe2a9a976 100644
--- a/conf/invoice_html
+++ b/conf/invoice_html
@@ -87,7 +87,6 @@
<%= $summary %>
<%=
my $notfirst = 0;
- my $columncount = $unitprices ? 5 : 3;
foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) {
if ($section->{'pretotal'} && !$summary) {
$OUT .= '</table>' if $notfirst;
@@ -121,9 +120,7 @@
'<tr>';
if ($section->{header_generator}) {
- my $header = &{$section->{header_generator}}();
- $OUT .= $header;
- $columncount = scalar(my @array = split /<\/th><th/i, $header);
+ $OUT .= &{$section->{header_generator}}();
} else {
$OUT .= '<th align="center">Ref</th>'.
'<th align="left">Description</th>'.
@@ -165,25 +162,19 @@
$OUT .= '</tr>';
$lastref = $line->{'ref'};
if ( @{$line->{'ext_description'} } ) {
- unless ( $section->{description_generator} ) {
- $OUT .= '<tr class="invoice_extdesc"><td></td><td';
- $OUT .= $unitprices ? ' colspan=3' : '';
- $OUT .= '><table width="100%">';
- }
+ $OUT .= '<tr class="invoice_extdesc"><td></td><td';
+ $OUT .= $unitprices ? ' colspan=3>' : '>';
+ $OUT .= '<table width="100%">';
foreach my $ext_desc ( @{$line->{'ext_description'} } ) {
$OUT .=
'<tr class="invoice_extdesc">'.
- ( $section->{'description_generator'} ? '<td></td>' : '' ).
'<td align="left" '.
( $ext_desc =~ /<\/?TD>/i ? '' : 'colspan=99' ). '>'.
'&nbsp;&nbsp;'. $ext_desc.
'</td>'.
'</tr>'
}
- unless ( $section->{description_generator} ) {
- $OUT .= '</table></td><td></td>';
- }
- $OUT .= '</tr>';
+ $OUT .= '</table></td><td></td></tr>';
}
}
@@ -207,7 +198,7 @@
}
}
if ($section->{'posttotal'}) {
- $OUT .= '<tr><td align="right" colspan='. $columncount. '>';
+ $OUT .= '<tr><td align="right" colspan=5>';
$OUT .=
'<p><font size="+1">'. $section->{'posttotal'}.
'</font>'.
@@ -233,8 +224,8 @@
$OUT .= &{$section->{total_line_generator}}($line);
} else {
$OUT .= qq(<td style="$style">&nbsp;</td>).
- qq(<td align="left" style="$style" colspan=").
- ( $columncount - 2 ). '">'.
+ qq(<td align="left" style="$style").
+ ( $unitprices ? ' colspan=3>' : '>' ).
$line->{'total_item'}. '</td>'.
qq(<td align="right" style="$style">).
$line->{'total_amount'}. '</td>';
diff --git a/conf/invoice_latex b/conf/invoice_latex
index 29a901df1..d37eeba3a 100644
--- a/conf/invoice_latex
+++ b/conf/invoice_latex
@@ -24,14 +24,14 @@
\addtolength{\voffset}{-0.0cm} % top margin to top of header
\addtolength{\hoffset}{-0.6cm} % left margin on page
-\addtolength{\topmargin}{[@-- defined($topmargin) ? $topmargin : '-1.25cm' --@]}
+\addtolength{\topmargin}{-1.25cm} % top margin to top of header
\setlength{\headheight}{2.0cm} % height of header
-\setlength{\headsep}{[@-- defined($headsep) ? $headsep : '1.0cm' --@]}
+\setlength{\headsep}{1.0cm} % between header and text
\setlength{\footskip}{1.0cm} % bottom of footer from bottom of text
%\addtolength{\textwidth}{2.1in} % width of text
\setlength{\textwidth}{19.5cm}
-\setlength{\textheight}{[@-- defined($textheight) ? $textheight : '19.5cm' --@]}
+\setlength{\textheight}{19.5cm}
\setlength{\oddsidemargin}{-0.9cm} % odd page left margin
\setlength{\evensidemargin}{-0.9cm} % even page left margin
@@ -51,7 +51,7 @@
}
}
-\newcommand{\extracouponspace}{[@-- defined($extracouponspace) ? $extracouponspace : '3.6cm' --@]}
+\newcommand{\extracouponspace}{3.6cm}
% Adjust the inset of the mailing address
\newcommand{\addressinset}[1][]{\hspace{1.0cm}}
@@ -80,7 +80,6 @@
$OUT .= '\vspace{-\extracouponspace}';
$OUT .= '\rule[0.5em]{\textwidth}{\footrulewidth}\\\\';
$OUT .= $coupon;
- $OUT .= '\vspace{'. $couponfootsep. '}' if defined($couponfootsep);
}
'';
--@] [@-- $smallerfooter ? '\scriptsize{' : '\small{' --@]
@@ -109,10 +108,10 @@
\returninset
\makebox{
\begin{tabular}{ll}
- \includegraphics{[@-- $logo_file --@]} & [@-- $verticalreturnaddress ? '\\\\' : '' --@]
+ \includegraphics{[@-- $logo_file --@]} &
\begin{minipage}[b]{5.5cm}
[@-- $returnaddress --@]
- \end{minipage}\\
+ \end{minipage}
\end{tabular}
}
}
@@ -202,7 +201,7 @@
\addressinset \rule{0.5cm}{0cm}
\makebox{
\begin{minipage}[t]{7.0cm}
-\vspace{[@-- defined($addresssep) ? $addresssep : '0.25cm' --@]}
+\vspace{0.25cm}
\textbf{[@-- $payname --@]}\\
\addressline{[@-- $company --@]}
\addressline{[@-- $address1 --@]}
diff --git a/conf/invoice_latexcoupon b/conf/invoice_latexcoupon
index a4ccddda7..327c1213b 100644
--- a/conf/invoice_latexcoupon
+++ b/conf/invoice_latexcoupon
@@ -3,13 +3,13 @@ Detach and return this remittance form with your your payment.\\
\begin{tabular}{ll}
\returninset
\begin{tabular}{ll}
- \makebox{ \includegraphics{[@-- $logo_file --@]}} & [@-- $verticalreturnaddress ? '\\\\' : '' --@]
+ \makebox{ \includegraphics{[@-- $logo_file --@]}} &
\begin{minipage}[b]{5.5cm}
[@-- $returnaddress --@]
- \end{minipage}\\
+ \end{minipage}
\end{tabular}&
\begin{tabular}{r@{: }lr}
-Invoice date & \textbf{[@-- $date --@]} & \multirow{4}*{[@-- $verticalreturnaddress ? '\\rule{1.5cm}{0cm}' : '' --@]
+Invoice date & \textbf{[@-- $date --@]} & \multirow{4}*{
\makebox{
\begin{minipage}[t]{7.0cm}
\textbf{[@-- $payname --@]}\\
@@ -21,15 +21,15 @@ Invoice date & \textbf{[@-- $date --@]} & \multirow{4}*{[@-- $verticalreturnaddr
\end{minipage}}}\\
Customer\#& \textbf{[@-- $custnum --@]} & \\
Total Due & \textbf{[@-- $balance --@]} & \\
-\rule{0pt}{[@-- defined($amountenclosedsep) ? $amountenclosedsep : '2.25em' --@]}Amount Enclosed & \rule{2cm}{1pt}& \\
+\rule{0pt}{2.25em}Amount Enclosed & \rule{2cm}{1pt}& \\
\end{tabular}\\
-\rule{0pt}{[@-- defined($coupontoaddresssep) ? $coupontoaddresssep : '1cm' --@]} &\\
+\rule{0pt}{1cm} &\\
\end{tabular}\\
\begin{tabular}{ll}
\addressinset \rule{0.5cm}{0cm} &
\makebox{
\begin{minipage}[t]{7.0cm}
-[@-- $addcompanytoaddress ? $company_name. '\\\\' : '' --@][@-- $returnaddress --@]
+[@-- $returnaddress --@]
\end{minipage}}
\hfill
\end{tabular}\\