summaryrefslogtreecommitdiff
path: root/httemplate/edit/cust_refund.cgi
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-08-28 00:56:49 -0500
committerJonathan Prykop <jonathan@freeside.biz>2015-08-29 17:40:19 -0500
commitf3738a9fcd588d32eea9b0af6a3e884293c0c6e5 (patch)
tree2b9aa0888b1add886eff03b2c77b0118d0bc06de /httemplate/edit/cust_refund.cgi
parentb4e2bdc5477a8318da25914c7aedfc5901e3975d (diff)
RT#37064: Add action link to manually refund a payment
Diffstat (limited to 'httemplate/edit/cust_refund.cgi')
-rwxr-xr-xhttemplate/edit/cust_refund.cgi10
1 files changed, 1 insertions, 9 deletions
diff --git a/httemplate/edit/cust_refund.cgi b/httemplate/edit/cust_refund.cgi
index 486534375..3c189afe6 100755
--- a/httemplate/edit/cust_refund.cgi
+++ b/httemplate/edit/cust_refund.cgi
@@ -136,16 +136,8 @@ my $payinfo = $cgi->param('payinfo');
my $reason = $cgi->param('reason');
my $link = $cgi->param('popup') ? 'popup' : '';
-my @rights = ();
-push @rights, 'Post refund' if $payby =~ /^(BILL|CASH|MCRD|MCHK)$/;
-push @rights, 'Post check refund' if $payby eq 'BILL';
-push @rights, 'Post cash refund ' if $payby eq 'CASH';
-push @rights, 'Refund payment' if $payby =~ /^(CARD|CHEK)$/;
-push @rights, 'Refund credit card payment' if $payby eq 'CARD';
-push @rights, 'Refund Echeck payment' if $payby eq 'CHEK';
-
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right(\@rights);
+ unless $FS::CurrentUser::CurrentUser->refund_access_right($payby);
my( $paynum, $cust_pay ) = ( '', '' );
if ( $cgi->param('paynum') =~ /^(\d+)$/ ) {