X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FClientAPI%2FMasonComponent.pm;h=20b4e5bdbe1adadc9f4f307ccaf482500ce1ad0f;hb=d7eafc9c9aae2bf47ea19a56cc5bb1380c5874e4;hp=88baf0764264e9ec59c629f4ab42b60f07827c69;hpb=beb9681db0ee4c0912c82849267a82dd434784b3;p=freeside.git diff --git a/FS/FS/ClientAPI/MasonComponent.pm b/FS/FS/ClientAPI/MasonComponent.pm index 88baf0764..20b4e5bdb 100644 --- a/FS/FS/ClientAPI/MasonComponent.pm +++ b/FS/FS/ClientAPI/MasonComponent.pm @@ -59,6 +59,19 @@ my %session_callbacks = ( } qsearch( 'part_pkg', { 'disabled' => '' }, '', 'ORDER BY pkg' ); # case? + my $conf = new FS::Conf; + if ( $conf->exists('pkg-addon_classnum') ) { + + my %classnum = map { ( $_->addon_classnum => 1 ) } + grep { $_->freq !~ /^0/ } + map { $_->part_pkg } + $cust_main->ncancelled_pkgs; + + unless ( $classnum{''} || ! keys %classnum ) { + @part_pkg = grep $classnum{ $_->classnum }, @part_pkg; + } + } + my %args = @$argsref; $args{part_pkg} = \@part_pkg; @$argsref = ( %args ); @@ -96,6 +109,7 @@ sub mason_comp { my $conf = new FS::Conf; $FS::Mason::Request::FSURL = $conf->config('selfservice_server-base_url'); + $FS::Mason::Request::FSURL .= '/' unless $FS::Mason::Request::FSURL =~ /\/$/; $FS::Mason::Request::QUERY_STRING = $packet->{'query_string'} || ''; $outbuf = '';