better UI for package report classes, #13057
[freeside.git] / httemplate / search / cust_tax_exempt_pkg.cgi
index 990e344..7f0563c 100644 (file)
@@ -1,4 +1,4 @@
-<% include( 'elements/search.html',
+<& elements/search.html,
                  'title'       => 'Tax exemptions',
                  'name'        => 'tax exemptions',
                  'query'       => $query,
                    $ilink,
                    $ilink,
 
-                   ( map { $clink } FS::UI::Web::cust_header() ),
+                   ( map { $_ ne 'Cust. Status' ? $clink : '' }
+                         FS::UI::Web::cust_header()
+                   ),
                  ],
-                 'align' => 'rrrlrc', # 'rlrrrc',
-           )
-%>
+                 'align' => 'rrrlrc'.FS::UI::Web::cust_aligns(), # 'rlrrrc',
+                 'color' => [ 
+                              '',
+                              '',
+                              '',
+                              '',
+                              '',
+                              '',
+                              FS::UI::Web::cust_colors(),
+                            ],
+                 'style' => [ 
+                              '',
+                              '',
+                              '',
+                              '',
+                              '',
+                              '',
+                              FS::UI::Web::cust_styles(),
+                            ],
+&>
 <%once>
 
 my $join_cust = "
@@ -80,6 +99,9 @@ my $join = "
 </%once>
 <%init>
 
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('View customer tax exemptions');
+
 my @where = ();
 
 my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi);
@@ -90,7 +112,7 @@ if ( $beginning || $ending ) {
 }
 
 if ( $cgi->param('agentnum') =~ /^(\d+)$/ ) {
-  push @where, "agentnum = $1";
+  push @where, "cust_main.agentnum = $1";
 }
 
 if ( $cgi->param('custnum') =~ /^(\d+)$/ ) {