X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fbilling.html;h=353f2b9a093b8435f6cbd73466dbc861cde30673;hb=8fb243091939f37e24163925be78f4e9f3485978;hp=6ed35c15ae01286f4cfebef99283e6349fc6763d;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html index 6ed35c15a..353f2b9a0 100644 --- a/httemplate/edit/cust_main/billing.html +++ b/httemplate/edit/cust_main/billing.html @@ -1,18 +1,15 @@ %if ( $payby_default eq 'HIDE' ) { % % $cust_main->payby('BILL') unless $cust_main->payby; +% my $payby = $cust_main->payby; - - - - -
+ - + % foreach my $field (qw( payname paycvv paystart_month paystart_year payissue payip paytype paystate )) { - + % } @@ -27,24 +24,18 @@ % die "unrecognized expiration date format: $date"; % } - - - -
- -
+ + -
- % } else { % % my $r = qq!* !; -
Billing information +
Billing information <% &ntable("#cccccc") %> @@ -107,16 +98,7 @@ - - - - + <% include('/elements/init_overlib.html') %> % my $payby = $cust_main->payby; % my $paytype = $cust_main->paytype; @@ -137,13 +119,13 @@ % ''. % % qq!!. -% qq!!. +% qq!!. % % qq!!. % '!. -% '!. % '!. +% '!. % % qq!!. -% qq!!. +% qq!!. % -% qq!'. +% qq!'. % % '
${r}Card number
${r}Expiration '. % % include('/elements/select-month_year.html', -% 'prefix' => 'exp', +% 'prefix' => 'CARD_exp', % 'selected_date' => % ( $payby =~ /^(CARD|DCRD)$/ ? $cust_main->paydate : '' ), % ). @@ -154,14 +136,14 @@ % % qq!(help)!. % qq!'. +% ''. % % % qq!
Start date '. % % include('/elements/select-month_year.html', -% 'prefix' => 'paystart', +% 'prefix' => 'CARD_paystart', % 'disabled' => $disabled, % 'empty_option' => 1, % 'start_year' => 2000, @@ -176,12 +158,12 @@ % ). % % qq! or Issue number !. -% '
${r}Exact name on card
Charge future payments to this card automatically
Charge future payments to this card automatically
', % @@ -190,36 +172,36 @@ % ''. % % qq!!. -% qq!'. -% qq!'. +% qq!!. % % qq!!. -% qq!!. % -% qq!!. -% qq!!. +% qq!!. +% qq!!. % % qq!!. -% qq!!. +% qq!!. % ( $conf->exists('show_bankstate') ? % qq!!. % qq!" -% : '' % ). % % -% qq!'. +% qq!'. % % ''. % ''. @@ -232,11 +214,11 @@ % '
${r}Account number TypeType
${r}ABA/Routing number !. +% qq! !. % qq!(help)!. % qq!
${r}Bank name
$paystate_label!. -% include('select-state.html', +% include('/elements/select-state.html', % 'empty' => '(choose)', % 'state' => $cust_main->paystate, % 'country' => $cust_main->country, -% 'prefix' => 'pay', +% 'prefix' => 'CHEK_pay', % ). "
Charge future payments to this electronic check automatically
Charge future payments to this electronic check automatically
 
 
'. % % qq!!. -% qq!!. +% qq!!. % -% qq!!. -% qq!!. -% qq!!. +% qq!!. +% qq!!. +% qq!!. % % ''. % ''. @@ -252,13 +234,13 @@ % '
${r}Phone number
 
 
'. % % qq!!. -% qq!!. +% qq!!. % -% qq!!. -% qq!!. +% qq!!. +% qq!!. % % qq!!. -% qq!!. +% qq!!. % % ''. % ''. @@ -273,13 +255,13 @@ % '
P.O.
Attention
 
 
'. % % qq!!. -% qq!!. +% qq!!. % % qq!!. % '
${r}Approved by
${r}Expiration '. % % include('/elements/select-month_year.html', -% 'prefix' => 'exp', +% 'prefix' => 'COMP_exp', % 'selected_date' => % ( $payby eq 'COMP' ? $cust_main->paydate : '' ), % ). @@ -299,7 +281,7 @@ % ''. % % qq!!. -% qq!!. +% qq!!. % % ''. % ''. @@ -315,7 +297,7 @@ % '
${r}Amount
 
 
'. % % qq!!. -% qq!!. +% qq!!. % % ''. % ''. @@ -331,7 +313,7 @@ % '
${r}Amount
 
 
'. % % qq!!. -% qq!!. +% qq!!. % % ''. % ''. @@ -345,48 +327,33 @@ % ); % % #this should use FS::payby -% my %allopt = ( -% 'CARD' => 'Credit card', -% 'CHEK' => 'Electronic check', -% 'LECB' => 'Phone bill billing', -% 'BILL' => 'Billing', -% 'CASH' => 'Cash', # initial payment, then billing', -% 'WEST' => 'Western Union', # initial payment, then billing', -% 'MCRD' => 'Manual credit card', # initial payment, then billing', -% 'COMP' => 'Complimentary', -% ); -% if ( $cust_main->custnum ) { #don't offer CASH/WEST/MCRD initial payment types -% # when editing customer +% my @allopt = qw( CARD CHEK LECB BILL CASH WEST MCRD COMP ); +% +% my %allopt = map { $_ => FS::payby->shortname($_) } @allopt; +% +% if ( $cust_main->custnum ) { +% #don't offer CASH/WEST/MCRD initial payment types when editing customer % delete $allopt{$_} for qw(CASH WEST MCRD); % } % -% tie my %options, 'Tie::IxHash', -% map { $_ => $allopt{$_} } -% grep { exists $allopt{$_} } -% @payby; +% my @options = grep exists( $allopt{$_} ), @payby; % % my %payby2option = ( -% ( map { $_ => $_ } keys %options ), +% ( map { $_ => $_ } @options ), % 'DCRD' => 'CARD', % 'DCHK' => 'CHEK', % ); -% -% my $widget = new HTML::Widgets::SelectLayers( -% 'options' => \%options, -% #'form_name' => 'dummy', -% #'form_action' => 'nothingyet', -% #chops bottom of page in IE# 'under_position' => 'absolute', -% 'html_between' => '
${r}Amount
 
 
', -% 'selected_layer' => $payby2option{$payby || $payby_default || $payby[0] }, -% 'layer_callback' => sub { my $layer = shift; $payby{$layer}; }, -% ); -% -% - -
<% $widget->html %> - -
+
+ <% include( '/elements/selectlayers.html', + 'field' => 'payby', + 'curr_value' => $payby2option{$payby || $payby_default || $payby[0] }, + 'options' => \@options, + 'labels' => \%allopt, + 'html_between' => '
', + 'layer_callback' => sub { my $layer = shift; $payby{$layer}; }, + ) + %> <% &ntable("#cccccc") %> @@ -438,7 +405,7 @@ % } - +% if ( $conf->exists('voip-cust_cdr_squelch') ) { + + squelch_cdr eq "Y" ? 'CHECKED' : '' %>> Omit CDRs from invoices + +% } else { - + +% } + + <% $r %> required fields % }