summaryrefslogtreecommitdiff
path: root/httemplate/search/agent_inventory.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/search/agent_inventory.html')
-rw-r--r--httemplate/search/agent_inventory.html40
1 files changed, 0 insertions, 40 deletions
diff --git a/httemplate/search/agent_inventory.html b/httemplate/search/agent_inventory.html
deleted file mode 100644
index ac65371..0000000
--- a/httemplate/search/agent_inventory.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<% include('elements/search.html',
- 'title' => 'Inventory summary per agent',
- 'name_singular' => 'agent',
- 'query' => { 'table' => 'agent',
- 'hashref' => { 'disabled' => '' },
- 'extra_sql' => "AND $agentnums_sql",
- },
- 'count_query' => "SELECT COUNT(*) FROM agent".
- " WHERE disabled = '' OR disabled IS NULL".
- " AND $agentnums_sql",
- 'header' => \@header,
- 'fields' => \@fields,
- )
-%>
-<%init>
-
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
-#XXX List inventory
-
-my $agentnums_sql = $FS::CurrentUser::CurrentUser->agentnums_sql;
-
-my @header = ('Agent');
-my @fields = ('agent');
-
- #{ 'disabled' => '' }
-foreach my $inventory_class ( qsearch('inventory_class', {}) ) {
- push @header, $inventory_class->classname;
- push @fields, sub {
- my $agent = shift;
- my $sub = FS::inventory_class->countcell_factory(
- 'p' => $p, 'agentnum' => $agent->agentnum,
- );
- &{$sub}($inventory_class);
- };
-}
-
-#XXX show global inventory too
-
-</%init>