X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_sales_commission.html;h=19af428d8b388d80478edf3ac125f71578a8e0dd;hb=8baa8e46e67f00f297d7e10dad02c131d286f40e;hp=cc17e6bed578077fab4705e95e936436df52a107;hpb=eedfe58ba50912dbfb490aa47930bbc0ab9e3ac9;p=freeside.git
diff --git a/httemplate/search/report_sales_commission.html b/httemplate/search/report_sales_commission.html
index cc17e6bed..19af428d8 100644
--- a/httemplate/search/report_sales_commission.html
+++ b/httemplate/search/report_sales_commission.html
@@ -4,30 +4,47 @@
-<& /elements/tr-select-agent.html,
- 'onchange' => 'agent_changed(this)',
-&>
+% if ( $curuser->report_salesnum ) {
+
+
+
+
+% } else {
+
+ <& /elements/tr-select-agent.html,
+ 'onchange' => 'agent_changed(this)',
+ &>
-
+
-<& /elements/tr-select-sales.html &>
+ <& /elements/tr-select-sales.html,
+ 'empty_label' => 'all',
+ &>
+
+% }
<& /elements/tr-checkbox.html,
- 'label' => 'Customer sales person if there is no package sales person',
- 'field' => 'cust_main_sales',
- 'value' => 'Y',
+ 'label' => 'Customer sales person if there is no package sales person',
+ 'field' => 'cust_main_sales',
+ 'value' => 'Y',
&>
+<& /elements/tr-checkbox.html,
+ 'label' => 'Show paid sales only',
+ 'field' => 'paid',
+ 'value' => 'Y',
+&>
+
<& /elements/tr-input-beginning_ending.html &>
@@ -38,7 +55,8 @@
<% include('/elements/footer.html') %>
<%init>
-die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
+my $curuser = $FS::CurrentUser::CurrentUser;
+
+die "access denied" unless $curuser->access_right('Financial reports');
%init>