diff options
Diffstat (limited to 'httemplate/elements/select-cust-part_pkg.html')
-rw-r--r-- | httemplate/elements/select-cust-part_pkg.html | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/httemplate/elements/select-cust-part_pkg.html b/httemplate/elements/select-cust-part_pkg.html index 57da5cd84..292662921 100644 --- a/httemplate/elements/select-cust-part_pkg.html +++ b/httemplate/elements/select-cust-part_pkg.html @@ -32,8 +32,10 @@ my $cust_main = $opt{'cust_main'} or die "cust_main not specified"; $opt{'extra_sql'} .= - ' AND 0 < ( SELECT COUNT(*) FROM type_pkgs '. - ' WHERE typenum = '. $cust_main->agent->typenum. - ' AND type_pkgs.pkgpart = part_pkg.pkgpart )'; + ' AND ( agentnum IS NOT NULL '. + ' OR 0 < ( SELECT COUNT(*) FROM type_pkgs '. + ' WHERE typenum = '. $cust_main->agent->typenum. + ' AND type_pkgs.pkgpart = part_pkg.pkgpart )'. + ' )'; </%init> |