X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=conf%2Finvoice_html;h=9d6f528426055a52bcdcb0c27853c6a0f973a4d5;hb=0de4928e4afae5542b310eeb1ef0cff4750cb038;hp=dfd87c79b9c645c4a3014f30eefa82ad16c06f04;hpb=4ff12dc7e14232390daca2f14a278cde46a8e573;p=freeside.git diff --git a/conf/invoice_html b/conf/invoice_html index dfd87c79b..9d6f52842 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -51,8 +51,8 @@ - + +
"> <%= $returnaddress %>"> @@ -83,9 +83,11 @@
+ - '. - ( $unitprices - ? ''. - '' - : '' ). - ''; + 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 .= ' + '; + } } - $OUT .= ''; + + $OUT .= ''; my $lastref = 0; foreach my $line ( @@ -197,6 +212,17 @@ if ( $section->{description_generator} ) { $OUT .= ' + + + + + + '; } else { my $class = 'invoice_desc_more'; if ( ($line->{'ref'} || 0) ne $lastref ) { @@ -257,7 +283,7 @@ } $OUT .= ''; } - } + } # if !$section->{summarized} if ($section->{'posttotal'}) { $OUT .= '
+ <%= $payname %>
@@ -176,15 +178,28 @@ $OUT .= $header; $columncount = scalar(my @array = split /<\/th>
' . emt('Description') . '' . emt('Unit Price') . '' . emt('Quantity') . '' . emt('Amount') . '' . $heading . '
' . $line->{'description'} . '' . $line->{'quantity'} . '' . $minutes . 'm ' . $seconds . 's' . '' . $line->{'amount'} . '
'; $OUT .=