X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fedit%2Fprocess%2Fcust_refund.cgi;h=6ad468b6c8a161139b4ac4ddc5d6e95b8c3fd197;hb=b3db3e68f602f3ca395a6bc272a4de6fef2d0895;hp=0fee6ed30e8c9e537a3f6a03daa6e820bc0a9692;hpb=f6c324e36edfbab5243c8b714ce34f04ad5bca91;p=freeside.git diff --git a/httemplate/edit/process/cust_refund.cgi b/httemplate/edit/process/cust_refund.cgi index 0fee6ed30..6ad468b6c 100755 --- a/httemplate/edit/process/cust_refund.cgi +++ b/httemplate/edit/process/cust_refund.cgi @@ -33,8 +33,13 @@ my $payby = $cgi->param('payby'); die "access denied" unless $FS::CurrentUser::CurrentUser->refund_access_right($payby); -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})?$/