From: ivan Date: Wed, 28 Dec 2011 23:33:34 +0000 (+0000) Subject: fix bill day selection w/echeck, RT#15763 X-Git-Tag: freeside_2_3_1~47 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=9ad2437e1cfaffceb657216a48ea3c7cc9414922 fix bill day selection w/echeck, RT#15763 --- diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 218015577..e823f7c93 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -194,7 +194,7 @@ function samechanged(what) { %# cust_main/bottomfixup.js % foreach my $hidden ( -% 'payauto', +% 'payauto', 'billday', % 'payinfo', 'payinfo1', 'payinfo2', 'payinfo3', 'paytype', % 'payname', 'paystate', 'exp_month', 'exp_year', 'paycvv', % 'paystart_month', 'paystart_year', 'payissue', diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 7f7a23284..fd078c5da 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -6,7 +6,7 @@ -% foreach my $field (qw( payname paycvv paystart_month paystart_year payissue payip paytype paystate )) { +% foreach my $field (qw( payname paycvv paystart_month paystart_year payissue payip paytype paystate billday )) { @@ -103,9 +103,9 @@ } function payauto_changed(payauto_field){ - var span = (payauto_field.name == 'CARD_payauto') ? 'card_billday' : 'chek_billday'; - var select = document.getElementById('select_'+span); - span = document.getElementById(span); + var select = (payauto_field.name == 'CARD_payauto') ? 'CARD_billday' : 'CHEK_billday'; + var span = document.getElementById('td_'+select); + select = document.getElementById(select); if (span == null || select == null) return; if(payauto_field.checked) { span.style.color = '#000000'; @@ -114,7 +114,7 @@ else { span.style.color = '#999999'; select.disabled = true; - select.selectedIndex = 0; + //why? select.selectedIndex = 0; } } @@ -126,7 +126,8 @@ % my $paytype = $cust_main->paytype; % my( $account, $aba ) = split('@', $payinfo); % my $branch = ''; -% ($branch,$aba) = split('\.',$aba) if $conf->exists('cust_main-require-bank-branch'); +% ($branch,$aba) = split('\.',$aba) +% if $conf->exists('cust_main-require-bank-branch'); % % my $disabled = 'DISABLED style="background-color: #dddddd"'; % my $text_disabled = 'style="color: #999999"'; @@ -215,9 +216,9 @@ % emt('Charge future payments to this [_1] automatically','credit card').''. % % ( $conf->exists('cust_main-select-billday') ? -% qq! +% qq! % Charge on this day of each month   -% ! % . billday_options($cust_main->billday) . qq! ! % : '' % ). @@ -267,9 +268,9 @@ % emt('Charge future payments to this [_1] automatically','electronic check').''. % % ( $conf->exists('cust_main-select-billday') ? -% qq! +% qq! % Charge on this day of each month   -% ! % . billday_options($cust_main->billday) . qq! ! % : '' % ). diff --git a/httemplate/edit/cust_main/bottomfixup.js b/httemplate/edit/cust_main/bottomfixup.js index 2f7839a32..a031f46c2 100644 --- a/httemplate/edit/cust_main/bottomfixup.js +++ b/httemplate/edit/cust_main/bottomfixup.js @@ -2,7 +2,7 @@ function bottomfixup(what) { %# ../cust_main.cgi var layervars = new Array( - 'payauto', + 'payauto', 'billday', 'payinfo', 'payinfo1', 'payinfo2', 'payinfo3', 'paytype', 'payname', 'paystate', 'exp_month', 'exp_year', 'paycvv', 'paystart_month', 'paystart_year', 'payissue',