X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_refund.cgi;h=009ce7321c5565eaa0b4b5d45f280e19c0f3e15e;hp=f3dec98e1216b0f64e041b3f4865df297c3b0498;hb=4a88f08ffbf1c9d2f3da8a6d6d6a7d46e99dbc19;hpb=d5988a9f7a3617de33da3058f2e9f1151b24420e diff --git a/httemplate/edit/cust_refund.cgi b/httemplate/edit/cust_refund.cgi index f3dec98e1..009ce7321 100755 --- a/httemplate/edit/cust_refund.cgi +++ b/httemplate/edit/cust_refund.cgi @@ -44,9 +44,14 @@ Date<% time2str($date_format, $cust_pay->_date) %> +% if ( $cust_payby ) { - Method<% $payby %> # <% $paymask %> + Method + <% $payby %> # <% $paymask %> + + +% } % unless ( $paydate || $cust_pay->payby ne 'CARD' ) { # possibly other reasons: i.e. card has since expired @@ -133,10 +138,7 @@ % ? scalar($cgi->param('custpaybynum')) % : scalar(@cust_payby) && $cust_payby[0]->custpaybynum; -% if ($cust_pay) { - -% } -% else { +% if ( !$cust_payby ) { <& /elements/tr-select-cust_payby.html, 'cust_payby' => \@cust_payby, 'curr_value' => $custpaybynum, @@ -144,7 +146,10 @@ &> % } -% if ( $conf->exists("batch-enable") +% if ($payby eq "CARD" || $payby eq "DCRD") { + +% } +% elsif ( $conf->exists("batch-enable") % || grep $payby eq $_, $conf->config('batch-enable_payby') % ) { % if ( grep $payby eq $_, $conf->config('realtime-disable_payby') ) { @@ -160,7 +165,7 @@

-% if ( !$cust_pay ) { +% if ( !$cust_payby ) {

-% } # end if cust_pay +% } # end if cust_payby % } else { @@ -221,7 +226,7 @@ my $batch = $cgi->param('batch'); die "access denied" unless $FS::CurrentUser::CurrentUser->refund_access_right($payby); -my( $paynum, $cust_pay, $batchnum ) = ( '', '', '' ); +my( $paynum, $cust_pay, $batchnum, $cust_payby ) = ( '', '', '', '' ); if ( $cgi->param('paynum') =~ /^(\d+)$/ ) { $paynum = $1; $cust_pay = qsearchs('cust_pay', { paynum=>$paynum } ) @@ -233,7 +238,13 @@ if ( $cgi->param('paynum') =~ /^(\d+)$/ ) { unless $custnum == $cust_pay->custnum; } else { $custnum = $cust_pay->custnum; + $cgi->param(-name=>"custnum", -value=>$custnum) unless $cgi->param("custnum"); } + # get custpayby + $cust_payby = qsearchs( + 'cust_payby', { paymask => $cust_pay->paymask, custnum => $custnum } + ); + } die "no custnum or paynum specified!" unless $custnum;