X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=conf%2Finvoice_html;h=73dcc2e426988e414a7170e56cbb906e7b053574;hb=947c1f964f1304242f8a6ffabacccf040f1d505e;hp=49c11877c95ef99dc4e2dfc0f4f9c0bd82e84d44;hpb=a95b449203e74068ae4f864f63a6bca1e14ce9cb;p=freeside.git diff --git a/conf/invoice_html b/conf/invoice_html index 49c11877c..73dcc2e42 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -3,6 +3,8 @@ .invoice_header { font-size: 10pt } .invoice_headerright TH { border-top: 2px solid #000000; border-bottom: 2px solid #000000 } .invoice_headerright TD { font-size: 10pt; empty-cells: show } +.invoice_summary TH { border-bottom: 2px solid #000000 } +.invoice_summary TD { font-size: 10pt; empty-cells: show } .invoice_longtable table { cellspacing: none } .invoice_longtable TH { border-top: 2px solid #000000; border-bottom: 1px solid #000000; padding-left: none; padding-right: none; font-size: 10pt } .invoice_desc TD { border-top: 2px solid #000000; font-weight: bold; font-size: 10pt } @@ -15,7 +17,7 @@ - + '; } - $OUT .= '
">"> <%= $returnaddress %> @@ -82,10 +84,10 @@
- + <%= $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 .= - ''. - ''. - ''. - ''. - ( $unitprices - ? ''. - '' - : '' - ). - ''. - ''; - - my $lastref = 0; - foreach my $line ( - grep { ( scalar(@sections) > 1 - ? $section->{'description'} eq $_->{'section'}->{'description'} - : 1 - ) } - @detail_items ) - { $OUT .= - ''. - ''. - ''. + '
RefDescriptionUnit PriceQuantityAmount
'. - ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ''. $line->{'description'}. '
'. + ''. + ''. + ''. ( $unitprices - ? ''. - '' + ? ''. + '' : '' - ). - - ''. - '' - ; - $lastref = $line->{'ref'}; - if ( @{$line->{'ext_description'} } ) { - $OUT .= '' : '>'; - $OUT .= '
RefDescription'. $line->{'unit_amount'}. ''. $line->{'quantity'}. 'Unit PriceQuantity'. $line->{'amount'}. '
'; - foreach my $ext_desc ( @{$line->{'ext_description'} } ) { - $OUT .= - ''. - ''. - '' + ). + ''. + ''; + + my $lastref = 0; + foreach my $line ( + grep { ( scalar(@sections) > 1 + ? $section->{'description'} eq $_->{'section'}->{'description'} + : 1 + ) } + @detail_items ) + { + $OUT .= + ''. + ''. + ''. + ( $unitprices + ? ''. + '' + : '' + ). + + ''. + '' + ; + $lastref = $line->{'ref'}; + if ( @{$line->{'ext_description'} } ) { + $OUT .= '' : '>'; + $OUT .= '
/i ? '' : 'colspan=99' ). '>'. - '  '. $ext_desc. - '
Amount
'. + ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). ''. $line->{'description'}. ''. $line->{'unit_amount'}. ''. $line->{'quantity'}. ''. $line->{'amount'}. '
'; + foreach my $ext_desc ( @{$line->{'ext_description'} } ) { + $OUT .= + ''. + ''. + '' + } + $OUT .= '
/i ? '' : 'colspan=99' ). '>'. + '  '. $ext_desc. + '
'; } - } - 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 %>