diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-03-11 18:42:13 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-03-11 18:42:13 -0800 |
commit | a80456f3f7f775cc50d343a7bcaef69e83f96c42 (patch) | |
tree | f2c8948744e7f68edb49a52c8b7581a6339c6fcb /FS/FS/cust_main | |
parent | ae817d8bbd220b645f41cb2d020ba8b6b739765b (diff) |
fix customer package browse selection, RT#39822
Diffstat (limited to 'FS/FS/cust_main')
-rw-r--r-- | FS/FS/cust_main/Packages.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/FS/FS/cust_main/Packages.pm b/FS/FS/cust_main/Packages.pm index 1c921d6..13c2945 100644 --- a/FS/FS/cust_main/Packages.pm +++ b/FS/FS/cust_main/Packages.pm @@ -434,7 +434,7 @@ sub all_pkgs { my $self = shift; my $extra_qsearch = ref($_[0]) ? shift : { @_ }; - return $self->num_pkgs unless wantarray || keys %$extra_qsearch; + return $self->num_pkgs($extra_qsearch) unless wantarray; my @cust_pkg = (); if ( $self->{'_pkgnum'} && ! keys %$extra_qsearch ) { @@ -464,11 +464,11 @@ Returns all non-cancelled packages (see L<FS::cust_pkg>) for this customer. sub ncancelled_pkgs { my $self = shift; - my $extra_qsearch = ref($_[0]) ? shift : {}; + my $extra_qsearch = ref($_[0]) ? shift : { @_ }; local($DEBUG) = $FS::cust_main::DEBUG if $FS::cust_main::DEBUG > $DEBUG; - return $self->num_ncancelled_pkgs unless wantarray; + return $self->num_ncancelled_pkgs($extra_qsearch) unless wantarray; my @cust_pkg = (); if ( $self->{'_pkgnum'} ) { |