summaryrefslogtreecommitdiff
path: root/httemplate/edit/process
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-01-23 13:07:31 -0600
committerJonathan Prykop <jonathan@freeside.biz>2015-01-23 13:07:31 -0600
commit3ece1c396f23e04cd659f1085f6eeee8bdfd846f (patch)
tree968dd7ae2ea22173897edaaa2c1961e276c47262 /httemplate/edit/process
parent0c8c5a5727dda5f8e5cf6f999d5b671a77556c6a (diff)
parent2073798304acbd9402f73e0dee7507a7a4d22ceb (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/edit/process')
-rwxr-xr-xhttemplate/edit/process/cust_refund.cgi9
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})?$/