X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbilling.html;h=5e97934c1b801a925da0138baac72ce9feecf328;hb=5cebf6d642a74554ca424397d806f9b59ac19c5c;hp=d1219821108849a5b5de14a3b81b270d020461c4;hpb=8d421ec3cb2697a0fcc75db12a8975a2d92cf25f;p=freeside.git diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index d12198211..5e97934c1 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -96,6 +96,29 @@ return true; } + function init_payauto_changed(){ + var f = document.getElementById('CARD_payauto'); + if(f != null) payauto_changed(f); + f = document.getElementById('CHEK_payauto'); + if(f != null) payauto_changed(f); + } + + 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); + if (span == null || select == null) return; + if(payauto_field.checked) { + span.style.color = '#000000'; + select.disabled = false; + } + else { + span.style.color = '#999999'; + select.disabled = true; + select.selectedIndex = 0; + } + } + <% include('/elements/init_overlib.html') %> @@ -103,6 +126,8 @@ % my $payby = $cust_main->payby; % my $paytype = $cust_main->paytype; % my( $account, $aba ) = split('@', $payinfo); +% my $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"'; @@ -112,6 +137,30 @@ % $text_disabled = 'style="color: #000000";' % } % +% my $disable_payauto = $conf->exists('disable_payauto_default'); +% my $CARD_payauto_checked = $payby eq 'DCRD' ? '' +% : $payby eq 'CARD' ? 'CHECKED' +% : $disable_payauto ? '' : 'CHECKED'; +% my $CHEK_payauto_checked = $payby eq 'DCHK' ? '' +% : $payby eq 'CHEK' ? 'CHECKED' +% : $disable_payauto ? '' : 'CHECKED'; +% +% sub billday_options { +% my $curr_value = shift; +% my $ret = ''; +% for my $billday ( 1 .. 28 ) { +% my $sel = ''; +% $sel = "SELECTED='SELECTED'" if $curr_value == $billday; +% $ret .= ""; +% } +% $ret; +% } +% +% my $card_billday_style = $payby eq 'CARD' ? '' : 'style="color: #999999"'; +% my $chek_billday_style = $payby eq 'CHEK' ? '' : 'style="color: #999999"'; +% my $card_billday_select_disabled = $payby eq 'CARD' ? '' : 'DISABLED'; +% my $chek_billday_select_disabled = $payby eq 'CHEK' ? '' : 'DISABLED'; +% % my %payby = ( % % 'CARD' => @@ -163,7 +212,17 @@ % qq!${r}Exact name on card !. % qq!!. % -% qq! Charge future payments to this card automatically'. +% qq!!. +% qq! !. +% qq!Charge future payments to this card automatically!. +% +% ( $conf->exists('cust_main-select-billday') ? +% qq! +% Charge on this day of each month   +% ! +% : '' +% ). % % '', % @@ -185,6 +244,10 @@ % qq!!. % qq!!. % +% ( $conf->exists('cust_main-require-bank-branch') ? +% qq!$r Branch number +% ! : '' ). +% % qq!${r}Bank name !. % qq!!. % ( $conf->exists('show_bankstate') ? @@ -201,11 +264,17 @@ % ). % % -% qq! Charge future payments to this electronic check automatically'. +% qq!!. +% qq! !. +% qq!Charge future payments to this electronic check automatically!. % -% ' '. -% ' '. -% ' '. +% ( $conf->exists('cust_main-select-billday') ? +% qq! +% Charge on this day of each month   +% ! +% : '' +% ). % % '', % @@ -352,6 +421,7 @@ 'labels' => \%allopt, 'html_between' => '', 'layer_callback' => sub { my $layer = shift; $payby{$layer}; }, + 'onchange' => 'init_payauto_changed();', ) %> @@ -401,12 +471,14 @@ % } +% unless ( $conf->exists('cust-email-high-visibility')) { <% $conf->exists('cust_main-require_invoicing_list_email') ? $r : '' %>Email address(es) +% } Invoice terms @@ -440,7 +512,7 @@ function toggle(obj) { % if ( $conf->exists('voip-cust_cdr_squelch') ) { - squelch_cdr eq "Y" ? 'CHECKED' : '' %>> Omit CDRs from invoices + squelch_cdr eq "Y" ? 'CHECKED' : '' %>> Omit CDRs from printed invoices % } else { @@ -473,6 +545,10 @@ function toggle(obj) { <% $r %> required fields % } + + <%once> my $paystate_label = FS::Msgcat::_gettext('paystate');