From 3a0db21942d7214320419c3ffe39948e26f2f23e Mon Sep 17 00:00:00 2001 From: ivan Date: Sat, 5 Feb 2011 04:05:12 +0000 Subject: [PATCH] fix cpu/memory problem?, RT#11452 --- FS/FS/cust_bill.pm | 5 ++--- FS/FS/cust_bill_pkg.pm | 11 +++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index b8c395a03..91cdcda07 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -4197,9 +4197,8 @@ sub _items_cust_bill_pkg { foreach my $cust_bill_pkg ( @$cust_bill_pkg ) { - #eating cpu and memory? - #$discount_show_always = ($cust_bill_pkg->cust_bill_pkg_discount - # && $conf->exists('discount-show-always')); + $discount_show_always = ($cust_bill_pkg->cust_bill_pkg_discount + && $conf->exists('discount-show-always')); foreach ( $s, $r, ($opt{skip_usage} ? () : $u ) ) { if ( $_ && !$cust_bill_pkg->hidden ) { diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index 5a7c7fe54..791999c17 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -875,6 +875,17 @@ sub cust_bill_pkg_detail { } +=item cust_bill_pkg_discount + +Returns the list of associated cust_bill_pkg_discount objects. + +=cut + +sub cust_bill_pkg_discount { + my $self = shift; + qsearch ( 'cust_bill_pkg_discount', { 'billpkgnum' => $self->billpkgnum } ); +} + =back =head1 BUGS -- 2.11.0