\newcommand{\FSextdesc}[1]{\r
\multicolumn{1}{l}{\rule{0pt}{1.0ex}} &\r
%% \multicolumn{2}{l}{\small{~-~#1}}\\\r
- ~~~#1\\\r
+#1\\\r
}\r
% ...and total line items.\r
\newcommand{\FStotaldesc}[2]{\r
\hfill\r
\makebox{\r
\begin{minipage}[t]{6.4cm}\r
-\begin{flushright}\r
[@--\r
if ($ship_enable) {\r
$OUT .= '\textbf{Service Address}\\\\';\r
$OUT .= '';\r
}\r
--@]\r
+\begin{flushright}\r
Terms: [@-- $terms --@]\\\r
[@-- $po_line --@]\\\r
\end{flushright}\r
$OUT .= '\hline';\r
$OUT .= '\endlastfoot';\r
\r
+ my $lastref = 0;\r
foreach my $line (\r
grep { ( scalar( @sections ) > 1 \r
? $section->{'description'} eq $_->{'section'}->{'description'}\r
# Don't break-up small packages.\r
my $rowbreak = @$ext_description < 5 ? '*' : '';\r
\r
- $OUT .= "\\hline\n";\r
- $OUT .= '\FSdesc{' . $line->{'ref'} . '}{' . $line->{'description'} . '}' .\r
+ $OUT .= "\\hline\n" if ($line->{'ref'} && $line->{'ref'} ne $lastref);\r
+ $OUT .= '\FSdesc'.\r
+ '{' . ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ) . '}'.\r
+ '{' . $line->{'description'} . '}' .\r
'{' . ( $unitprices ? $line->{'unit_amount'} : '' ) . '}'.\r
'{' . ( $unitprices ? $line->{'quantity'} : '' ) . '}' .\r
'{' . $line->{'amount'} . "}${rowbreak}\n";\r
+ $lastref = $line->{'ref'};\r
\r
foreach my $ext_desc (@$ext_description) {\r
if ( $ext_desc !~ /[^\\]&/ ) {\r
$ext_desc = substr($ext_desc, 0, 80) . '...'\r
if (length($ext_desc) > 80);\r
- $ext_desc = '\small{'. $ext_desc. '}';\r
+ $ext_desc = '\multicolumn{6}{l}{\small{~~~'. $ext_desc. '}}';\r
+ }else{\r
+ $ext_desc = "~~~$ext_desc";\r
}\r
$OUT .= '\FSextdesc{' . $ext_desc . '}' . "${rowbreak}\n";\r
}\r