diff options
Diffstat (limited to 'httemplate/browse')
-rw-r--r-- | httemplate/browse/access_group.html | 4 | ||||
-rwxr-xr-x | httemplate/browse/part_pkg.cgi | 23 |
2 files changed, 8 insertions, 19 deletions
diff --git a/httemplate/browse/access_group.html b/httemplate/browse/access_group.html index cecf3d6e2..aa9097f36 100644 --- a/httemplate/browse/access_group.html +++ b/httemplate/browse/access_group.html @@ -81,9 +81,7 @@ my $rights_sub = sub { '<TR><TH BGCOLOR="#dcdcdc">'. $_. '</TH></TR>'. '<TR><TD>'. - join('<BR>', grep { warn "$access_group->access_right($_): ". - $access_group->access_right($_). "\n"; - $access_group->access_right($_); } + join('<BR>', grep { $access_group->access_right($_); } map { ref($_) ? $_->{'rightname'} : $_; } @{ $rights{$_} } ). diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index cdaa2c92a..1fed614a2 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -46,25 +46,11 @@ if ( $cgi->param('active') ) { my $extra_sql = ''; -#false laziness w/elements/select-part_pkg.html -my $agentnums = join(',', $curuser->agentnums); - unless ( $acl_edit_global ) { - $extra_sql .= " - WHERE ( - agentnum IS NOT NULL OR 0 < ( - SELECT COUNT(*) - FROM type_pkgs - LEFT JOIN agent_type USING ( typenum ) - LEFT JOIN agent AS typeagent USING ( typenum ) - WHERE type_pkgs.pkgpart = part_pkg.pkgpart - AND typeagent.agentnum IN ($agentnums) - ) - ) - "; + $extra_sql .= ' WHERE '. FS::part_pkg->curuser_pkgs_sql; } -#eofalse +my $agentnums = join(',', $curuser->agentnums); my $count_cust_pkg = " SELECT COUNT(*) FROM cust_pkg LEFT JOIN cust_main USING ( custnum ) WHERE cust_pkg.pkgpart = part_pkg.pkgpart @@ -97,7 +83,12 @@ my $html_init; One or more service definitions are grouped together into a package definition and given pricing information. Customers purchase packages rather than purchase services directly.<BR><BR> + <FORM METHOD="POST" ACTION="${p}edit/part_pkg.cgi"> <A HREF="${p}edit/part_pkg.cgi"><I>Add a new package definition</I></A> + or + !.include('/elements/select-part_pkg.html', 'element_name' => 'clone' ). qq! + <INPUT TYPE="submit" VALUE="Clone existing package"> + </FORM> <BR><BR> !; #} |