Merge branch 'patch-2' of https://github.com/gjones2/Freeside (fix closing </SELECT...
[freeside.git] / httemplate / search / report_cust_credit_bill_pkg.html
1 <& /elements/header.html, mt('Credit application report') &>
2
3 <FORM ACTION="cust_credit_bill_pkg.html" METHOD="GET">
4 <!--<INPUT TYPE="hidden" NAME="magic" VALUE="_date">-->
5
6 <TABLE BGCOLOR="#cccccc" CELLSPACING=0
7
8 <& /elements/tr-select-user.html,
9               'label'       => emt('Employee: '),
10               'access_user' => \%access_user,
11 &>
12
13 <& /elements/tr-select-agent.html,
14      curr_value    => scalar( $cgi->param('agentnum') ),
15      #label         => emt('Line items for agent: '),
16      disable_empty => 0,
17 &>
18
19 <!--
20 <& /elements/tr-select-cust_main-status.html,
21      label => emt('Customer status'),
22 &>
23 -->
24
25 <!-- customer
26 <& /elements/tr-select-cust_class.html,
27      'label'        => emt('Class'),
28      'multiple'     => 1,
29      'pre_options'  => [ '' => emt('(none)') ],
30      'all_selected' => 1,
31 &>
32 -->
33
34 <!-- some sort of label saying this is the credit date... -->
35 <& /elements/tr-input-beginning_ending.html,
36      'prefix' => 'credit',
37 &>
38
39 <& /elements/tr-input-lessthan_greaterthan.html,
40      label   => emt('Amount'),
41      field   => 'amount',
42 &>
43
44 <!-- customer payment method i guess
45   <& /elements/tr-select-payby.html,
46                 label   => emt('Payment method:'),
47                 payby_type   => 'cust',
48                 multiple     => 1,
49                 all_selected => 1,
50   &>
51 -->
52
53 <!--
54 <TR>
55   <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="nottax" VALUE="Y" onClick="nottax_changed(this)" onChange="nottax_change(thid)"></TD>
56   <TD><% mt('Omit taxes') |h %></TD>
57 </TD>
58
59 <TR>
60   <TD ALIGN="right"><INPUT TYPE="checkbox" NAME="istax" VALUE="Y" onClick="istax_changed(this)" onChange="istax_change(thid)"></TD>
61   <TD><% mt('Taxes only') |h %></TD>
62 </TD>
63
64 <SCRIPT TYPE="text/javascript">
65   function nottax_changed (what) {
66     if (what.checked && what.form.istax.checked) {
67       what.form.istax.checked = false;
68     }
69   }
70   function istax_changed (what) {
71     if (what.checked && what.form.nottax.checked) {
72       what.form.nottax.checked = false;
73     }
74   }
75 </SCRIPT>
76 -->
77
78 </TABLE>
79
80 <BR>
81 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
82
83 </FORM>
84
85 <& /elements/footer.html &>
86 <%init>
87
88 #Financial reports?
89 die "access denied"
90   unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
91
92 #false laziness w/report_cust_credit.html
93 my $sth = dbh->prepare("SELECT DISTINCT usernum FROM cust_credit")
94   or die dbh->errstr;
95 $sth->execute or die $sth->errstr;
96 my @usernum = map $_->[0], @{$sth->fetchall_arrayref};
97 my %access_user =
98   map { $_ => qsearchs('access_user',{'usernum'=>$_})->username }
99       @usernum;
100
101 my $conf = new FS::Conf;
102
103 </%init>
104