X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_refund.cgi;h=bea3786f76cf9f427cd423bf88c5587fdf02a112;hb=833839f66761df30a0b0b965ed4314cce32f8f3d;hp=39584c8eb90a1b5ce0d1fa8964796f24f64430cb;hpb=eadb3075ac883f761c959a6dd60a358b40f1e499;p=freeside.git diff --git a/httemplate/edit/cust_refund.cgi b/httemplate/edit/cust_refund.cgi index 39584c8eb..bea3786f7 100755 --- a/httemplate/edit/cust_refund.cgi +++ b/httemplate/edit/cust_refund.cgi @@ -33,7 +33,7 @@ % $paydate = '' unless ($paydate =~ /^\d{2,4}-\d{1,2}-01$'/); % } -
Payment +
Payment <% ntable("#cccccc", 2) %> @@ -46,7 +46,6 @@ Method<% $payby %> # <% $paymask %> - % unless ( $paydate || $cust_pay->payby ne 'CARD' ) { # possibly other reasons: i.e. card has since expired @@ -85,7 +84,7 @@ % } #if $cust_pay -
Refund +
Refund <% ntable("#cccccc", 2) %> @@ -95,20 +94,28 @@ Amount - $ by <% FS::payby->payname($payby) %> + $ % if ( $payby eq 'BILL' ) { - Check # - + Check + % } % elsif ($payby eq 'CHEK' || $payby eq 'CARD') { -% if ( $conf->exists("batch-enable") + + Method + <% FS::payby->payname($real_payby) %> # <% $real_paymask %> + + +% 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') ) { % } else { @@ -160,7 +167,7 @@ my $batch = $cgi->param('batch'); die "access denied" unless $FS::CurrentUser::CurrentUser->refund_access_right($payby); -my( $paynum, $cust_pay, $batchnum, $cust_payby ) = ( '', '', '', '' ); +my( $paynum, $cust_pay, $batchnum ) = ( '', '', '' ); if ( $cgi->param('paynum') =~ /^(\d+)$/ ) { $paynum = $1; $cust_pay = qsearchs('cust_pay', { paynum=>$paynum } ) @@ -173,15 +180,15 @@ if ( $cgi->param('paynum') =~ /^(\d+)$/ ) { } else { $custnum = $cust_pay->custnum; } - # get custpayby - die "Can not find payby record!" - unless $cust_payby = qsearchs( - 'cust_payby', { paymask => $cust_pay->paymask, custnum => $custnum } - ); - } die "no custnum or paynum specified!" unless $custnum; +my $cust_main = qsearchs( 'cust_main', { 'custnum'=>$custnum } ); +die "unknown custnum $custnum" unless $cust_main; + +my $real_payby = $cust_main->payby; +my $real_paymask = $cust_main->paymask; + my $_date = time; my $p1 = popurl(1);