X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fbill_batch.cgi;h=55ee4be1c5750fb7138f3083232c6e8d00bbabc0;hb=d02f1d8fb338e4dd1b401892b3408a65cad3b4d4;hp=c848664ac9f23668a763bf22147e0854d237a880;hpb=ea79c3b7eff3f274d9d7f923891853a72cc1474f;p=freeside.git
diff --git a/httemplate/view/bill_batch.cgi b/httemplate/view/bill_batch.cgi
index c848664ac..55ee4be1c 100644
--- a/httemplate/view/bill_batch.cgi
+++ b/httemplate/view/bill_batch.cgi
@@ -1,39 +1,8 @@
-% if($magic eq 'download') {
-% my $content = $batch->pdf;
-% $batch->pdf('');
-% my $error = $batch->replace;
-% warn "error deleting cached PDF: '$error'\n" if $error;
-%
-% $m->clear_buffer;
-% $r->content_type('application/pdf');
-% $r->headers_out->add('Content-Disposition' => 'attachment;filename="invoice_batch_'.$batchnum.'.pdf"');
-<% $content %>
-% }
-%
-% elsif ($magic eq 'download_popup') {
-%
-<& /elements/header-popup.html,
- { 'etc' => 'BGCOLOR="#ccccff"' } &>
-
-
-<& /elements/footer.html &>
-%
-% }
-%
-% else {
<% include('/search/elements/search.html',
'title' => $close ?
"Batch $batchnum closed." :
"Invoice Batch $batchnum",
+ 'menubar' => ['All batches' => $p.'search/bill_batch.cgi'],
'name' => 'invoices',
'query' => { 'table' => 'cust_bill_batch',
'select' => join(', ',
@@ -44,12 +13,11 @@ parent.nd(1);
'hashref' => { },
'addl_from' =>
'LEFT JOIN cust_bill USING ( invnum ) '.
- 'LEFT JOIN cust_main USING ( custnum )',
+ FS::UI::Web::join_cust_main('cust_bill'),
'extra_sql' => " WHERE batchnum = $batchnum",
},
'count_query' => "SELECT COUNT(*) FROM cust_bill_batch WHERE batchnum = $batchnum",
'html_init' => $html_init,
- 'html_foot' => $html_foot,
'header' => [ 'Invoice #',
'Amount',
'Date',
@@ -67,7 +35,6 @@ parent.nd(1);
],
'really_disable_download' => 1,
) %>
-% }
<%init>
die "access denied"
@@ -80,38 +47,23 @@ my $batchnum = $cgi->param('batchnum');
$batch = FS::bill_batch->by_key($batchnum);
die "Batch '$batchnum' not found!\n" if !$batch;
-my $magic = $cgi->param('magic');
-$cgi->delete('magic');
-
my $close = $cgi->param('close');
$batch->close if $close;
-my $html_init = '';
-my $html_foot = '';
-if ( !$magic ) {
- $html_init .= qq!
-Download this batch';
- if ( $batch->status eq 'O' ) {
- $cgi->param('close' => 1);
- $html_init .= 'Close this batch
';
- }
- $html_init .= '
';
- if ( $cgi->param('start_download') ) {
- $cgi->delete('start_download');
- $html_foot = '';
- }
+my $html_init = qq!
';
+if ( $batch->status eq 'O' ) {
+ $cgi->param('close' => 1);
+ $html_init .= 'Close this batch
';
}
+$html_init .= '
';
my $link = [ "$p/view/cust_bill.cgi?", 'invnum' ];
my $clink = [ "$p/view/cust_main.cgi?", 'custnum' ];