summaryrefslogtreecommitdiff
path: root/conf/invoice_latex
diff options
context:
space:
mode:
Diffstat (limited to 'conf/invoice_latex')
-rw-r--r--conf/invoice_latex162
1 files changed, 81 insertions, 81 deletions
diff --git a/conf/invoice_latex b/conf/invoice_latex
index aaec6be..ef6546f 100644
--- a/conf/invoice_latex
+++ b/conf/invoice_latex
@@ -19,7 +19,7 @@
\documentclass[letterpaper]{article}
-\usepackage{fancyhdr,lastpage,ifthen,fslongtable,afterpage,caption,multirow,bigstrut}
+\usepackage{fancyhdr,lastpage,ifthen,array,fslongtable,afterpage,caption,multirow,bigstrut}
\usepackage{graphicx} % required for logo graphic
\addtolength{\voffset}{-0.0cm} % top margin to top of header
@@ -82,12 +82,12 @@
$OUT .= $coupon;
}
'';
---@] \small{
+--@] [@-- $smallerfooter ? '\scriptsize{' : '\small{' --@]
[@-- $footer --@]
}[@-- $coupon ? '\vspace{\extracouponspace}' : '' --@]
}
{ % ... pages
- \small{
+ [@-- $smallerfooter ? '\scriptsize{' : '\small{' --@]
[@-- $smallfooter --@]
}
}
@@ -127,7 +127,7 @@
Invoice date & Invoice \#& Customer\#\\
\vspace{0.2cm}
\textbf{[@-- $date --@]} & \textbf{[@-- $invnum --@]} & \textbf{[@-- $custnum --@]} \\\hline
- \rule{0pt}{5ex} &~~ \huge{\textsc{Invoice}} & \\
+ \rule{0pt}{5ex} &~~ \huge{\textsc{[@-- $notice_name || 'Invoice' --@]}} & \\
\vspace{-0.2cm}
& & \\\hline
\end{tabular}
@@ -197,19 +197,7 @@
\begin{document}
-%
-%% Headers and footers defined for the first page
-%
-%% The LH Heading comprising logo
-%% UNCOMMENT the following FOUR lines and change the path if necssary to provide a logo
-%
-%% The Heading comprising isue date, customer ref & INVOICE name
-%
-%% Header & footer changes for subsequent pages
-%
-%
-%
-[@-- $coupon ? '\enlargethispage{-\extracouponspace}' : '' --@]
+% Headers and footers defined for the first page
\addressinset \rule{0.5cm}{0cm}
\makebox{
\begin{minipage}[t]{7.0cm}
@@ -244,83 +232,86 @@ Terms: [@-- $terms --@]\\
\end{minipage}}
\vspace{1.5cm}
%
+[@-- $summary --@]
+%
\section*{}
[@--
- foreach my $section ( @sections ) {
- if ($section->{'pretotal'}) {
+ foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) {
+ if ($section->{'pretotal'} && !$summary) {
$OUT .= '\begin{flushright}';
$OUT .= '\large\textsc{'. $section->{'pretotal'}. '}\\\\';
$OUT .= '\\end{flushright}';
}
$OUT .= '\pagebreak' if $section{'post_total'};
- $OUT .= '\captionsetup{singlelinecheck=false,justification=raggedright,font={Large,sc,bf}}';
- $OUT .= '\ifthenelse{\equal{\thepage}{1}}{\setlength{\LTextracouponspace}{\extracouponspace}}{\setlength{\LTextracouponspace}{0pt}}'
- if $coupon;
- $OUT .= '\begin{longtable}{cllllllr}';
- $OUT .= '\caption*{ ';
- $OUT .= ($section->{'description'}) ? $section->{'description'}: 'Charges';
- $OUT .= '}\\\\';
- $OUT .= '\FShead';
- $OUT .= '\endfirsthead';
- $OUT .= '\multicolumn{7}{r}{\rule{0pt}{2.5ex}Continued from previous page}\\\\';
- $OUT .= '\FShead';
- $OUT .= '\endhead';
- $OUT .= '\multicolumn{7}{r}{\rule{0pt}{2.5ex}Continued on next page...}\\\\';
- $OUT .= '\endfoot';
- $OUT .= '\hline';
-
- if (scalar(@sections) > 1) {
- $OUT .= '\FStotaldesc{' . $section->{'description'} . ' Total}' .
- '{' . $section->{'subtotal'} . '}' . "\n";
- }
-
- #if ($section == $sections[$#sections]) {
- foreach my $line (grep {$_->{section}->{description} eq $section->{description}} @total_items) {
- $OUT .= '\FStotaldesc{' . $line->{'total_item'} . '}' .
- '{' . $line->{'total_amount'} . '}' . "\n";
+ unless ($section->{'summarized'} ) {
+ $OUT .= '\captionsetup{singlelinecheck=false,justification=raggedright,font={Large,sc,bf}}';
+ $OUT .= '\ifthenelse{\equal{\thepage}{1}}{\setlength{\LTextracouponspace}{\extracouponspace}}{\setlength{\LTextracouponspace}{0pt}}'
+ if $coupon;
+ $OUT .= '\begin{longtable}{cllllllr}';
+ $OUT .= '\caption*{ ';
+ $OUT .= ($section->{'description'}) ? $section->{'description'}: 'Charges';
+ $OUT .= '}\\\\';
+ $OUT .= '\FShead';
+ $OUT .= '\endfirsthead';
+ $OUT .= '\multicolumn{7}{r}{\rule{0pt}{2.5ex}Continued from previous page}\\\\';
+ $OUT .= '\FShead';
+ $OUT .= '\endhead';
+ $OUT .= '\multicolumn{7}{r}{\rule{0pt}{2.5ex}Continued on next page...}\\\\';
+ $OUT .= '\endfoot';
+ $OUT .= '\hline';
+
+ if (scalar(@sections) > 1) {
+ $OUT .= '\FStotaldesc{' . $section->{'description'} . ' Total}' .
+ '{' . $section->{'subtotal'} . '}' . "\n";
}
- #}
-
- $OUT .= '\hline';
- $OUT .= '\endlastfoot';
-
- my $lastref = 0;
- foreach my $line (
- grep { ( scalar( @sections ) > 1
- ? $section->{'description'} eq $_->{'section'}->{'description'}
- : 1
- ) }
- @detail_items )
- {
- my $ext_description = $line->{'ext_description'};
+
+ #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';
+
+ my $lastref = 0;
+ foreach my $line (
+ grep { ( scalar( @sections ) > 1
+ ? $section->{'description'} eq $_->{'section'}->{'description'}
+ : 1
+ ) }
+ @detail_items )
+ {
+ my $ext_description = $line->{'ext_description'};
- # Don't break-up small packages.
- my $rowbreak = @$ext_description < 5 ? '*' : '';
+ # Don't break-up small packages.
+ my $rowbreak = @$ext_description < 5 ? '*' : '';
- $OUT .= "\\hline\n" if ($line->{'ref'} && $line->{'ref'} ne $lastref);
- $OUT .= '\FSdesc'.
- '{' . ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ) . '}'.
- '{' . $line->{'description'} . '}' .
- '{' . ( $unitprices ? $line->{'unit_amount'} : '' ) . '}'.
- '{' . ( $unitprices ? $line->{'quantity'} : '' ) . '}' .
- '{' . $line->{'amount'} . "}${rowbreak}\n";
- $lastref = $line->{'ref'};
-
- foreach my $ext_desc (@$ext_description) {
- if ( $ext_desc !~ /[^\\]&/ ) {
- $ext_desc = substr($ext_desc, 0, 80) . '...'
- if (length($ext_desc) > 80);
- $ext_desc = '\multicolumn{6}{l}{\small{~~~'. $ext_desc. '}}';
- }else{
- $ext_desc = "~~~$ext_desc";
+ $OUT .= "\\hline\n" if ($line->{'ref'} && $line->{'ref'} ne $lastref);
+ $OUT .= '\FSdesc'.
+ '{' . ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ) . '}'.
+ '{' . $line->{'description'} . '}' .
+ '{' . ( $unitprices ? $line->{'unit_amount'} : '' ) . '}'.
+ '{' . ( $unitprices ? $line->{'quantity'} : '' ) . '}' .
+ '{' . $line->{'amount'} . "}${rowbreak}\n";
+ $lastref = $line->{'ref'};
+
+ foreach my $ext_desc (@$ext_description) {
+ if ( $ext_desc !~ /[^\\]&/ ) {
+ $ext_desc = substr($ext_desc, 0, 80) . '...'
+ if (length($ext_desc) > 80);
+ $ext_desc = '\multicolumn{6}{l}{\small{~~~'. $ext_desc. '}}';
+ }else{
+ $ext_desc = "~~~$ext_desc";
+ }
+ $OUT .= '\FSextdesc{' . $ext_desc . '}' . "${rowbreak}\n";
}
- $OUT .= '\FSextdesc{' . $ext_desc . '}' . "${rowbreak}\n";
+
}
+ $OUT .= '\end{longtable}';
}
-
- $OUT .= '\end{longtable}';
-
if ($section->{'posttotal'}) {
$OUT .= '\begin{flushright}';
$OUT .= '\normalfont\large\bfseries\textsc{'. $section->{'posttotal'}. '}\\\\';
@@ -330,5 +321,14 @@ Terms: [@-- $terms --@]\\
--@]
\vfill
-[@-- $notes --@]
+\begin{minipage}[t]{\textwidth}
+ [@-- length($summary)
+ ? ''
+ : ( $smallernotes
+ ? '\scriptsize{ '.$notes.' }'
+ : $notes
+ )
+ --@]
+ [@-- $coupon ? '\ifthenelse{\equal{\thepage}{1}}{\rule{0pt}{\extracouponspace}}{}' : '' --@]
+\end{minipage}
\end{document}