X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=conf%2Finvoice_html;h=e1af70703a7bb30f8498060b53e79abaf88cd537;hb=e877b3248acbff4fa9fb5606e878175577c332d3;hp=dfd87c79b9c645c4a3014f30eefa82ad16c06f04;hpb=4ff12dc7e14232390daca2f14a278cde46a8e573;p=freeside.git
diff --git a/conf/invoice_html b/conf/invoice_html
index dfd87c79b..e1af70703 100644
--- a/conf/invoice_html
+++ b/conf/invoice_html
@@ -176,15 +176,28 @@
$OUT .= $header;
$columncount = scalar(my @array = split /<\/th>
' . emt('Description') . ' | '.
- ( $unitprices
- ? '' . emt('Unit Price') . ' | '.
- '' . emt('Quantity') . ' | '
- : '' ).
- '' . emt('Amount') . ' | ';
+ my @headings = ( '', 'Description', 'Amount' );
+ my @aligns = ( 'center', 'left', 'right' );
+ if ( $unitprices ) {
+ splice @headings, 2, 0, 'Unit Price', 'Quantity';
+ splice @aligns, 2, 0, 'right', 'right';
+ }
+ if ( $section->{usage_section} ) {
+ @headings = ( '', 'Description', 'Calls', 'Duration', 'Amount' );
+ @aligns = ( '', 'left', 'right', 'right', 'right' );
+ $columncount = 5;
+ }
+
+ while ( @headings ) {
+ my $heading = shift @headings;
+ $heading = emt($heading) if $heading;
+ my $align = shift @aligns;
+ $OUT .= '
+ ' . $heading . ' | ';
+ }
}
- $OUT .= '';
+
+ $OUT .= '';
my $lastref = 0;
foreach my $line (
@@ -197,6 +210,17 @@
if ( $section->{description_generator} ) {
$OUT .= '
+ |
+ ' . $line->{'description'} . ' |
+ ' . $line->{'quantity'} . ' |
+ ' . $minutes . 'm ' . $seconds . 's' . ' |
+ ' . $line->{'amount'} . ' |
+
';
} else {
my $class = 'invoice_desc_more';
if ( ($line->{'ref'} || 0) ne $lastref ) {
@@ -257,7 +281,7 @@
}
$OUT .= '';
}
- }
+ } # if !$section->{summarized}
if ($section->{'posttotal'}) {
$OUT .= '';
$OUT .=
|