combine ticket notification scrips, #15353
[freeside.git] / httemplate / search / report_receivables.html
1 <& /elements/header.html, mt('Accounts Receivable Aging Summary') &>
2
3 <FORM NAME="OneTrueForm" ACTION="report_receivables.cgi" METHOD="GET">
4
5 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
6
7   <TR>
8     <TH CLASS="background" COLSPAN=2 ALIGN="left">
9       <FONT SIZE="+1"><% mt('Search options') |h %></FONT>
10     </TH>
11   </TR>
12
13   <& /elements/tr-select-agent.html, 'disable_empty'=>0  &>
14
15   <& /elements/tr-select-cust_main-status.html,
16                 'label' => emt('Customer Status'),
17   &>
18   
19   <TR>
20     <TD ALIGN="right"><% mt('Customers') |h %></TD>
21     <TD>
22       <SCRIPT TYPE="text/javascript">
23 function toggle(obj) {
24   var f = document.OneTrueForm;
25   var val = (obj.value == obj.checked);
26   f.days.disabled = val;
27   f.negative.disabled = val;
28   f.days.style.backgroundColor = val ? '#dddddd' : '#ffffff';
29 }
30       </SCRIPT>
31       <TABLE STYLE="padding: 0px">
32         <TR>
33             <TD><INPUT TYPE="radio" NAME="all_customers" VALUE="1" onClick="toggle(this)"></TD>
34             <TD><% mt('All customers (even those without an outstanding balance)') |h %></TD>
35         </TR>
36         <TR>
37             <TD><INPUT TYPE="radio" NAME="all_customers" VALUE="0" CHECKED onClick="toggle(this)"></TD>
38             <TD>
39 %       my $daysinput = qq!<INPUT NAME="days" TYPE="text" SIZE=4 MAXLENGTH=3 VALUE="0">!;
40 %       my $str = emt("Customers with a balance over [_1] days old",'XXXDAYSXXX'); # yeah it's a hack
41 %       $str =~ s/XXXDAYSXXX/$daysinput/;
42             <% $str %>
43             </TD>
44         </TR>
45         <TR>
46             <TD></TD>
47             <TD><INPUT TYPE="checkbox" NAME="negative" VALUE="1">&nbsp;<% mt('Including customers with credit balances') |h %></TD>
48         </TR>
49       </TABLE>
50     </TD>
51   </TR>
52   <& /elements/tr-input-date-field.html, {
53                 'name'      => 'as_of',
54                 'value'     => time,
55                 'label'     => emt('As of date '),
56                 'format'    => FS::Conf->new->config('date_format') || '%m/%d/%Y',
57                 } 
58   &>
59
60 </TABLE>
61
62 <BR><INPUT TYPE="submit" VALUE="Get Report">
63 </FORM>
64
65 <& /elements/footer.html &>
66
67 <%init>
68
69 die "access denied"
70   unless $FS::CurrentUser::CurrentUser->access_right('Receivables report')
71       or $FS::CurrentUser::CurrentUser->access_right('Financial reports');
72
73 </%init>