X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=conf%2Finvoice_latex;h=99d12d5c722225088c49da3fb153993f73163345;hb=89f9957267f05520fc676c378694383d16eedeb1;hp=70b36b13dfdbf0c0a9ec2da57e4d8b6d36c883fc;hpb=55753aaf5b1189c06a99fe5e0791fc33316df06f;p=freeside.git diff --git a/conf/invoice_latex b/conf/invoice_latex index 70b36b13d..99d12d5c7 100644 --- a/conf/invoice_latex +++ b/conf/invoice_latex @@ -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'}); @@ -331,10 +333,17 @@ } else { $OUT .= '\FSdesc'. '{' . ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ) . '}'. - '{' . $line->{'description'} . '}' . - '{' . ( $unitprices ? $line->{'unit_amount'} : '' ) . '}'. - '{' . ( $unitprices ? $line->{'quantity'} : '' ) . '}' . - '{' . $line->{'amount'} . "}${rowbreak}\n"; + '{' . $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'};