add cc-void option
[freeside.git] / httemplate / view / cust_main / payment_history.html
index db01ebb..6c475c5 100644 (file)
@@ -118,14 +118,14 @@ foreach my $cust_pay ($cust_main->cust_pay) {
 
   my $void = '';
   if (    $cust_pay->closed !~ /^Y/i
-       && $cust_pay->payby ne 'CARD'
+       && ( $cust_pay->payby ne 'CARD' || $conf->exists('cc-void')     )
        && ( $cust_pay->payby ne 'CHEK' || $conf->exists('echeck-void') ) 
      ) {
     $void = qq! (<A HREF="javascript:areyousure('!.
             qq!${p}misc/void-cust_pay.cgi?!. $cust_pay->paynum.
             qq!', 'Are you sure you want to void this payment?')"!.
             qq! TITLE="Void this payment from the database!.
-              ( $cust_pay->payby eq 'CHEK'
+              ( $cust_pay->payby =~ /^(CARD|CHEK)$/
                 ? ' (do not send anything to the payment gateway)'
                 : '' 
               ). '"'.