summaryrefslogtreecommitdiff
path: root/httemplate/search/inventory_item.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search/inventory_item.html')
-rw-r--r--httemplate/search/inventory_item.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/httemplate/search/inventory_item.html b/httemplate/search/inventory_item.html
index 681e5dbac..37914e0a7 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 )';