return { 'error' => '',
'invnum' => $invnum,
'invoice_text' => join('', $cust_bill->print_text ),
- 'invoice_html' => $cust_bill->print_html,
+ 'invoice_html' => $cust_bill->print_html( { unsquelch_cdr => 1 } ),
};
}
=cut
sub print_html {
- my( $self, $today, $template, $cid ) = @_;
+ my $self = shift;
+ my %params;
+ if ( ref $_[0] ) {
+ %params = %{ shift() };
+ }else{
+ $params{'time'} = shift;
+ $params{'template'} = shift;
+ $params{'cid'} = shift;
+ }
- my %params = ( 'format' => 'html' );
- $params{'time'} = $today if $today;
- $params{'template'} = $template if $template;
- $params{'cid'} = $cid if $cid;
+ $params{'format'} = 'html';
$self->print_generic( %params );
}
my @b = ();
my $last_pkgnum = '';
- foreach my $cust_bill_pkg ( grep { $unsquelched ? 1 : ! $_->separate_cdr }
- @$cust_bill_pkg
- )
+ foreach my $cust_bill_pkg ( @$cust_bill_pkg )
{
my $cust_pkg = $cust_bill_pkg->cust_pkg;
: $self->getfield('unitrecur');
}
-=item separate_cdr
-
-Returns true if this line item represents a cdr line item in its own section.
-
-=cut
-
-# lame, but works for now
-sub separate_cdr {
- my( $self ) = shift;
- $self->pkgnum && $self->section ne $self->part_pkg->categoryname;
-}
-
=item usage CLASSNUM
Returns the amount of the charge associated with usage class CLASSNUM if