projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
reporting on agent inventory, RT#7010
[freeside.git]
/
httemplate
/
search
/
inventory_item.html
diff --git
a/httemplate/search/inventory_item.html
b/httemplate/search/inventory_item.html
index
80810ca
..
37914e0
100644
(file)
--- 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',
'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),
],
'name' => PL($inventory_class->classname),
@@
-100,6
+103,12
@@
my $inventory_class = qsearchs( {
my $title = $inventory_class->classname. ' Inventory';
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 )';
#little false laziness with SQL fragments in inventory_class.pm
if ( $cgi->param('avail') ) {
$extra_sql .= ' AND ( svcnum IS NULL OR svcnum = 0 )';