diff options
Diffstat (limited to 'httemplate/browse')
-rw-r--r-- | httemplate/browse/part_event.html | 3 | ||||
-rwxr-xr-x | httemplate/browse/part_pkg.cgi | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/httemplate/browse/part_event.html b/httemplate/browse/part_event.html index 674004bc7..3d7c245ac 100644 --- a/httemplate/browse/part_event.html +++ b/httemplate/browse/part_event.html @@ -158,7 +158,8 @@ $html_init .= '</SELECT><INPUT TYPE="submit" VALUE="Clone existing event">'. my $count_query = 'SELECT COUNT(*) FROM part_event WHERE '. $FS::CurrentUser::CurrentUser->agentnums_sql( - 'null_right' => 'Edit global billing events', + 'null_right' => 'Edit global billing events', + 'viewall_right' => 'None', ); my $join_conditions = FS::part_event_condition->join_conditions_sql; diff --git a/httemplate/browse/part_pkg.cgi b/httemplate/browse/part_pkg.cgi index e226ce13e..42eb5dfcb 100755 --- a/httemplate/browse/part_pkg.cgi +++ b/httemplate/browse/part_pkg.cgi @@ -84,11 +84,11 @@ my $extra_sql = scalar(@where) join( 'AND ', @where) : ''; -my $agentnums = join(',', $curuser->agentnums); +my $agentnums_sql = $curuser->agentnums_sql( 'table'=>'cust_main' ); my $count_cust_pkg = " SELECT COUNT(*) FROM cust_pkg LEFT JOIN cust_main USING ( custnum ) WHERE cust_pkg.pkgpart = part_pkg.pkgpart - AND cust_main.agentnum IN ($agentnums) + AND $agentnums_sql "; $select = " |