Fix (hopefully) all uses of /elements/tr-select-agent.html where agentnum may be...
[freeside.git] / httemplate / search / report_cust_pay_batch.html
index 0dc4bc1..4e8937c 100644 (file)
@@ -16,7 +16,7 @@
   </TR>
 
   <% include( '/elements/tr-select-agent.html',
-                 $cgi->param('agentnum'),
+                 ($cgi->param('agentnum') || ''),
                  'label' => 'for agent: ',
              )
   %>
@@ -35,3 +35,9 @@
 </FORM>
 
 <% include('/elements/footer.html') %>
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
+
+</%init>