projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
agent virtualization, take one (stuff from "inactive" changeset snuck into cust_main...
[freeside.git]
/
httemplate
/
elements
/
tr-select-agent.html
diff --git
a/httemplate/elements/tr-select-agent.html
b/httemplate/elements/tr-select-agent.html
index
2227262
..
83c8d17
100644
(file)
--- a/
httemplate/elements/tr-select-agent.html
+++ b/
httemplate/elements/tr-select-agent.html
@@
-3,9
+3,16
@@
my @agents;
if ( $opt{'agents'} ) {
my @agents;
if ( $opt{'agents'} ) {
- @agents = @{ $opt{'agents'} };
+ #@agents = @{ $opt{'agents'} };
+ #here is the agent virtualization
+ my $agentnums_href = $FS::CurrentUser::CurrentUser->agentnums_href;
+ @agents = grep $agentnums_href->{$_->agentnum}, @{ $opt{'agents'} };
} else {
} else {
- @agents = qsearch( 'agent', { disabled=>'' } );
+ @agents = qsearch( {
+ 'table' => 'agent',
+ 'hashref' => { disabled=>'' },
+ 'extra_sql' => ' AND '. $FS::CurrentUser::CurrentUser->agentnums_sql,
+ });
}
%>
}
%>