summaryrefslogtreecommitdiff
path: root/httemplate/search/report_477.html
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2012-09-06 11:47:02 -0700
committerMark Wells <mark@freeside.biz>2012-09-06 11:47:02 -0700
commitf8c8b9782ff5400790c2fb6dae017ce01790e56e (patch)
treeed4abe678b2ba0ebe5cc4289a2f76e0019943b40 /httemplate/search/report_477.html
parentb7ce9a95a6fa002d0d537c950f11f8a23d3dfc25 (diff)
separate all 477 reports by state, #18503
Diffstat (limited to 'httemplate/search/report_477.html')
-rwxr-xr-xhttemplate/search/report_477.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/httemplate/search/report_477.html b/httemplate/search/report_477.html
index c9d97c5..f593a94 100755
--- a/httemplate/search/report_477.html
+++ b/httemplate/search/report_477.html
@@ -17,6 +17,18 @@
)
%>
+% # not tr-select-state, we only want to choose from among those that
+% # have customers
+ <& /elements/tr-select-table.html,
+ 'label' => 'State',
+ 'field' => 'state',
+ 'table' => 'cust_location',
+ 'name_col' => 'state',
+ 'value_col' => 'state',
+ 'disable_empty' => 1,
+ 'records' => \@states,
+ &>
+
<% include( '/elements/tr-select-pkg_class.html',
'multiple' => 1,
'empty_label' => '(empty class)',
@@ -252,4 +264,10 @@
die "access denied"
unless $FS::CurrentUser::CurrentUser->access_right('List packages');
+my @states = qsearch({
+ 'table' => 'cust_location',
+ 'select' => 'DISTINCT(state)',
+ 'hashref' => { 'country' => 'US' }, # 477 report isn't relevant elsewhere
+});
+
</%init>