summaryrefslogtreecommitdiff
path: root/httemplate/search
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2019-03-25 16:45:40 -0400
committerChristopher Burger <burgerc@freeside.biz>2019-03-26 08:30:18 -0400
commit3191fc8327eda7011e39e1fd623d8ec211f8f2e4 (patch)
tree2cd8c195640c5c36c158be46cb9d88059774965b /httemplate/search
parent3260fe603047def12ce08605b0b827b950831f79 (diff)
RT# 82959 - added agent virtualization to unprovisioned services report.
Diffstat (limited to 'httemplate/search')
-rw-r--r--httemplate/search/unprovisioned_services.html5
1 files changed, 4 insertions, 1 deletions
diff --git a/httemplate/search/unprovisioned_services.html b/httemplate/search/unprovisioned_services.html
index a7791ba86..0ef1ff633 100644
--- a/httemplate/search/unprovisioned_services.html
+++ b/httemplate/search/unprovisioned_services.html
@@ -69,10 +69,13 @@ foreach my $svcpart ( @svcpart ) {
$svcpart_limit = " and pkg_svc.svcpart in (". join(',',@svcpart) . ")"
if scalar(@svcpart);
+## here is the agent virtualization
+my $agentnums_sql = $FS::CurrentUser::CurrentUser->agentnums_sql;
+
my $search = " where cust_pkg.cancel is null and pkg_svc.quantity > 0 and "
. " pkg_svc.quantity > (select count(1) from cust_svc where "
. " cust_svc.pkgnum = cust_pkg.pkgnum and "
- . " cust_svc.svcpart = pkg_svc.svcpart) $svcpart_limit";
+ . " cust_svc.svcpart = pkg_svc.svcpart) $svcpart_limit and $agentnums_sql";
my $addl_from = " join pkg_svc using (pkgpart) ".
FS::UI::Web::join_cust_main('cust_pkg', 'cust_pkg');