summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjeff <jeff>2008-09-02 15:37:07 +0000
committerjeff <jeff>2008-09-02 15:37:07 +0000
commit2e3742946113c9a4e52a4741c020ff5b129050e8 (patch)
tree35abd87d31b28d0586e1eea97e4d8fb92257c112
parent4ad29235ceb48ec0c5a0af07e6ccfcb64b40f466 (diff)
call details in self-service
-rw-r--r--FS/FS/ClientAPI/MyAccount.pm2
-rw-r--r--FS/FS/cust_bill.pm19
-rw-r--r--FS/FS/cust_bill_pkg.pm12
3 files changed, 12 insertions, 21 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 395450b11..cdd854b28 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -577,7 +577,7 @@ sub invoice {
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 } ),
};
}
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index 6b2bcd675..2cf5b99f3 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -2392,12 +2392,17 @@ when emailing the invoice as part of a multipart/related MIME email.
=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 );
}
@@ -2682,9 +2687,7 @@ sub _items_cust_bill_pkg {
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;
diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm
index aa37ac4b5..a1f0f16e1 100644
--- a/FS/FS/cust_bill_pkg.pm
+++ b/FS/FS/cust_bill_pkg.pm
@@ -455,18 +455,6 @@ sub unitrecur {
: $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