summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS/cust_bill.pm5
-rw-r--r--FS/FS/cust_bill_pkg.pm11
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