X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fchange_pay.html;h=e4f412cb059be62555070ad56525852f3f8ef3a4;hp=e38ba762d7fc5574bdc2011d83d4cdecd534d9a6;hb=HEAD;hpb=eb8fe191d66b2b6bf7e113049047968c8147fb66 diff --git a/fs_selfservice/FS-SelfService/cgi/change_pay.html b/fs_selfservice/FS-SelfService/cgi/change_pay.html index e38ba762d..e4f412cb0 100644 --- a/fs_selfservice/FS-SelfService/cgi/change_pay.html +++ b/fs_selfservice/FS-SelfService/cgi/change_pay.html @@ -39,8 +39,8 @@ ); ## Don't show CHEK or DCHK option if ACH is read only - delete( $payby_index{'CHEK'} ) unless !$ach_read_only; - delete( $payby_index{'DCHK'} ) unless !$ach_read_only; + delete( $payby_index{'CHEK'} ) if ($ach_read_only && $payby ne "CHEK"); + delete( $payby_index{'DCHK'} ) if ($ach_read_only && $payby ne "DCHK"); tie my %options, 'Tie::IxHash', (); foreach my $payby_option ( grep { exists( $payby_index{$_} ) } @paybys ) { @@ -60,8 +60,8 @@ delete $options{'DCRD'} unless $payby eq 'DCRD' || ! exists $options{'CARD'}; delete $options{'DCHK'} unless $payby eq 'DCHK' || ! exists $options{'CHEK'}; - ## setting payby to default to layer if only one. should we always display first layer? - if (keys %options == 1) { @p = keys %options; $payby = $p[0]; } + $payby = (keys %options)[0] + if !$payby && %options; HTML::Widgets::SelectLayers->new( options => \%options,