X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_refund.cgi;h=c79c39a80914d5e1367d0f38e5e2c19885291472;hb=ad94da6a8b46ba0cb915a69307810c8a5bcf6749;hp=32da4543ea081f991d2f839caaafc3872befb9cc;hpb=0705b62f92bc358d36bd0c9a290ad9f51e719117;p=freeside.git
diff --git a/httemplate/edit/cust_refund.cgi b/httemplate/edit/cust_refund.cgi
index 32da4543e..c79c39a80 100755
--- a/httemplate/edit/cust_refund.cgi
+++ b/httemplate/edit/cust_refund.cgi
@@ -102,6 +102,22 @@
Check # |
|
+% }
+% elsif ($payby eq 'CHEK' || $payby eq 'CARD') {
+
+% if ( $conf->exists("batch-enable")
+% || grep $payby eq $_, $conf->config('batch-enable_payby')
+% ) {
+% if ( grep $payby eq $_, $conf->config('realtime-disable_payby') ) {
+
+% } else {
+
+ > |
+ <% mt('Add to current batch') |h %> |
+
+% }
+% }
+
% } else {
% }
@@ -138,16 +154,18 @@ my $payby = $cgi->param('payby');
my $payinfo = $cgi->param('payinfo');
my $reason = $cgi->param('reason');
my $link = $cgi->param('popup') ? 'popup' : '';
+my $batch = $cgi->param('batch');
die "access denied"
unless $FS::CurrentUser::CurrentUser->refund_access_right($payby);
-my( $paynum, $cust_pay ) = ( '', '' );
+my( $paynum, $cust_pay, $batchnum ) = ( '', '', '' );
if ( $cgi->param('paynum') =~ /^(\d+)$/ ) {
$paynum = $1;
$cust_pay = qsearchs('cust_pay', { paynum=>$paynum } )
or die "unknown payment # $paynum";
$refund ||= $cust_pay->unrefunded;
+ $batchnum = $cust_pay->batchnum;
if ( $custnum ) {
die "payment # $paynum is not for specified customer # $custnum"
unless $custnum == $cust_pay->custnum;