Merge remote-tracking branch 'upstream/master'
[freeside.git] / httemplate / search / report_sales_commission.html
1 <% include('/elements/header.html', 'Sales person commission report' ) %>
2
3 <FORM ACTION="sales_commission.html">
4
5 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
6
7 % if ( $curuser->report_salesnum ) {
8
9     <INPUT TYPE="hidden" NAME="agentnum" VALUE="<% $curuser->report_sales->agentnum %>">
10     <INPUT TYPE="hidden" NAME="salesnum" VALUE="<% $curuser->report_salesnum %>">
11
12 % } else {
13
14     <& /elements/tr-select-agent.html,
15          'onchange'      => 'agent_changed(this)',
16     &>
17
18     <SCRIPT TYPE="text/javascript">
19
20       function agent_changed(what) {
21         salesnum_agentnum_changed(what);
22       }
23
24       <&| /elements/onload.js &>
25       agent_changed(document.getElementById('agentnum'))
26       </&>
27
28     </SCRIPT>
29
30     <& /elements/tr-select-sales.html,
31         'empty_label' => 'all',
32     &>
33
34 % }
35
36 <& /elements/tr-checkbox.html,
37     'label' => 'Customer sales person if there is no package sales person',
38     'field' => 'cust_main_sales',
39     'value' => 'Y',
40 &>
41
42 <& /elements/tr-checkbox.html,
43     'label' => 'Show paid sales only',
44     'field' => 'paid',
45     'value' => 'Y',
46 &> 
47
48 <& /elements/tr-input-beginning_ending.html &>
49
50 </TABLE>
51
52 <BR>
53 <INPUT TYPE="submit" VALUE="Get Report">
54
55 <% include('/elements/footer.html') %>
56 <%init>
57
58 my $curuser = $FS::CurrentUser::CurrentUser;
59
60 die "access denied" unless $curuser->access_right('Financial reports');
61
62 </%init>