}
#here is the agent virtualization
-push @extra_sql, $FS::CurrentUser::CurrentUser->agentnums_sql;
+push @extra_sql, $FS::CurrentUser::CurrentUser->agentnums_sql(
+ 'null_right' => 'View/link unlinked services'
+ );
my $extra_sql = ' WHERE '. join(' AND ', @extra_sql );
'table' => 'cust_svc',
'addl_from' => $addl_from,
'hashref' => {},
- 'extra_sql' => "$extra_sql $orderby",
+ 'extra_sql' => $extra_sql,
+ 'order_by' => $orderby,
};
my $count_query = "SELECT COUNT(*) FROM cust_svc $addl_from $extra_sql";