- $OUT .= "\\hline\n";\r
- $OUT .= '\FSdesc{' . $line->{'ref'} . '}{' . $line->{'description'} . '}' .\r
- '{' . $line->{'amount'} . "}${rowbreak}\n";\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
+ $OUT .= "\\hline\n" if (($line->{'ref'} || 0) ne $lastref);\r
+ if ($section->{description_generator}) {\r
+ $OUT .= &{$section->{description_generator}}($line);\r
+ } elsif ($section->{usage_section}) {\r
+ my $minutes = sprintf('%d', $line->{'duration'} / 60);\r
+ my $seconds = $line->{'duration'} % 60;\r
+ $OUT .= '\FSusagedesc\r
+ {' . $line->{'description'} . '}\r
+ {' . $line->{'quantity'} . '}\r
+ {' . $minutes . 'm ' . $seconds . 's' . '}\r
+ {' . $line->{'amount'} . '}';\r
+ } else {\r
+ $OUT .= '\FSdesc'.\r
+ '{}'.\r
+ '{' . $line->{'description'} . '}' ;\r
+ if ( $unitprices and length($line->{'unit_amount'}) ) {\r
+ # then show the unit amount and quantity\r
+ $OUT .= \r
+ '{\\dollar' . $line->{'unit_amount'} . '}'.\r
+ '{' . $line->{'quantity'} . '}';\r
+ } else {\r
+ # leave those columns blank\r
+ $OUT .= '{}{}';\r
+ }\r
+ $OUT .= '{\\dollar' . $line->{'amount'} . "}${rowbreak}\n";\r
+ }\r
+ $lastref = $line->{'ref'} || 0;\r
+\r
+ foreach my $ext_desc (@$ext_description) {\r
+ if ($section->{extended_description_generator}) {\r
+ $OUT .= &{$section->{extended_description_generator}}($ext_desc);\r
+ } else {\r
+ if ( $ext_desc !~ /[^\\]&/ ) {\r
+ $ext_desc = substr($ext_desc, 0, 80) . '...'\r
+ if (length($ext_desc) > 80);\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