X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pkg.pm;h=d413596345aa7ffe963ac7cbb7254e7e436e5155;hb=e3dffa23a03cd9f88946ceb78bc75ada29bc013a;hp=9d4ca1c00bf06db472cd28ba5889d083cafc426d;hpb=d0aca10ecd6edb171555eb87b1570daa3d2820b1;p=freeside.git diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 9d4ca1c00..d41359634 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -21,6 +21,7 @@ use FS::reg_code; use FS::part_svc; use FS::cust_pkg_reason; use FS::reason; +use FS::UI::Web; # need to 'use' these instead of 'require' in sub { cancel, suspend, unsuspend, # setup } @@ -1586,7 +1587,7 @@ sub search_sql { if ( $params->{'agentnum'} =~ /^(\d+)$/ and $1 ) { push @where, - "agentnum = $1"; + "cust_main.agentnum = $1"; } ## @@ -1738,12 +1739,12 @@ sub search_sql { qsearchs('access_user', { username => $params->{CurrentUser} }); if ($access_user) { - push @where, $access_user->agentnums_sql; + push @where, $access_user->agentnums_sql('table'=>'cust_main'); }else{ push @where, "1=0"; } }else{ - push @where, $FS::CurrentUser::CurrentUser->agentnums_sql; + push @where, $FS::CurrentUser::CurrentUser->agentnums_sql('table'=>'cust_main'); } my $extra_sql = scalar(@where) ? ' WHERE '. join(' AND ', @where) : '';