multiple payment options, RT#23741
[freeside.git] / httemplate / search / report_cust_payby.html
diff --git a/httemplate/search/report_cust_payby.html b/httemplate/search/report_cust_payby.html
new file mode 100644 (file)
index 0000000..81a8270
--- /dev/null
@@ -0,0 +1,57 @@
+<& /elements/header.html, mt('Customer stored payment infomation report') &>
+
+<FORM ACTION="cust_payby.html" METHOD="GET">
+
+  <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
+
+    <& /elements/tr-select-payby.html,
+                  'payby_type'   => 'cust',
+                  'multiple'     => 1,
+                  'all_selected' => 1,
+    &>
+
+    <TR>
+      <TD ALIGN="right"><% mt('Payment expiration before') |h %></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>
+
+ </TABLE>
+
+<BR>
+<INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
+
+</FORM>
+
+<& /elements/footer.html &>
+<%init>
+
+die "access denied"
+  unless $FS::CurrentUser::CurrentUser->access_right('Advanced customer search');
+
+</%init>