credit sources, RT#28917
[freeside.git] / httemplate / search / report_cust_credit_source_bill_pkg.html
1 <& /elements/header.html, mt('Credit package source report') &>
2
3 <FORM ACTION="cust_credit_source_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      'field'        => 'cust_classnum',
29      'multiple'     => 1,
30      'pre_options'  => [ '' => emt('(none)') ],
31      'all_selected' => 1,
32 &>
33 -->
34
35 <!-- some sort of label saying this is the credit date... -->
36 <& /elements/tr-input-beginning_ending.html,
37      'prefix' => 'credit',
38 &>
39
40 <!--
41 <& /elements/tr-input-lessthan_greaterthan.html,
42      label   => emt('Amount'),
43      field   => 'amount',
44 &>
45 -->
46
47 <!-- customer payment method in a 4.x world? huh.  how's that work?
48   <& /elements/tr-select-payby.html,
49                 label   => emt('Payment method:'),
50                 payby_type   => 'cust',
51                 multiple     => 1,
52                 all_selected => 1,
53   &>
54 -->
55
56 </TABLE>
57
58 <BR>
59 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
60
61 </FORM>
62
63 <& /elements/footer.html &>
64 <%init>
65
66 #Financial reports?
67 die "access denied"
68   unless $FS::CurrentUser::CurrentUser->access_right('Financial reports');
69
70 #false laziness w/report_cust_credit.html
71 my $sth = dbh->prepare("SELECT DISTINCT usernum FROM cust_credit")
72   or die dbh->errstr;
73 $sth->execute or die $sth->errstr;
74 my @usernum = map $_->[0], @{$sth->fetchall_arrayref};
75 my %access_user =
76   map { $_ => qsearchs('access_user',{'usernum'=>$_})->username }
77       @usernum;
78
79 my $conf = new FS::Conf;
80
81 </%init>
82