summaryrefslogtreecommitdiff
path: root/httemplate/search/inventory_item.html
diff options
context:
space:
mode:
authorivan <ivan>2006-03-08 10:05:01 +0000
committerivan <ivan>2006-03-08 10:05:01 +0000
commit600a0939e7e7e589dae4f4f5bfef3650728940b7 (patch)
tree4e96278b41fc621fa15d03cf2e48a5a3b5a8b72d /httemplate/search/inventory_item.html
parent5809a99d862a6bd0da6742479f18728aae8216a2 (diff)
Add a new table for inventory with for DIDs/serials/etc., and an additional
new table for inventory category (i.e. to distinguish DIDs, serials, MACs, etc.)
Diffstat (limited to 'httemplate/search/inventory_item.html')
-rw-r--r--httemplate/search/inventory_item.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/httemplate/search/inventory_item.html b/httemplate/search/inventory_item.html
new file mode 100644
index 000000000..ff7f1fadf
--- /dev/null
+++ b/httemplate/search/inventory_item.html
@@ -0,0 +1,35 @@
+<%
+
+my $classnum = $cgi->param('classnum');
+$classnum =~ /^(\d+)$/ or eidiot "illegal agentnum $agentnum";
+$classnum = $1;
+my $inventory_class = qsearchs('inventory_class', { 'classnum' => $classnum } );
+
+my $count_query =
+ "SELECT COUNT(*) FROM inventory_class WHERE classnum = $classnum";
+
+%><%= include( 'elements/search.html',
+ 'title' => $inventory_class->classname. ' Inventory',
+
+ #less lame to use Lingua:: something to pluralize
+ 'name' => $inventory_class->classname. 's',
+
+ 'query' => {
+ 'table' => 'inventory_item',
+ 'hashref' => { 'classnum' => $classnum },
+ },
+
+ 'count_query' => $count_query,
+
+ # XXX proper full service/customer link ala svc_acct
+ 'header' => [ '#', $inventory_class->classname, 'svcnum' ],
+
+ 'fields' => [
+ 'itemnum',
+ 'item',
+ 'svcnum', #XXX proper full service customer link ala svc_acct
+ # "unallocated" ? "available" ?
+ ],
+
+ )
+%>