<% include('/elements/tr-select-from_to.html' ) %>
-<% include('/elements/tr-select-agent.html', '', 'label' => 'For agent: ' ) %>
+<% include('/elements/tr-select-agent.html',
+ 'label' => 'For agent: ',
+ 'disable_empty' => 0,
+ )
+%>
-<TR>
- <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="12mo" VALUE="1"></TD>
- <TD>Show 12 month totals instead of monthly values</TD>
+<& /elements/tr-select-cust_class.html,
+ 'field' => 'cust_classnum', # to avoid ambiguity in FS::Report::Table
+ 'multiple' => 1
+&>
+
+<% include('/elements/tr-select-part_referral.html',
+ 'label' => 'Advertising source ',
+ 'disable_empty' => 0,
+ 'empty_label' => 'all',
+ )
+%>
+
+<tr>
+ <td />
+ <td>
+ <& /elements/checkbox.html,
+ field => '12mo',
+ value => 1,
+ &>
+ <% emt('Show 12 month totals instead of monthly values') %>
+ </td>
+</tr>
+<tr>
+ <td />
+ <td>
+ <& /elements/checkbox.html,
+ field => 'exclude_discount',
+ value => 1,
+ curr_value => 0,
+ &>
+ <% emt('Exclude discounts from total sales') %>
+ </td>
</TR>
</TABLE>
</FORM>
<% include('/elements/footer.html') %>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
+
+</%init>