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=6898dc7f86d37293f8be5d4bcd84204b0d0343f9;hb=437c89c9c88979a4b3999689ded7a862b69156df;hpb=3564f619654c5cbf22fc2acbe7eff0c08308e859 diff --git a/fs_selfservice/FS-SelfService/cgi/change_pay.html b/fs_selfservice/FS-SelfService/cgi/change_pay.html index 6898dc7f8..e4f412cb0 100644 --- a/fs_selfservice/FS-SelfService/cgi/change_pay.html +++ b/fs_selfservice/FS-SelfService/cgi/change_pay.html @@ -37,6 +37,11 @@ 'PREP' => qq/Prepaid Card/, 'PREPAY' => qq/Prepaid Card/, ); + + ## Don't show CHEK or DCHK option if ACH is 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 ) { $options{$payby_option} = $payby_index{$payby_option}; @@ -55,6 +60,9 @@ delete $options{'DCRD'} unless $payby eq 'DCRD' || ! exists $options{'CARD'}; delete $options{'DCHK'} unless $payby eq 'DCHK' || ! exists $options{'CHEK'}; + $payby = (keys %options)[0] + if !$payby && %options; + HTML::Widgets::SelectLayers->new( options => \%options, selected_layer => $payby,