summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2009-11-06 00:25:13 +0000
committerivan <ivan>2009-11-06 00:25:13 +0000
commit1c2b820bd8d41fb9620e81faf617adffe85dbd33 (patch)
tree4b1e2612b0dbe143948fd748e0c125bedf64520d /httemplate
parent3adac920d07b868093e64d5911d8aeffda82ed13 (diff)
add "payment expiration before" to customer report, RT#6447
Diffstat (limited to 'httemplate')
-rwxr-xr-xhttemplate/search/cust_main.html2
-rwxr-xr-xhttemplate/search/report_cust_main.html37
2 files changed, 35 insertions, 4 deletions
diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html
index 186467e00..d6586e84e 100755
--- a/httemplate/search/cust_main.html
+++ b/httemplate/search/cust_main.html
@@ -45,7 +45,7 @@ my %search_hash = ();
#scalars
my @scalars = qw (
agentnum status cancelled_pkgs cust_fields flattened_pkgs custbatch
- no_censustract
+ no_censustract paydate_year paydate_month
);
for my $param ( @scalars ) {
diff --git a/httemplate/search/report_cust_main.html b/httemplate/search/report_cust_main.html
index 92df58cfb..4369a682d 100755
--- a/httemplate/search/report_cust_main.html
+++ b/httemplate/search/report_cust_main.html
@@ -46,11 +46,42 @@
% }
<% include( '/elements/tr-select-payby.html',
- 'payby_type' => 'cust',
- 'multiple' => 1,
- 'curr_value' => { map { $_ => 1 } FS::payby->cust_payby },
+ 'payby_type' => 'cust',
+ 'multiple' => 1,
+ 'all_selected' => 1,
)
%>
+
+ <TR>
+ <TD ALIGN="right">Payment expiration before</TD>
+ <TD>
+ <SELECT NAME="paydate_month" DISABLED>
+% foreach my $month ( 1 .. 12 ) {
+ <OPTION VALUE="<% $month %>"><% $month %></OPTION>
+% }
+ </SELECT>
+ /
+ <SELECT NAME="paydate_year" onChange="paydate_year_changed(this);">
+ <OPTION VALUE=""></OPTION>
+% my $lastyear = (localtime(time))[5] + 1899;
+% foreach my $year ( $lastyear .. $lastyear+12 ) {
+ <OPTION VALUE="<% $year %>"><% $year %></OPTION>
+% }
+ </SELECT>
+ </TD>
+ </TR>
+
+ <SCRIPT TYPE="text/javascript">
+ function paydate_year_changed(what) {
+ var value = what.options[what.selectedIndex].value;
+ var month_select = what.form.paydate_month;
+ if ( value == '' ) {
+ month_select.disabled = true;
+ } else {
+ month_select.disabled = false;
+ }
+ }
+ </SCRIPT>
<% include( '/elements/tr-input-lessthan_greaterthan.html',
label => 'Current balance',