diff options
| author | Mark Wells <mark@freeside.biz> | 2015-01-22 17:29:48 -0800 |
|---|---|---|
| committer | Mark Wells <mark@freeside.biz> | 2015-01-22 17:29:48 -0800 |
| commit | 2073798304acbd9402f73e0dee7507a7a4d22ceb (patch) | |
| tree | c6cc427365553521fc6bcc2e9397905e69660147 /httemplate/edit/process | |
| parent | c113c2681677d34974e9d63b631904770e25e3c0 (diff) | |
unsnarl creation of credit/refund reasons, partial fallout from #31702
Diffstat (limited to 'httemplate/edit/process')
| -rwxr-xr-x | httemplate/edit/process/cust_refund.cgi | 9 |
1 files changed, 7 insertions, 2 deletions
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})?$/ |
