FSM, another missed file for 477 reporting
[freeside.git] / httemplate / search / cust_pay_batch.cgi
index 60dca8c..2fceb93 100755 (executable)
@@ -63,7 +63,9 @@ die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('Financial reports')
       || $FS::CurrentUser::CurrentUser->access_right('Process batches')
       || ( $cgi->param('custnum') 
-           && $conf->exists('batch-enable')
+           && (    $conf->exists('batch-enable')
+                || $conf->config('batch-enable_payby')
+              )
            #&& $FS::CurrentUser::CurrentUser->access_right('View customer batched payments')
          );
 
@@ -130,6 +132,9 @@ if ( $pay_batch ) {
        || ( $pay_batch->status eq 'I'
             && $FS::CurrentUser::CurrentUser->access_right('Reprocess batches')
           ) 
+       || ( $pay_batch->status eq 'R'
+            && $FS::CurrentUser::CurrentUser->access_right('Redownload resolved batches')
+          ) 
   ) {
     $html_init .= qq!<FORM ACTION="$p/misc/download-batch.cgi" METHOD="POST">!;
     if ( $fixed ) {