X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=conf%2Finvoice_latex;h=70b36b13dfdbf0c0a9ec2da57e4d8b6d36c883fc;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hp=37f59d2eec644bde416469dc8deecfe26bcecd23;hpb=62b12e8b09608b7081ffd596be899fafb5c2403f;p=freeside.git diff --git a/conf/invoice_latex b/conf/invoice_latex index 37f59d2ee..70b36b13d 100644 --- a/conf/invoice_latex +++ b/conf/invoice_latex @@ -19,7 +19,7 @@ \documentclass[letterpaper]{article} -\usepackage{fancyhdr,lastpage,ifthen,array,fslongtable,afterpage,caption,multirow,bigstrut} +\usepackage{fancyhdr,lastpage,ifthen,array,longtable,afterpage,caption,multirow,bigstrut} \usepackage{graphicx} % required for logo graphic \usepackage[utf8]{inputenc} % multilanguage support \usepackage[T1]{fontenc} @@ -127,7 +127,11 @@ \ifthenelse{\equal{\thepage}{1}} { % First page \begin{tabular}{ccc} - [@-- join(' & ', emt('Invoice date'), emt('Invoice #'), emt('Customer #') ) --@]\\ + [@-- join(' & ', ( $no_date ? '' : emt('Invoice date') ), + ( $no_number ? '' : emt('Invoice #') ), + emt('Customer #') + ) + --@]\\ \vspace{0.2cm} \textbf{[@-- $date --@]} & \textbf{[@-- $invnum --@]} & \textbf{[@-- $custnum --@]} \\\hline \rule{0pt}{5ex} &~~ \huge{\textsc{[@-- emt($notice_name) --@]}} & \\ @@ -164,8 +168,9 @@ \newcommand{\FSdescriptionlength} { [@-- $unitprices ? '8.2cm' : '12.8cm' --@] } \newcommand{\FSdescriptioncolumncount} { [@-- $unitprices ? '4' : '6' --@] } \newcommand{\FSunitcolumns}{ [@-- - $unitprices - ? '\makebox[2.5cm][l]{\textbf{~~'.emt('Unit Price').'}}&\makebox[1.4cm]{\textbf{~'.emt('Quantity').'}}&' + $unitprices + ? '\makebox[2.5cm][r]{\textbf{~~' . emt('Unit Price') . '}} &' . + '\makebox[1.4cm]{\textbf{~' . emt('Quantity') . '}} & ' : '' --@] } \newcommand{\FShead}{ @@ -182,7 +187,7 @@ \newcommand{\FSdesc}[5]{ \multicolumn{1}{c}{\rule{0pt}{2.5ex}\textbf{#1}} & \multicolumn{[@-- $unitprices ? '4' : '6' --@]}{l}{\textbf{#2}} & -[@-- $unitprices ? ' \multicolumn{1}{l}{\textbf{#3}} &'."\n". +[@-- $unitprices ? ' \multicolumn{1}{r}{\textbf{\dollar #3}} &'."\n". ' \multicolumn{1}{r}{\textbf{#4}} &'."\n" : '' --@] @@ -253,7 +258,19 @@ if $coupon; $OUT .= '\begin{longtable}{cllllllr}'; $OUT .= '\caption*{ '; - $OUT .= ($section->{'description'}) ? $section->{'description'}: emt('Charges'); + if ($section->{'location'}) { + $OUT .= $section->{'location'}{'address1'}; + $OUT .= ', ' . $section->{'location'}{'address2'} + if length($section->{'location'}{'address2'}); + $OUT .= ', ' . + $section->{'location'}{'city'} . ', ' . + $section->{'location'}{'state'} . '~' . + $section->{'location'}{'zip'}; + } elsif ( $section->{'description'} ) { + $OUT .= ($section->{'description'}); + } else { + $OUT .= emt('Charges'); + } $OUT .= '}\\\\'; if ($section->{header_generator}) { $OUT .= &{$section->{header_generator}}(); @@ -272,7 +289,7 @@ $OUT .= '\endfoot'; $OUT .= '\hline'; - if (scalar(@sections) > 1) { + if (scalar(@sections) > 1 and !$section->{no_subtotal}) { if ($section->{total_generator}) { $OUT .= &{$section->{total_generator}}($section); } else {