X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=conf%2Finvoice_latex;h=99d12d5c722225088c49da3fb153993f73163345;hb=a81ff71c918e7a82ccd6646351734ce74e8e4dd3;hp=6a5b53dd5ff0b28449a6650a4fbb3d451d85fc8e;hpb=5556814b7ff65b0a4837390be9331e1841189427;p=freeside.git diff --git a/conf/invoice_latex b/conf/invoice_latex index 6a5b53dd5..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]{ @@ -333,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'};