X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=conf%2Finvoice_latex;h=822afcbddea496db1c81906f68530c536c65ce84;hb=ba703eae98d1c77cfabc275c22a992b62c60548d;hp=70b36b13dfdbf0c0a9ec2da57e4d8b6d36c883fc;hpb=55753aaf5b1189c06a99fe5e0791fc33316df06f;p=freeside.git diff --git a/conf/invoice_latex b/conf/invoice_latex index 70b36b13d..822afcbdd 100644 --- a/conf/invoice_latex +++ b/conf/invoice_latex @@ -176,7 +176,7 @@ \newcommand{\FShead}{ \hline \rule{0pt}{2.5ex} - \makebox[1.4cm]{\textbf{Ref}} & + \makebox[1.4cm]{} & \multicolumn{\FSdescriptioncolumncount}{l}{\makebox[\FSdescriptionlength][l]{\textbf{[@-- emt('Description') --@]}}}& \FSunitcolumns \makebox[1.6cm][r]{\textbf{[@-- emt('Amount') --@]}} \\ @@ -187,11 +187,11 @@ \newcommand{\FSdesc}[5]{ \multicolumn{1}{c}{\rule{0pt}{2.5ex}\textbf{#1}} & \multicolumn{[@-- $unitprices ? '4' : '6' --@]}{l}{\textbf{#2}} & -[@-- $unitprices ? ' \multicolumn{1}{r}{\textbf{\dollar #3}} &'."\n". +[@-- $unitprices ? ' \multicolumn{1}{r}{\textbf{#3}} &'."\n". ' \multicolumn{1}{r}{\textbf{#4}} &'."\n" : '' --@] - \multicolumn{1}{r}{\textbf{\dollar #5}}\\ + \multicolumn{1}{r}{\textbf{#5}}\\ } % ...extended description... \newcommand{\FSextdesc}[1]{ @@ -259,6 +259,8 @@ $OUT .= '\begin{longtable}{cllllllr}'; $OUT .= '\caption*{ '; if ($section->{'location'}) { + $OUT .= $section->{'location'}{'label_prefix'}. ': ' + if length($section->{'location'}{'label_prefix'}); $OUT .= $section->{'location'}{'address1'}; $OUT .= ', ' . $section->{'location'}{'address2'} if length($section->{'location'}{'address2'}); @@ -330,11 +332,18 @@ $OUT .= &{$section->{description_generator}}($line); } else { $OUT .= '\FSdesc'. - '{' . ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ) . '}'. - '{' . $line->{'description'} . '}' . - '{' . ( $unitprices ? $line->{'unit_amount'} : '' ) . '}'. - '{' . ( $unitprices ? $line->{'quantity'} : '' ) . '}' . - '{' . $line->{'amount'} . "}${rowbreak}\n"; + '{}'. #'{' . ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ) . '}'. + '{' . $line->{'description'} . '}' ; + if ( $unitprices and length($line->{'unit_amount'}) ) { + # then show the unit amount and quantity + $OUT .= + '{\\dollar' . $line->{'unit_amount'} . '}'. + '{' . $line->{'quantity'} . '}'; + } else { + # leave those columns blank + $OUT .= '{}{}'; + } + $OUT .= '{\\dollar' . $line->{'amount'} . "}${rowbreak}\n"; } $lastref = $line->{'ref'};