X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Finventory_item.html;h=37914e0a7488a58720cd34d8211489ccb8183755;hb=42ed7ef03700fb17467bfeedead3639da9efc4a4;hp=80810caf9bb01100d2404ac53c4c34d118a4582b;hpb=f1cd7f98b487e74aa60b6c41d3377cc60f7ac25a;p=freeside.git diff --git a/httemplate/search/inventory_item.html b/httemplate/search/inventory_item.html index 80810caf9..37914e0a7 100644 --- a/httemplate/search/inventory_item.html +++ b/httemplate/search/inventory_item.html @@ -3,6 +3,9 @@ 'menubar' => [ 'View inventory classes' => $p.'browse/inventory_class.html', + 'Upload '. PL($inventory_class->classname)=> + $p.'misc/inventory_item-import.html?'. + "classnum=$classnum" ], 'name' => PL($inventory_class->classname), @@ -100,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 )';