diff options
author | ivan <ivan> | 2010-05-21 23:35:47 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-05-21 23:35:47 +0000 |
commit | 42ed7ef03700fb17467bfeedead3639da9efc4a4 (patch) | |
tree | ac9ac209fee11c0a0fd4b122b8554e4d58c15037 /httemplate/search/inventory_item.html | |
parent | 4eae5a24723dd6cbac93bb646284a4fdf1553e73 (diff) |
reporting on agent inventory, RT#7010
Diffstat (limited to 'httemplate/search/inventory_item.html')
-rw-r--r-- | httemplate/search/inventory_item.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/httemplate/search/inventory_item.html b/httemplate/search/inventory_item.html index 681e5db..37914e0 100644 --- a/httemplate/search/inventory_item.html +++ b/httemplate/search/inventory_item.html @@ -103,6 +103,12 @@ my $inventory_class = qsearchs( { my $title = $inventory_class->classname. ' Inventory'; +if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) { + $extra_sql .= " AND inventory_item.agentnum = $1 "; + my $agent = qsearchs('agent', { 'agentnum' => $1 }) or die "unknown agentnum"; + $title = $agent->agent. " $title"; +} + #little false laziness with SQL fragments in inventory_class.pm if ( $cgi->param('avail') ) { $extra_sql .= ' AND ( svcnum IS NULL OR svcnum = 0 )'; |