+
-
+ <%= $summary %>
<%=
- foreach my $section ( @sections ) {
- if ($section->{'pretotal'}) {
+ foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) {
+ if ($section->{'pretotal'} && !$summary) {
$OUT .=
''.
' '.
@@ -95,91 +97,92 @@
''.
' | ';
}
- $OUT .= '';
- if ($section->{'description'}) {
- $OUT .=
- ' '. uc(substr($section->{'description'},0,1)).
- ''. uc(substr($section->{'description'},1)).
- ''.
- ' ';
- }else{
- $OUT .=
- ' CHARGES'.
- ' ';
- }
- $OUT .= ' | ';
+ unless ($section->{'summarized'}) {
+ $OUT .= '';
+ if ($section->{'description'}) {
+ $OUT .=
+ ' '. uc(substr($section->{'description'},0,1)).
+ ''. uc(substr($section->{'description'},1)).
+ ''.
+ ' ';
+ }else{
+ $OUT .=
+ ' CHARGES'.
+ ' ';
+ }
+ $OUT .= ' | ';
- $OUT .=
- ''.
- ''.
- 'Ref | '.
- 'Description | '.
- ( $unitprices
- ? 'Unit Price | '.
- 'Quantity | '
- : ''
- ).
- 'Amount | '.
- ' ';
-
- my $lastref = 0;
- foreach my $line (
- grep { ( scalar(@sections) > 1
- ? $section->{'description'} eq $_->{'section'}->{'description'}
- : 1
- ) }
- @detail_items )
- {
$OUT .=
- ''.
- ''.
- ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ' | '.
- ''. $line->{'description'}. ' | '.
+ ''.
+ ''.
+ 'Ref | '.
+ 'Description | '.
( $unitprices
- ? ''. $line->{'unit_amount'}. ' | '.
- ''. $line->{'quantity'}. ' | '
+ ? 'Unit Price | '.
+ 'Quantity | '
: ''
- ).
-
- ''. $line->{'amount'}. ' | '.
- ' '
- ;
- $lastref = $line->{'ref'};
- if ( @{$line->{'ext_description'} } ) {
- $OUT .= ' | ' : '>';
- $OUT .= '';
- foreach my $ext_desc ( @{$line->{'ext_description'} } ) {
- $OUT .=
- ''.
- '/i ? '' : 'colspan=99' ). '>'.
- ' '. $ext_desc.
- ' | '.
- ' '
+ ).
+ 'Amount | '.
+ '';
+
+ my $lastref = 0;
+ foreach my $line (
+ grep { ( scalar(@sections) > 1
+ ? $section->{'description'} eq $_->{'section'}->{'description'}
+ : 1
+ ) }
+ @detail_items )
+ {
+ $OUT .=
+ ''.
+ ''.
+ ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ' | '.
+ ''. $line->{'description'}. ' | '.
+ ( $unitprices
+ ? ''. $line->{'unit_amount'}. ' | '.
+ ''. $line->{'quantity'}. ' | '
+ : ''
+ ).
+
+ ''. $line->{'amount'}. ' | '.
+ ' '
+ ;
+ $lastref = $line->{'ref'};
+ if ( @{$line->{'ext_description'} } ) {
+ $OUT .= ' | ' : '>';
+ $OUT .= '';
+ foreach my $ext_desc ( @{$line->{'ext_description'} } ) {
+ $OUT .=
+ ''.
+ '/i ? '' : 'colspan=99' ). '>'.
+ ' '. $ext_desc.
+ ' | '.
+ ' '
+ }
+ $OUT .= ' | | ';
}
- $OUT .= ' | | ';
}
- }
- if (scalar(@sections) > 1) {
- my $style = 'border-top: 3px solid #000000;'.
- 'border-bottom: 3px solid #000000;';
- $OUT .=
- ''.
- qq( | ).
- qq(' : '>' ).
- $section->{'description'}. ' Total | '.
- qq().
- $section->{'subtotal'}. ' | '.
- ' '
- ;
- }
-
+ if (scalar(@sections) > 1) {
+ my $style = 'border-top: 3px solid #000000;'.
+ 'border-bottom: 3px solid #000000;';
+ $OUT .=
+ ''.
+ qq( | ).
+ qq(' : '>' ).
+ $section->{'description'}. ' Total | '.
+ qq().
+ $section->{'subtotal'}. ' | '.
+ ' '
+ ;
+ }
+ }
if ($section->{'posttotal'}) {
$OUT .= '';
$OUT .=
@@ -218,7 +221,7 @@
|
-<%= $notes %>
+<%= length($summary) ? '' : $notes %>
<%= $footer %>
|
|