X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_pay_batch.cgi;h=4a2248726d3a960634cd0a930b6b530089a3c2c2;hb=dc1891ff9a6e6c4b4545fe7f786af6bd0f28b2cf;hp=7376e9dcbccfa88fb76b996542121995b1966c06;hpb=624b2d44625f69d71175c3348cae635d580c890b;p=freeside.git diff --git a/httemplate/search/cust_pay_batch.cgi b/httemplate/search/cust_pay_batch.cgi index 7376e9dcb..4a2248726 100755 --- a/httemplate/search/cust_pay_batch.cgi +++ b/httemplate/search/cust_pay_batch.cgi @@ -124,7 +124,7 @@ $sql_query = "SELECT paybatchnum,invnum,custnum,cpb.last,cpb.first," . 'LEFT JOIN pay_batch USING ( batchnum ) ' . "$search ORDER BY $orderby"; -my $html_init = ''; +my $html_init = ''; if ( $pay_batch ) { my $fixed = $conf->config('batch-fixed_format-'. $pay_batch->payby); if ( @@ -136,11 +136,12 @@ if ( $pay_batch ) { && $FS::CurrentUser::CurrentUser->access_right('Redownload resolved batches') ) ) { - $html_init .= qq!!; + $html_init .= qq!!; if ( $fixed ) { $html_init .= qq!!; } else { - $html_init .= qq!Download batch in format !. qq!!. qq!!. qq!!. @@ -149,9 +150,11 @@ if ( $pay_batch ) { qq!!. qq!!. qq!!. + qq!!. + qq!!; } - $html_init .= qq!
!; + $html_init .= qq!

!; } if ( @@ -160,13 +163,36 @@ if ( $pay_batch ) { && $FS::CurrentUser::CurrentUser->access_right('Reprocess batches') ) ) { - $html_init .= qq!!. - qq!Upload results
!. - qq!Filename
!; - if ( $fixed ) { + $html_init .= ''. + include('/elements/form-file_upload.html', + 'name' => 'FileUpload', + 'action' => "$p/misc/upload-batch.cgi", + 'num_files' => 1, + 'fields' => [ 'batchnum', 'format' ], + 'message' => 'Batch results uploaded.', + ) . + 'Upload results
'. + include('/elements/file-upload.html', + 'field' => 'file', + 'label' => 'Filename', + 'no_table'=> 1 + ). + '
' + ; + if ( $fixed and $fixed eq 'td_eft1464' ) { + # special case, this one has two upload formats + $html_init .= qq!Format !. + qq!
!; + } + elsif ( $fixed ) { $html_init .= qq!!; } else { - $html_init .= qq!Format Format !. + qq!
!; + qq!!. + qq!!. + qq!
!; } $html_init .= qq!!; - $html_init .= '
'; + $html_init .= '
'; + if ( $conf->exists('batch-manual_approval') + and $conf->config('batch-fixed_format-CHEK') eq 'td_eft1464' + and $pay_batch->status eq 'I' + and $pay_batch->payby eq 'CHEK' ) { + $html_init .= qq!! + } } - + $html_init .= '
'; } if ($pay_batch) {