X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Fcust_refund.cgi;h=599c8b8e23a72286919e0394a0d681b694da38f0;hb=3ece1c396f23e04cd659f1085f6eeee8bdfd846f;hp=bde40727a96bba85b25436effb5003320a3c395c;hpb=0af38652da3b3be7da2d35b048285ef6f2194e1a;p=freeside.git diff --git a/httemplate/edit/process/cust_refund.cgi b/httemplate/edit/process/cust_refund.cgi index bde40727a..599c8b8e2 100755 --- a/httemplate/edit/process/cust_refund.cgi +++ b/httemplate/edit/process/cust_refund.cgi @@ -41,8 +41,13 @@ push @rights, 'Refund Echeck payment' if $payby eq 'CHEK'; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right(\@rights); -my $error = ''; -if ( $payby =~ /^(CARD|CHEK)$/ ) { +$cgi->param('reasonnum') =~ /^(-?\d+)$/ or die "Illegal reasonnum"; +my ($reasonnum, $error) = $m->comp('/misc/process/elements/reason'); +$cgi->param('reasonnum', $reasonnum) unless $error; + +if ( $error ) { + # do nothing +} elsif ( $payby =~ /^(CARD|CHEK)$/ ) { my %options = (); my $bop = $FS::payby::payby2bop{$1}; $cgi->param('refund') =~ /^(\d*)(\.\d{2})?$/