summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Report/Table.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/FS/FS/Report/Table.pm b/FS/FS/Report/Table.pm
index b0e911f84..e1aec0592 100644
--- a/FS/FS/Report/Table.pm
+++ b/FS/FS/Report/Table.pm
@@ -416,6 +416,8 @@ sub cust_bill_pkg_setup {
$self->in_time_period_and_agent($speriod, $eperiod, $agentnum),
);
+ push @where, 'cust_main.refnum = '. $opt{'refnum'} if $opt{'refnum'};
+
my $total_sql = "SELECT COALESCE(SUM(cust_bill_pkg.setup),0)
FROM cust_bill_pkg
$cust_bill_pkg_join
@@ -436,6 +438,8 @@ sub cust_bill_pkg_recur {
$self->with_classnum($opt{'classnum'}, $opt{'use_override'}),
);
+ push @where, 'cust_main.refnum = '. $opt{'refnum'} if $opt{'refnum'};
+
# subtract all usage from the line item regardless of date
my $item_usage;
if ( $opt{'project'} ) {
@@ -489,6 +493,8 @@ sub cust_bill_pkg_detail {
my @where = ( "cust_bill_pkg.pkgnum != 0" );
+ push @where, 'cust_main.refnum = '. $opt{'refnum'} if $opt{'refnum'};
+
$agentnum ||= $opt{'agentnum'};
push @where,