[freeside-commits] freeside/httemplate/edit/cust_main billing.html, 1.14, 1.14.2.1 select-state.html, 1.4, 1.4.2.1

Jeff Finucane,420,, jeff at wavetail.420.am
Fri Apr 6 12:41:59 PDT 2007


Update of /home/cvs/cvsroot/freeside/httemplate/edit/cust_main
In directory wavetail:/tmp/cvs-serv22509/httemplate/edit/cust_main

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	billing.html select-state.html 
Log Message:
ticket 1443 add account type and bank state for echeck processing (backport)

Index: billing.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main/billing.html,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -u -d -r1.14 -r1.14.2.1
--- billing.html	29 Dec 2006 08:34:04 -0000	1.14
+++ billing.html	6 Apr 2007 19:41:57 -0000	1.14.2.1
@@ -10,7 +10,7 @@
 
     <INPUT TYPE="hidden" NAME="payinfo" VALUE="<% $cust_main->paymask %>">
 
-% foreach my $field (qw( payname paycvv paystart_month paystart_year payissue payip )) { 
+% foreach my $field (qw( payname paycvv paystart_month paystart_year payissue payip paytype paystate )) { 
 
     <INPUT TYPE="hidden" NAME="<% $field %>" VALUE="<% $cust_main->getfield($field) %>">
 
@@ -119,6 +119,7 @@
   </SCRIPT>
 
 %  my $payby = $cust_main->payby;
+%  my $paytype = $cust_main->paytype;
 %  my( $account, $aba ) = split('@', $payinfo);
 %
 %  my $disabled = 'DISABLED style="background-color: #dddddd"';
@@ -189,10 +190,13 @@
 %      '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
 %
 %        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Account number </TD>!.
-%          qq!<TD WIDTH="408"><INPUT TYPE="text" SIZE=12 NAME="payinfo1" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $account : '' ). '"></TD></TR>'.
+%          qq!<TD><INPUT TYPE="text" SIZE=12 NAME="payinfo1" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $account : '' ). '"></TD>'.
+%          qq!<TD ALIGN="right">Type</TD><TD><SELECT="text" NAME="paytype">!.
+%            join('', map { qq!<OPTION VALUE="$_" !.($paytype eq $_ ? 'SELECTED' : '').">$_</OPTION>" } @FS::cust_main::paytypes).
+%          qq!</SELECT></TD></TR>!.
 %
 %        qq!<TR><TD ALIGN="right" WIDTH="200">${r}ABA/Routing number </TD>!.
-%          qq!<TD WIDTH="408"><INPUT TYPE="text" SIZE=10 MAXLENGTH=9 NAME="payinfo2" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $aba : '' ). qq!" SIZE=10 MAXLENGTH=9> !.
+%          qq!<TD COLSPAN="3" WIDTH="408"><INPUT TYPE="text" SIZE=10 MAXLENGTH=9 NAME="payinfo2" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $aba : '' ). qq!" SIZE=10 MAXLENGTH=9> !.
 %          qq!(<A HREF="javascript:void(0);" onClick="overlib( OLiframeContent('../docs/ach.html', 380, 240, 'ach_popup' ), CAPTION, 'ACH Help', STICKY, AUTOSTATUSCAP, CLOSECLICK, DRAGGABLE ); return false;">help</A>)!.
 %          qq!</TD></TR>!.
 %
@@ -200,9 +204,18 @@
 %        qq!<INPUT TYPE="hidden" NAME="exp_year" VALUE="2037">!.
 %
 %        qq!<TR><TD ALIGN="right" WIDTH="200">${r}Bank name </TD>!.
-%          qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="payname" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $cust_main->payname : '' ). qq!"></TD></TR>!.
+%          qq!<TD COLSPAN="3" WIDTH="408"><INPUT TYPE="text" NAME="payname" VALUE="!. ( $payby =~ /^(CHEK|DCHK)$/ ? $cust_main->payname : '' ). qq!"></TD></TR>!.
+%          qq!<TR><TD ALIGN="right" WIDTH="200">$paystate_label</TD>!.
+%          qq!<TD COLSPAN="3" WIDTH="408">!.
+%          include('select-state.html',
+%                    'empty'   => '(choose)',
+%                    'state'   => $cust_main->paystate,
+%                    'country' => $cust_main->country,
+%                    'prefix' => 'pay',
+%                 ). "</TD></TR>".
 %
-%        qq!<TR><TD COLSPAN=2 WIDTH="608"><INPUT TYPE="checkbox" NAME="payauto" !. ( $payby eq 'DCHK' ? '' : 'CHECKED' ). '> Charge future payments to this electronic check automatically</TD></TR>'.
+%
+%        qq!<TR><TD COLSPAN=4 WIDTH="608"><INPUT TYPE="checkbox" NAME="payauto" !. ( $payby eq 'DCHK' ? '' : 'CHECKED' ). '> Charge future payments to this electronic check automatically</TD></TR>'.
 %
 %        '<TR><TD>&nbsp;</TD></TR>'.
 %        '<TR><TD>&nbsp;</TD></TR>'.
@@ -426,6 +439,12 @@
   <% $r %> required fields
 % } 
 
+<%once>
+
+my $paystate_label = FS::Msgcat::_gettext('paystate');
+$paystate_label = 'Bank state' if $paystate_label =~/^paystate$/;
+
+</%once>
 <%init>
 
 my( $cust_main, %options ) = @_;

Index: select-state.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main/select-state.html,v
retrieving revision 1.4
retrieving revision 1.4.2.1
diff -u -d -r1.4 -r1.4.2.1
--- select-state.html	25 Aug 2006 19:30:52 -0000	1.4
+++ select-state.html	6 Apr 2007 19:41:57 -0000	1.4.2.1
@@ -1,5 +1,9 @@
 <SELECT NAME="<% $opt{'prefix'} %>state" onChange="<% $opt{'prefix'} %>state_changed(this); <% $opt{'onchange'} %>" <% $opt{'disabled'} %>>
 
+% if ($opt{empty}) {
+  <OPTION VALUE=""<% $opt{state} eq '' ? ' SELECTED' : '' %>><% $opt{empty} %>
+% }
+
 % foreach my $state ( keys %states ) { 
 
   <OPTION VALUE="<% $state %>"<% $state eq $opt{'state'} ? ' SELECTED' : '' %>><% $states{$state} || '(n/a)' %>
@@ -11,7 +15,7 @@
 
 <%init>
 my %opt = @_;
-foreach my $opt (qw( county state country prefix onchange disabled )) {
+foreach my $opt (qw( county state country prefix onchange disabled empty )) {
   $opt{$_} = '' unless exists($opt{$_}) && defined($opt{$_});
 }
 



More information about the freeside-commits mailing list