X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_pkg.cgi;h=a2f79e9b0e487c559ae4ec6451307e5b72582b3f;hb=b4aea58e0d04ff1930397e0f96ecdc50748b748b;hp=11487fa5f236de16da5807a83208d8cda11d1b8d;hpb=3531cb68ad0ee6e02ff451601012cbee42745af8;p=freeside.git diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index 11487fa5f..a2f79e9b0 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -76,12 +76,16 @@ if ( $cgi->param('classnum') =~ /^(\d+)$/ ) { } $cgi->delete('classnum'); +if ( $cgi->param('pkgpartbatch') =~ /^([\w\/\-\:\. ]+)$/ ) { + push @where, "pkgpartbatch = '$1' "; +} + if ( $cgi->param('missing_recur_fee') ) { - push @where, "0 = ( SELECT COUNT(*) FROM part_pkg_option - WHERE optionname = 'recur_fee' - AND part_pkg_option.pkgpart = part_pkg.pkgpart - AND CAST( optionvalue AS NUMERIC ) > 0 - )"; + push @where, "NOT EXISTS ( SELECT 1 FROM part_pkg_option + WHERE optionname = 'recur_fee' + AND part_pkg_option.pkgpart = part_pkg.pkgpart + AND CAST( optionvalue AS NUMERIC ) > 0 + )"; } if ( $cgi->param('family') =~ /^(\d+)$/ ) { @@ -405,7 +409,8 @@ push @fields, sub { #agent type if ( $acl_edit_global ) { #really we just want a count, but this is fine unless someone has tons - my @all_agent_types = map {$_->typenum} qsearch('agent_type',{}); + my @all_agent_types = map {$_->typenum} + qsearch('agent_type', { 'disabled'=>'' }); if ( scalar(@all_agent_types) > 1 ) { push @header, 'Agent types'; my $typelink = $p. 'edit/agent_type.cgi?';