diff options
author | ivan <ivan> | 2009-02-08 02:05:48 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-02-08 02:05:48 +0000 |
commit | 24533a22a23e211888fcc36a5177c0def5c77de3 (patch) | |
tree | 09887e29cf74dc4e50ab03e23514acc0d69e59b2 /httemplate/elements/select-cust-part_pkg.html | |
parent | 8b72ad2a4d67f46e4bda36179e992d82d069689f (diff) |
further work on agents editing own packages: allow them to see (but not edit) global packages for their type, RT#1331
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> |